From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26FF9A00C2; Thu, 23 Apr 2020 11:00:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B1C351D564; Thu, 23 Apr 2020 10:59:59 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id CD8891D562; Thu, 23 Apr 2020 10:59:56 +0200 (CEST) IronPort-SDR: VLzzhbF1qFP5nPFF8Xx73Y3zuAuo1lC02+/WR3LL3W0X03NFUemwXIu8PHiBpTUNRLId6aTHce K9ltk3TStnXg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2020 01:59:55 -0700 IronPort-SDR: UzlZqkjcNB9NXs+v2culZeteB3CUsvZNzqcaJR3yXMqCyF4uqcjEnVHZdpFnjUC99ArreRpIWf PZWSgBYdKkZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,306,1583222400"; d="scan'208";a="456834562" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga005.fm.intel.com with ESMTP; 23 Apr 2020 01:59:55 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Apr 2020 01:59:54 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 23 Apr 2020 01:59:54 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 23 Apr 2020 01:59:54 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.52) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Apr 2020 01:59:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UVTthiqf9LXbBo3x8JzpZ0jALfvvi/1bb41PAOaTHI4S4A3pHJ3oFKlZf+ntSK0z7f1wtATIcoeG2aU5JHOXbRE2yy8ws4NiImFI/Tv4N4yzyBmenNkFwcOX0U+5/YIFuxbnsTM4SKENOo3ZTXPY5EHYIDL/eLnn7ErAJEjKNNIGlkfZ4IW3X1tYZsohso9kRSAXEaDmuNJYcCnyCOEA3PEpx3MX2ynGch8HoQbwfH3TH2OIzdRjDc5VzkPcVj9Sg96z6hm19V7VwjjY0dBmphOw/wBv/SoV5WLdXLXi+hhBRw244/2cKvsFN6rV9yo8uO2yLiwY1YS8B++n6cdMiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qcupie8+272TXv67ykYoTdBfWTJH8YcUDcH3LfPl/kU=; b=h/vk2wMDk2wErQRvHZYbChApzE4qZJGrFp6aY1dJqyjFvtEOQrznQRWPbAMYAXbURs/BT7ZIY8gyit3g8/oTzBOsO6JUAH1v8Snw+kKqNs28grkFauD9P8Qr3n8sXLMl00PDw0eAkr4jir5MITR6Y0aGcZkiYiAXXtmE4Kib+3TNinkAACosWAL8qsf8pOShvOL7ZyoOHHF3fymxN3P3bSqfAMUxIepGGjZ8Cvs6Nuyo9Gx2+q5HTcaZUvhyB8WEngQVDBPqFSWFm049rNTrFAyU66sMJJxZYjPKjNWSUmal/Xd3IURzbRYv6OFyMVdJEUhDig2/kHce2ARRzajbOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qcupie8+272TXv67ykYoTdBfWTJH8YcUDcH3LfPl/kU=; b=R/OF3VC2R8GvV4aZuXhGyLzi1QbiF/EKvHL6AljiOsPw30L+fAQO8HqP5SFwOopmHdf27MEyei7i40V7Nv4FoBaPkwpdsM2nJVgVZMyyWl2Ucqq47R4Ntl/cslchXnShvDCk7WJwaXieWbBtjR9UbllU0UC52YAfJzBRbwW1dDk= Received: from DM6PR11MB2537.namprd11.prod.outlook.com (2603:10b6:5:cd::16) by DM6PR11MB2604.namprd11.prod.outlook.com (2603:10b6:5:c8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27; Thu, 23 Apr 2020 08:59:36 +0000 Received: from DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa]) by DM6PR11MB2537.namprd11.prod.outlook.com ([fe80::7c08:b4ae:e9c2:a4fa%6]) with mapi id 15.20.2921.033; Thu, 23 Apr 2020 08:59:35 +0000 From: "Iremonger, Bernard" To: Raslan Darawsheh , "Wu, Jingjing" , "Lu, Wenzhuo" CC: "Yigit, Ferruh" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v2] app/testpmd: add parsing for multiple VLAN headers Thread-Index: AQHWGUsRuLrLR7hP4ES4aGktu8nOaKiGZyKQ Date: Thu, 23 Apr 2020 08:59:35 +0000 Message-ID: References: <1587396746-409-1-git-send-email-rasland@mellanox.com> <1587631275-25710-1-git-send-email-rasland@mellanox.com> In-Reply-To: <1587631275-25710-1-git-send-email-rasland@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=bernard.iremonger@intel.com; x-originating-ip: [192.198.151.171] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5c253eee-2262-4d1b-e7e0-08d7e764a5bd x-ms-traffictypediagnostic: DM6PR11MB2604: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:348; x-forefront-prvs: 03827AF76E x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2537.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(366004)(39860400002)(396003)(136003)(346002)(376002)(4326008)(86362001)(5660300002)(478600001)(8936002)(8676002)(81156014)(2906002)(55016002)(6636002)(9686003)(186003)(110136005)(6506007)(7696005)(64756008)(66946007)(66556008)(33656002)(26005)(66446008)(71200400001)(76116006)(316002)(54906003)(66476007)(53546011)(52536014); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Aj/FkD+KmvmW4SN9Y3Q8AoCUv9KSqkgkn8dw0KYsy/6EUoiy4ZSS/TE8AfR7cX+ArNTNaYp9z5fSSPk8bT9IvWCSXvurN2VthRk94PeZagGhFPeUcCx0GyxFbz9kYQwCWu1XVZycjm4s3ZMknLlJ1Bmlkwwxu7wo3ftJ1uQl158CQCpd7L2bIisZMXNXi/qTBwp8/tf7Kc6KJSRLYggPvdY+2UfjlXpp6RFIv7se+UfTwFGHM6RztykJA7gTzBtVakCETQjtP/EqFd4e/zj97H2JkxxfMjRrysv2wzEHUFxHrWzNDWyRlsOAZDKTPhphsp+m7VCLNiPhyGBHPOAqrJwrb8ffLZuHjaVV2STDHmixOGLfiWzUXteDnTVPTz2RFy9wt9/YIKcisQPTms/4LETSbQuB72SMBtdrk0a8zaMyB/BPnoKyjdMHGS6Fdzup x-ms-exchange-antispam-messagedata: AOX0GcR/CVDzTQzj6WdRRygVriIVeVUMTItPVLk1GSD4lMj5xd4IkU65p0KoUupm9V5L8rNeYKzn29AJ9puZ9YhlvsTmyCX8E/TfCK7OG51LS82ugPtt0gcc5biqNxrCCljQ6jFFchHK2GwDAOb4iw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5c253eee-2262-4d1b-e7e0-08d7e764a5bd X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2020 08:59:35.8797 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pwSz+fRDoJ5CoEQjd36+MfVQFiWaQgrZCifRNqxGbhg3Be3Ac/dwfdLnkY3R+NFcPoDAg576zVlCrDHk7hqarW4/5tFKA1cUPWWjGKlMQy8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2604 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: add parsing for multiple VLAN headers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Raslan, > -----Original Message----- > From: Raslan Darawsheh > Sent: Thursday, April 23, 2020 9:41 AM > To: Iremonger, Bernard ; Wu, Jingjing > ; Lu, Wenzhuo > Cc: Yigit, Ferruh ; dev@dpdk.org; stable@dpdk.org > Subject: [PATCH v2] app/testpmd: add parsing for multiple VLAN headers Might be better to replace "multiple" with QINQ in the commit message. =20 > When having multiple VLANs in the packet, parse_ethernet is cabable of Might be better to replace "multiple" with QINQ > parsing only the first vlan. >=20 > add parsing for mutliple VLAN headers in the packet. Might be better to replace "multiple" with QINQ >=20 > Fixes: 51f694dd40f5 ("app/testpmd: rework checksum forward engine") > Cc: stable@dpdk.org >=20 > Signed-off-by: Raslan Darawsheh > Acked-by: Ori Kam > Acked-by: Bernard Iremonger > --- > v2: added QinQ to check for multiple vlan's > --- > app/test-pmd/csumonly.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) >=20 > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index > fe19615..8626223 100644 > --- a/app/test-pmd/csumonly.c > +++ b/app/test-pmd/csumonly.c > @@ -139,22 +139,23 @@ parse_ipv6(struct rte_ipv6_hdr *ipv6_hdr, struct > testpmd_offload_info *info) >=20 > /* > * Parse an ethernet header to fill the ethertype, l2_len, l3_len and > - * ipproto. This function is able to recognize IPv4/IPv6 with one option= al vlan > - * header. The l4_len argument is only set in case of TCP (useful for TS= O). > + * ipproto. This function is able to recognize IPv4/IPv6 with optional > + VLAN > + * headers. The l4_len argument is only set in case of TCP (useful for T= SO). > */ > static void > parse_ethernet(struct rte_ether_hdr *eth_hdr, struct > testpmd_offload_info *info) { > struct rte_ipv4_hdr *ipv4_hdr; > struct rte_ipv6_hdr *ipv6_hdr; > + struct rte_vlan_hdr *vlan_hdr; >=20 > info->l2_len =3D sizeof(struct rte_ether_hdr); > info->ethertype =3D eth_hdr->ether_type; >=20 > - if (info->ethertype =3D=3D _htons(RTE_ETHER_TYPE_VLAN)) { > - struct rte_vlan_hdr *vlan_hdr =3D ( > - struct rte_vlan_hdr *)(eth_hdr + 1); > - > + while (info->ethertype =3D=3D _htons(RTE_ETHER_TYPE_VLAN) || > + info->ethertype =3D=3D _htons(RTE_ETHER_TYPE_QINQ)) { > + vlan_hdr =3D (struct rte_vlan_hdr *) > + ((char *)eth_hdr + info->l2_len); > info->l2_len +=3D sizeof(struct rte_vlan_hdr); > info->ethertype =3D vlan_hdr->eth_proto; > } > -- > 2.7.4 Otherwise Acked-by: Bernard Iremonger