From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2D140A00C2 for ; Tue, 27 Sep 2022 16:29:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F65441133; Tue, 27 Sep 2022 16:29:23 +0200 (CEST) Received: from CNSHPPMGWESA02.NOKIA-SBELL.COM (cnshjsmin05.app.nokia-sbell.com [116.246.26.45]) by mails.dpdk.org (Postfix) with ESMTP id 9652340694 for ; Tue, 27 Sep 2022 16:29:21 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.93,349,1654531200"; d="scan'208,217";a="5977636" Received: from unknown (HELO CNSHPPEXCH1603.nsn-intra.net) ([135.251.51.103]) by CNSHPPMGWESA02.NOKIA-SBELL.COM with ESMTP; 27 Sep 2022 22:29:19 +0800 Received: from CNSHPPEXCH1601.nsn-intra.net (135.251.51.101) by CNSHPPEXCH1603.nsn-intra.net (135.251.51.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 27 Sep 2022 22:29:19 +0800 Received: from CNSHPPEXCH1601.nsn-intra.net ([135.251.51.101]) by CNSHPPEXCH1601.nsn-intra.net ([135.251.51.101]) with mapi id 15.01.2375.031; Tue, 27 Sep 2022 22:29:19 +0800 From: "Yan, Xiaoping (NSB - CN/Hangzhou)" To: "users@dpdk.org" , "jingjing.wu@intel.com" , "beilei.xing@intel.com" Subject: rx packet vlan_tci is not set in iavf driver Thread-Topic: rx packet vlan_tci is not set in iavf driver Thread-Index: AdjSea4klVfBYFR1R1ez3O4IVEXjWA== Date: Tue, 27 Sep 2022 14:29:19 +0000 Message-ID: <96e4df2f97e4480596092d275c2bdde1@nokia-sbell.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [135.251.51.115] Content-Type: multipart/alternative; boundary="_000_96e4df2f97e4480596092d275c2bdde1nokiasbellcom_" MIME-Version: 1.0 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --_000_96e4df2f97e4480596092d275c2bdde1nokiasbellcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I have a dpdk application sending broadcast packet in vlan 0x248. and I sta= rted dpdk-testpmd on rx only mode. The dpdk-testpmd received the packet with vlan header (as expected) as belo= w from gdb output: (gdb) x/100xb (pkts_burst[4]->buf_addr+pkts_burst[4]->data_off) 0x17787c8c0: 0xff 0xff 0xff 0xff 0xff 0xff 0xfe 0x1= a 0x17787c8c8: 0xcc 0x2e 0x6e 0x78 0x81 0x00 0x02 0x4= 8 0x17787c8d0: 0x89 0x51 0x40 0x00 0x00 0x00 0x00 0x0= 0 ... 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 0x1= a 0x1775b8a88: 0xcc 0x2e 0x6e 0x78 0x89 0x51 0x40 0x0= 0 0x1775b8a90: 0x00 0x00 0x00 0x00 0x00 0x00 0x03 0x0= 0 ... But (what is not expected) the mbuf vlan_tci is not filled, as below: gdb) p *pkts_burst[4] $8 =3D {cacheline0 =3D 0x17787c740, buf_addr =3D 0x17787c7c0, buf_iova =3D = 6300354496, rearm_data =3D 0x17787c750, data_off =3D 256, refcnt =3D 1, nb_segs =3D 1= , port =3D 0, ol_flags =3D 384, rx_descriptor_fields1 =3D 0x17787c760, {packet_type =3D= 1, { l2_type =3D 1 '\001', l3_type =3D 0 '\000', l4_type =3D 0 '\000', tun_type =3D 0 '\000', {inner_esp_next_proto =3D 0 '\000', { inner_l2_type =3D 0 '\000', inner_l3_type =3D 0 '\000'}}, inner_l4_type =3D 0 '\000'}}, pkt_len =3D 60, data_len =3D 60, vlan_t= ci =3D 0, { hash =3D {rss =3D 0, fdir =3D {{{hash =3D 0, id =3D 0}, lo =3D 0}, hi = =3D 0}, sched =3D { queue_id =3D 0, traffic_class =3D 0 '\000', color =3D 0 '\000', res= erved =3D 0}, txadapter =3D {reserved1 =3D 0, reserved2 =3D 0, txq =3D 0}, usr =3D = 0}}, vlan_tci_outer =3D 0, buf_len =3D 2304, pool =3D 0x23b1e98c0, cacheline1 = =3D 0x17787c780, next =3D 0x0, {tx_offload =3D 0, {l2_len =3D 0, l3_len =3D 0, l4_len =3D = 0, tso_segsz =3D 0, outer_l3_len =3D 0, outer_l2_len =3D 0}}, shinfo =3D 0x0, priv_size = =3D 0, timesync =3D 0, dynfield1 =3D {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. --_000_96e4df2f97e4480596092d275c2bdde1nokiasbellcom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I have a dpdk application sendi= ng broadcast packet in vlan 0x248. and I started dpdk-testpmd on rx only mo= de.

 

The dpdk-testpmd received the p= acket with vlan header (as expected) as below from gdb output:

(gdb) x/100xb (pkts_burst[4]-&g= t;buf_addr+pkts_burst[4]->data_off)

0x17787c8c0:    = 0xff    0xff    0xff    0xff&n= bsp;   0xff    0xff    0xfe  &= nbsp; 0x1a

0x17787c8c8:    = 0xcc    0x2e    0x6e    0x78&n= bsp;   0x81    0x00    0x02    0x4= 8

0x17787c8d0:    = 0x89    0x51    0x40    0x00&n= bsp;   0x00    0x00    0x00 &n= bsp;  0x00

...

 

Then I enable vlan strip via be= low command

testpmd> vlan set strip on 0=

Now the vlan is stripped (as ex= pected) as below:

(gdb) x/100xb (pkts_burst[0]-&g= t;buf_addr+pkts_burst[0]->data_off)

0x1775b8a80:    = 0xff    0xff    0xff    0xff&n= bsp;   0xff    0xff    0xfe &n= bsp;  0x1a

0x1775b8a88:    = 0xcc    0x2e    0x6e    0x78&n= bsp;   0x89    0x51    0x40   = 0x00

0x1775b8a90:    = 0x00    0x00    0x00    0x00&n= bsp;   0x00    0x00    0x03 &n= bsp;  0x00

But (what is not expected) the = mbuf vlan_tci is not filled, as below:

gdb) p *pkts_burst[4]

$8 =3D {cacheline0 =3D 0x17787c= 740, buf_addr =3D 0x17787c7c0, buf_iova =3D 6300354496,

  rearm_data =3D 0x17787c7= 50, data_off =3D 256, refcnt =3D 1, nb_segs =3D 1, port =3D 0,

  ol_flags =3D 384,= rx_descriptor_fields1 =3D 0x17787c760, {packet_type =3D 1, {

      = l2_type =3D 1 '\001', l3_type =3D 0 '\000', l4_type =3D 0 '\000',

      = tun_type =3D 0 '\000', {inner_esp_next_proto =3D 0 '\000', {

     &= nbsp;    inner_l2_type =3D 0 '\000', inner_l3_type =3D 0 '\0= 00'}},

      = inner_l4_type =3D 0 '\000'}}, pkt_len =3D 60, data_len =3D 60, vlan_tci =3D 0, {

    hash =3D {rs= s =3D 0, fdir =3D {{{hash =3D 0, id =3D 0}, lo =3D 0}, hi =3D 0}, sched =3D= {

     &= nbsp;  queue_id =3D 0, traffic_class =3D 0 '\000', color =3D 0 '\000',= reserved =3D 0},

      = txadapter =3D {reserved1 =3D 0, reserved2 =3D 0, txq =3D 0}, usr =3D 0}},

  vlan_tci_outer =3D 0, bu= f_len =3D 2304, pool =3D 0x23b1e98c0, cacheline1 =3D 0x17787c780,

  next =3D 0x0, {tx_offloa= d =3D 0, {l2_len =3D 0, l3_len =3D 0, l4_len =3D 0, tso_segsz =3D 0,

      = outer_l3_len =3D 0, outer_l2_len =3D 0}}, shinfo =3D 0x0, priv_size =3D 0,<= o:p>

  timesync =3D 0, dynfield= 1 =3D {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:<= o:p>

[cranuser2@hzdc-ecp-10-110-8-22= 2 ~]$ ethtool -i ens43f2

driver: ice

version: 4.18.0-372.26.1.el8_6.= x86_64

firmware-version: 3.10 0x8000ad= 3d 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.

 

 

 

--_000_96e4df2f97e4480596092d275c2bdde1nokiasbellcom_--