On 11 May 2026, at 12:24, Eelco Chaudron wrote:

> On 1 Apr 2026, at 11:13, Eli Britstein wrote:
>
>> Introduce a new netdev type - "doca".
>> The code is placed in new files.
>> - ovs-doca: initialization of doca library and utility functions that
>>   are used currently by netdev-doca and also will be used for future
>>   hw-offload code.
>> - netdev-doca: implementation of the new netdev.
>>
>> Supported ports are mlx5 ports in switch-dev mode only that with a NIC
>> that supports hw-steering.
>>
>> The netdev has the concept of ESW manager. A representor port is
>> functional only if its ESW manager is attached to OVS. In case it is
>> not, the representor appears as functional in ovs-vsctl show, but it is
>> not. Upon initializing of an ESW manager port, each representor is
>> reconfigured to be functional, and upon destruction, they are first stopped.
>>
>> Steering infrastructure:
>> - RX packets of all ports are steered to a common queue. This queue is
>>   polled using dpdk API and the packets are classified to a per-port
>>   memory structure.
>> - TX packets are marked with the target port as metadata and sent to a
>>   common queue. The egress pipe matches on the metadata and forwards the
>>   packets accordingly.
>
> Hi Eli,
>
> Thanks for this smaller patch. It took way longer than anticipated
> to review. See some comments below.

Forgot to add my last comment, here it is...

> //Eelco
>

[...]
>> +
>> +static int
>> +dpdk_eth_dev_port_config(struct netdev_doca *dev,
>
> doca_eth_dev_port_config()?
>
>> +                         const struct rte_eth_dev_info *info,
>> +                         int n_rxq, int n_txq)
>> +{
>> +    struct netdev_dpdk_common *common = &dev->common;
>> +    struct rte_eth_conf conf = port_conf;
>> +    int diag = 0;
>> +    int i;
>> +
>> +    netdev_dpdk_build_port_conf(common, info, &conf);
>> +
>> +    if (!netdev_doca_is_esw_mgr(&common->up)) {
>> +        rte_eth_dev_configure(common->port_id, 0, 0, &conf);
>> +        return dpdk_eth_dev_port_config_complete(dev, n_rxq, n_txq);
>> +    }
>> +
>> +    /* A device may report more queues than it makes available (this has
>> +     * been observed for Intel xl710, which reserves some of them for
>> +     * SRIOV):  rte_eth_*_queue_setup will fail if a queue is not
>> +     * available.  When this happens we can retry the configuration
>> +     * and request less queues. */
>> +    while (n_rxq && n_txq) {
>> +        if (diag) {
>> +            VLOG_INFO("Retrying setup with (rxq:%d txq:%d)", n_rxq, n_txq);
>> +        }
>> +
>> +        diag = rte_eth_dev_configure(common->port_id, n_rxq,
>> +                                     n_txq, &conf);
>> +        if (diag) {
>> +            VLOG_WARN("Interface %s eth_dev setup error %s\n",

Log should not end with a \n.

>> +                      common->up.name, rte_strerror(-diag));
>> +            break;
>> +        }
>> +

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to