[dpdk-users] only one vdev net_af_xdp being recognized

Jags N jagsnn at gmail.com
Thu Jul 11 08:18:19 CEST 2019


Hi,

<Truncated tail part of email for clarity>

I do check for "ip link list" and turn off the xdp with "ip link set dev
<dev> xdp off". Even had confirmed with bpftool for any residue map before
executing testpmd.

[root at localhost app]# bpftool map
15: lpm_trie  flags 0x1
        key 8B  value 8B  max_entries 1  memlock 4096B
16: lpm_trie  flags 0x1
        key 20B  value 8B  max_entries 1  memlock 4096B
17: lpm_trie  flags 0x1
        key 8B  value 8B  max_entries 1  memlock 4096B
18: lpm_trie  flags 0x1
        key 20B  value 8B  max_entries 1  memlock 4096B
19: lpm_trie  flags 0x1
        key 8B  value 8B  max_entries 1  memlock 4096B
20: lpm_trie  flags 0x1
        key 20B  value 8B  max_entries 1  memlock 4096B
[root at localhost app]#

Another observation was that the first vdev in the EAL argument sequence
comes up. Say, if I swap enp0s9 and enp0s10, then the Port 0 succeeds with
xdp socket on enp0s10, and Port 1 fails to create xdp socket on enp0s9.  So
basically only the first vdev succeeds in xdp socket creation.

With EAL argument :      --vdev  net_af_xdp0,iface=enp0s9 --vdev
net_af_xdp1,iface=enp0s10

4: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric qdisc
fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:68:5b:66 brd ff:ff:ff:ff:ff:ff
    prog/xdp id 47 tag 688894a68871a50f jited
5: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state
UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:6f:f4:61 brd ff:ff:ff:ff:ff:ff

With EAL argument :  --vdev  net_af_xdp0,iface=enp0s10 --vdev
net_af_xdp1,iface=enp0s9

4: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state
UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:68:5b:66 brd ff:ff:ff:ff:ff:ff
5: enp0s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric qdisc
fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:6f:f4:61 brd ff:ff:ff:ff:ff:ff
    prog/xdp id 46 tag 688894a68871a50f jited

Let me check further.

Regards,
Jagdish

On Thu, Jul 11, 2019 at 8:03 AM Ye Xiaolong <xiaolong.ye at intel.com> wrote:

> Hi,
>
> On 07/11, Jags N wrote:
> >Hi Xiaolong,
> >
> >Thanks much !  That works.
> >
> >I am now facing - xsk_configure(): Failed to create xsk socket.
> >
> >Port 0 is fine, Port 1 is showing the problem.
>
> Has port 1 been brought up?
> Another reason may be that you've run with port 1 before, and somehow it
> left
> without proper cleanup of the xdp program (you can verfy it by `./bpftool
> map -p`
> to see whether there is existed xskmap, you can build the bpftool in
> tools/bpf/bpftool)
> you can try reboot your system and try again.
>
> Thanks,
> Xiaolong
>
> >
> >I am checking "tools/lib/bpf/xsk.c:xsk_socket__create()" further on this.
> >Meanwhile just asking if any obvious reasons, if I am missing anything ?
> >
> >[root at localhost app]# ./testpmd -c 0x3 -n 4 --vdev
> > net_af_xdp0,iface=enp0s9 --vdev net_af_xdp1,iface=enp0s10 --iova-mode=va
> >EAL: Detected 3 lcore(s)
> >EAL: Detected 1 NUMA nodes
> >EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
> >EAL: Debug dataplane logs available - lower performance
> >EAL: Probing VFIO support...
> >EAL: WARNING: cpu flags constant_tsc=no nonstop_tsc=no -> using unreliable
> >clock cycles !
> >EAL: PCI device 0000:00:03.0 on NUMA socket -1
> >EAL:   Invalid NUMA socket, default to 0
> >EAL:   probe driver: 8086:100e net_e1000_em
> >EAL: PCI device 0000:00:08.0 on NUMA socket -1
> >EAL:   Invalid NUMA socket, default to 0
> >EAL:   probe driver: 8086:100e net_e1000_em
> >EAL: PCI device 0000:00:09.0 on NUMA socket -1
> >EAL:   Invalid NUMA socket, default to 0
> >EAL:   probe driver: 8086:100f net_e1000_em
> >EAL: PCI device 0000:00:0a.0 on NUMA socket -1
> >EAL:   Invalid NUMA socket, default to 0
> >EAL:   probe driver: 8086:100f net_e1000_em
> >testpmd: create a new mbuf pool <mbuf_pool_socket_0>: n=155456, size=2176,
> >socket=0
> >testpmd: preferred mempool ops selected: ring_mp_mc
> >Configuring Port 0 (socket 0)
> >Port 0: 08:00:27:68:5B:66
> >Configuring Port 1 (socket 0)
> >xsk_configure(): Failed to create xsk socket.
> >eth_rx_queue_setup(): Failed to configure xdp socket
> >Fail to configure port 1 rx queues
> >EAL: Error - exiting with code: 1
> >  Cause: Start ports failed
> >[root at localhost app]#
> >
> >Regards,
> >Jags
> >
>
>


More information about the users mailing list