[ovs-dev] [PATCH RFC] netdev-dpdk: add af_xdp support.

Ilya Maximets i.maximets at samsung.com
Wed May 29 13:15:14 UTC 2019


On 28.05.2019 23:12, William Tu wrote:
> The patch adds support for using DPDK's AF_XDP PMD.
> Base on DPDK 19.08-rc0:
>   commit c6a53a6bcd0ae52afe0a6d58b059af577c9408b3
>   Author: Thomas Monjalon <thomas at monjalon.net>
>   Date:   Tue May 14 18:04:37 2019 +0200
> 
>       version: 19.08-rc0
> 
> An AF_XDP PMD can be created by:
> 
>   $ ovs-vsctl add-port br0 afxdp-p0 -- set int afxdp-p0 type=dpdk \
>        options:dpdk-devargs=net_af_xdp,iface=enp2s0,queue=0

I'm confused. I didn't try, but I thought that this should work out-of-the-box
without any changes to OVS. Basically, your rte_eal_hotplug_add() and rte_dev_probe()
that we're using right now are the same function with different way of passing
arguments. Have you tried to just use above command without this patch applied?
What happens in this case?

Another option you may try is:

ovs-vsctl add-port br0 afxdp-p0 -- set interface afxdp-p0 type=dpdk \
          options:dpdk-devargs="vdev:net_af_xdp,iface=enp2s0,queue=0"

so DPDK will not have to guess the bus type.

> 
>   $ ovs-vsctl show
>   Port "afxdp-p0"
>     Interface "afxdp-p0"
>       type: dpdk
>       options: {dpdk-devargs="net_af_xdp,iface=enp2s0,queue=0"}
> 
> The performance of physical device loopback shows around 7Mpps with 64B pkt.
> 
>   $ ovs-ofctl add-flow br0 "in_port=afxdp-p0, \
>        actions=set_field:14->in_port,set_field:a0:36:9f:33:b1:40->dl_src,afxdp-p0"
> 
> Note: I have to set e_RTE_METER_GREEN to 0 to pass compile.

You may use 'dpdk-latest' OVS branch. The proper fix exists there.
In general, patches that intended to work only with latest DPDK that
not yet supported on master should be made on top of 'dpdk-latest'
branch and have [PATCH dpdk-latest] subject prefix.

Best regards, Ilya Maximets.


More information about the dev mailing list