DPDK usage discussions
 help / color / mirror / Atom feed
* rx packet vlan_tci is not set in iavf driver
@ 2022-09-27 14:29 Yan, Xiaoping (NSB - CN/Hangzhou)
  2022-09-29 14:07 ` Yan, Xiaoping (NSB - CN/Hangzhou)
  0 siblings, 1 reply; 2+ messages in thread
From: Yan, Xiaoping (NSB - CN/Hangzhou) @ 2022-09-27 14:29 UTC (permalink / raw)
  To: users, jingjing.wu, beilei.xing

[-- Attachment #1: Type: text/plain, Size: 2643 bytes --]

Hi,

I have a dpdk application sending broadcast packet in vlan 0x248. and I started dpdk-testpmd on rx only mode.

The dpdk-testpmd received the packet with vlan header (as expected) as below from gdb output:
(gdb) x/100xb (pkts_burst[4]->buf_addr+pkts_burst[4]->data_off)
0x17787c8c0:    0xff    0xff    0xff    0xff    0xff    0xff    0xfe    0x1a
0x17787c8c8:    0xcc    0x2e    0x6e    0x78    0x81    0x00    0x02    0x48
0x17787c8d0:    0x89    0x51    0x40    0x00    0x00    0x00    0x00    0x00
...

Then I enable vlan strip via below command
testpmd> vlan set strip on 0
Now the vlan is stripped (as expected) as below:
(gdb) x/100xb (pkts_burst[0]->buf_addr+pkts_burst[0]->data_off)
0x1775b8a80:    0xff    0xff    0xff    0xff    0xff    0xff    0xfe    0x1a
0x1775b8a88:    0xcc    0x2e    0x6e    0x78    0x89    0x51    0x40    0x00
0x1775b8a90:    0x00    0x00    0x00    0x00    0x00    0x00    0x03    0x00
...
But (what is not expected) the mbuf vlan_tci is not filled, as below:
gdb) p *pkts_burst[4]
$8 = {cacheline0 = 0x17787c740, buf_addr = 0x17787c7c0, buf_iova = 6300354496,
  rearm_data = 0x17787c750, data_off = 256, refcnt = 1, nb_segs = 1, port = 0,
  ol_flags = 384, rx_descriptor_fields1 = 0x17787c760, {packet_type = 1, {
      l2_type = 1 '\001', l3_type = 0 '\000', l4_type = 0 '\000',
      tun_type = 0 '\000', {inner_esp_next_proto = 0 '\000', {
          inner_l2_type = 0 '\000', inner_l3_type = 0 '\000'}},
      inner_l4_type = 0 '\000'}}, pkt_len = 60, data_len = 60, vlan_tci = 0, {
    hash = {rss = 0, fdir = {{{hash = 0, id = 0}, lo = 0}, hi = 0}, sched = {
        queue_id = 0, traffic_class = 0 '\000', color = 0 '\000', reserved = 0},
      txadapter = {reserved1 = 0, reserved2 = 0, txq = 0}, usr = 0}},
  vlan_tci_outer = 0, buf_len = 2304, pool = 0x23b1e98c0, cacheline1 = 0x17787c780,
  next = 0x0, {tx_offload = 0, {l2_len = 0, l3_len = 0, l4_len = 0, tso_segsz = 0,
      outer_l3_len = 0, outer_l2_len = 0}}, shinfo = 0x0, priv_size = 0,
  timesync = 0, dynfield1 = {0, 0, 0, 0, 0, 0, 0, 0, 0}}

Is there something wrong in the iavf pmd driver?

dpdk version: 21.11-0 (iavf pmd driver, and rx burst function is iavf_recv_pkts_vec_avx2)
hw: intel E810 SRIOV VF
PF driver and firmware in use:
[cranuser2@hzdc-ecp-10-110-8-222 ~]$ ethtool -i ens43f2
driver: ice
version: 4.18.0-372.26.1.el8_6.x86_64
firmware-version: 3.10 0x8000ad3d 1.3106.0
expansion-rom-version:
bus-info: 0000:8a:00.2
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes


Thank you.




[-- Attachment #2: Type: text/html, Size: 8880 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: rx packet vlan_tci is not set in iavf driver
  2022-09-27 14:29 rx packet vlan_tci is not set in iavf driver Yan, Xiaoping (NSB - CN/Hangzhou)
@ 2022-09-29 14:07 ` Yan, Xiaoping (NSB - CN/Hangzhou)
  0 siblings, 0 replies; 2+ messages in thread
From: Yan, Xiaoping (NSB - CN/Hangzhou) @ 2022-09-29 14:07 UTC (permalink / raw)
  To: users, jingjing.wu, beilei.xing

[-- Attachment #1: Type: text/plain, Size: 5320 bytes --]

Hi,

It seems the vlan id is in rx descriptor, but somehow not copied to vlan_tci
I tried to gdb on _iavf_recv_raw_pkts_vec_avx2
(gdb) p* rxdp
$6 = {read = {pkt_addr = 16888770190601355264, hdr_addr = 16517370491403, rsvd1 = 628252148018184193, rsvd2 = 0}, wb = {
    qword0 = {lo_dword = {mirr_fcoe = {mirroring_status = 0, fcoe_ctx_id = 0}, l2tag1 = 0}, hi_dword = {rss = 3932223234,
        fcoe_param = 3932223234, fd_id = 3932223234}}, qword1 = {status_error_len = 16517370491403}, qword2 = {
      ext_status = 1, rsvd = 0, l2tag2_1 = 0, l2tag2_2 = 2232}, qword3 = {lo_dword = {flex_bytes_lo = 0, pe_status = 0},
      hi_dword = {flex_bytes_hi = 0, fd_id = 0}}}}

But when dpdk-testpmd received it, there is no vtan_tci
(gdb) p *pkts_burst[0]
$17 = {cacheline0 = 0x177657700, buf_addr = 0x177657780, buf_iova = 6298105728, rearm_data = 0x177657710, data_off = 256,
  refcnt = 1, nb_segs = 1, port = 0, ol_flags = 386, rx_descriptor_fields1 = 0x177657720, {packet_type = 1681, {
      l2_type = 1 '\001', l3_type = 9 '\t', l4_type = 6 '\006', tun_type = 0 '\000', {inner_esp_next_proto = 0 '\000', {
          inner_l2_type = 0 '\000', inner_l3_type = 0 '\000'}}, inner_l4_type = 0 '\000'}}, pkt_len = 60, data_len = 60,
  vlan_tci = 0, {hash = {rss = 3932223234, fdir = {{{hash = 63234, id = 60000}, lo = 3932223234}, hi = 0}, sched = {
        queue_id = 3932223234, traffic_class = 0 '\000', color = 0 '\000', reserved = 0}, txadapter = {
        reserved1 = 3932223234, reserved2 = 0, txq = 0}, usr = 3932223234}}, vlan_tci_outer = 0, buf_len = 2304,
  pool = 0x23b1e98c0, cacheline1 = 0x177657740, next = 0x0, {tx_offload = 0, {l2_len = 0, l3_len = 0, l4_len = 0,
      tso_segsz = 0, outer_l3_len = 0, outer_l2_len = 0}}, shinfo = 0x0, priv_size = 0, timesync = 0, dynfield1 = {0, 0, 0,
    0, 0, 0, 0, 0, 0}}
(gdb) bt
#0  pkt_burst_receive (fs=0x176d96a40) at ../dpdk-21.11/app/test-pmd/rxonly.c:61
#1  0x00000000016501e9 in run_pkt_fwd_on_lcore (fc=0x23b4f2a40, pkt_fwd=0x164c8c0 <pkt_burst_receive>)
    at ../dpdk-21.11/app/test-pmd/testpmd.c:2200
#2  0x00000000016502d4 in start_pkt_forward_on_core (fwd_arg=<optimized out>) at ../dpdk-21.11/app/test-pmd/testpmd.c:2226
#3  0x000000000059abac in eal_thread_loop (arg=<optimized out>) at ../dpdk-21.11/lib/eal/linux/eal_thread.c:146
#4  0x00007ffff5233812 in start_thread () from /usr/lib64/libc.so.6
#5  0x00007ffff51d3314 in clone () from /usr/lib64/libc.so.6

From: Yan, Xiaoping (NSB - CN/Hangzhou)
Sent: 2022年9月27日 22:29
To: users@dpdk.org; 'jingjing.wu@intel.com' <jingjing.wu@intel.com>; beilei.xing@intel.com
Subject: rx packet vlan_tci is not set in iavf driver

Hi,

I have a dpdk application sending broadcast packet in vlan 0x248. and I started dpdk-testpmd on rx only mode.

The dpdk-testpmd received the packet with vlan header (as expected) as below from gdb output:
(gdb) x/100xb (pkts_burst[4]->buf_addr+pkts_burst[4]->data_off)
0x17787c8c0:    0xff    0xff    0xff    0xff    0xff    0xff    0xfe    0x1a
0x17787c8c8:    0xcc    0x2e    0x6e    0x78    0x81    0x00    0x02    0x48
0x17787c8d0:    0x89    0x51    0x40    0x00    0x00    0x00    0x00    0x00
...

Then I enable vlan strip via below command
testpmd> vlan set strip on 0
Now the vlan is stripped (as expected) as below:
(gdb) x/100xb (pkts_burst[0]->buf_addr+pkts_burst[0]->data_off)
0x1775b8a80:    0xff    0xff    0xff    0xff    0xff    0xff    0xfe    0x1a
0x1775b8a88:    0xcc    0x2e    0x6e    0x78    0x89    0x51    0x40    0x00
0x1775b8a90:    0x00    0x00    0x00    0x00    0x00    0x00    0x03    0x00
…
But (what is not expected) the mbuf vlan_tci is not filled, as below:
gdb) p *pkts_burst[4]
$8 = {cacheline0 = 0x17787c740, buf_addr = 0x17787c7c0, buf_iova = 6300354496,
  rearm_data = 0x17787c750, data_off = 256, refcnt = 1, nb_segs = 1, port = 0,
  ol_flags = 384, rx_descriptor_fields1 = 0x17787c760, {packet_type = 1, {
      l2_type = 1 '\001', l3_type = 0 '\000', l4_type = 0 '\000',
      tun_type = 0 '\000', {inner_esp_next_proto = 0 '\000', {
          inner_l2_type = 0 '\000', inner_l3_type = 0 '\000'}},
      inner_l4_type = 0 '\000'}}, pkt_len = 60, data_len = 60, vlan_tci = 0, {
    hash = {rss = 0, fdir = {{{hash = 0, id = 0}, lo = 0}, hi = 0}, sched = {
        queue_id = 0, traffic_class = 0 '\000', color = 0 '\000', reserved = 0},
      txadapter = {reserved1 = 0, reserved2 = 0, txq = 0}, usr = 0}},
  vlan_tci_outer = 0, buf_len = 2304, pool = 0x23b1e98c0, cacheline1 = 0x17787c780,
  next = 0x0, {tx_offload = 0, {l2_len = 0, l3_len = 0, l4_len = 0, tso_segsz = 0,
      outer_l3_len = 0, outer_l2_len = 0}}, shinfo = 0x0, priv_size = 0,
  timesync = 0, dynfield1 = {0, 0, 0, 0, 0, 0, 0, 0, 0}}

Is there something wrong in the iavf pmd driver?

dpdk version: 21.11-0 (iavf pmd driver, and rx burst function is iavf_recv_pkts_vec_avx2)
hw: intel E810 SRIOV VF
PF driver and firmware in use:
[cranuser2@hzdc-ecp-10-110-8-222 ~]$ ethtool -i ens43f2
driver: ice
version: 4.18.0-372.26.1.el8_6.x86_64
firmware-version: 3.10 0x8000ad3d 1.3106.0
expansion-rom-version:
bus-info: 0000:8a:00.2
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes


Thank you.




[-- Attachment #2: Type: text/html, Size: 16402 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-29 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 14:29 rx packet vlan_tci is not set in iavf driver Yan, Xiaoping (NSB - CN/Hangzhou)
2022-09-29 14:07 ` Yan, Xiaoping (NSB - CN/Hangzhou)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).