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 C6C66A0547; Tue, 20 Apr 2021 04:17:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 498AA41448; Tue, 20 Apr 2021 04:17:37 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 3C95E40688 for ; Tue, 20 Apr 2021 04:17:34 +0200 (CEST) IronPort-SDR: sBaTM9c7eAiF1hbwivGh8EVPgj0zc7a2/07DTPuma5vATpOvxuOYWbDtxshfqH8NGN7VLfrNmr awZgaMHiec2w== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="182561540" X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="182561540" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 19:17:33 -0700 IronPort-SDR: xcGuID+lRQh3nC+iP7+g3jToiQI3kWQylIMRXkApWZ7J/moQSTAY54rbPVGdhbibMQq2agvhkB oPT3htokB4ow== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,235,1613462400"; d="scan'208";a="613573508" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga006.fm.intel.com with ESMTP; 19 Apr 2021 19:17:33 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 19 Apr 2021 19:17:32 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 19 Apr 2021 19:17:32 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Mon, 19 Apr 2021 19:17:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JSbKZl1qa+hPZlrjP3FsAuoiGMdc294EaCyr0szzHEF1nvG37OwV8U0XJ7ZyJ2l7MRT5lz9ePdg+3dW6gZeiW4DhpkYBhZ/93xawp13ftrGyhUjBUWZQdB/rEI5E58blaGXVtE2SB/e3VKvWpgo9HJqdg1jUN9y7vf35hritfmw2c3RD2ESSxD/T/HqgE/ozxF19axhtUGGXNeIjFNwggGbyZod0GilBiODn6GmtbP71IVsDNh5/23zNkmiAIrJkyGKjsYZazFCrPMHG9KJAa+7kEaTjRKnxm6WlDDiAKAkoirQ6i8jkRzkhiIlmUMXjaw5VKSpsYWV+h5uubQoHGw== 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=frTCJfTBDZnd9yON4dojtCU2erRQJlYCGQiXB2d6BKg=; b=DtZ00/ZojmeXGRmB/uI7kXOcVuggWRUdGJnNJrYk9QP7oUzoHxeFWQfUC+tY5cri6gs3JHyoQQwP9YCApaHYpJyvs0UF+A90yVUo6Mw7DYkCyNVuMJykNKlhDrIVNDHDOxizGQGJrV09U1ZDD+R4wfNflMKN8Q4wvI/sZQGrVX9uTA/hqBfkrFQkNogSlJF4eWMfLfFPuUonRVgQ9KsbezlFlV++oC69b1s9Ay+xny/McffU9lytrI1RsSMuOAhvkpVHgQVWq/hQpjwR3ZugzA7+F82AJbf7ElR7B0GVetivCHXTjEpzAl12tK4g0hk0vvgJt7U+QIU6qhbP/ZS+Ug== 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=frTCJfTBDZnd9yON4dojtCU2erRQJlYCGQiXB2d6BKg=; b=ktP1MExbllGJsLBIWEYE/FQ6NT8FJ+ltNUfaT8/JY9MMXwKwNSDNrSgooDmIJQA8c/YysyOjaCXQs5JzyLjrYxaRaJ2kWJyQuBiP7dS9rsuAMt7AdRH6HtJS4REzdKn7shs4zLdicPWYJN9RmAe/493SV3dTy79sTAm//Mp4KY4= Received: from BYAPR11MB3047.namprd11.prod.outlook.com (2603:10b6:a03:8b::32) by BY5PR11MB4210.namprd11.prod.outlook.com (2603:10b6:a03:1bd::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.19; Tue, 20 Apr 2021 02:17:29 +0000 Received: from BYAPR11MB3047.namprd11.prod.outlook.com ([fe80::8c8d:62e:59dc:849f]) by BYAPR11MB3047.namprd11.prod.outlook.com ([fe80::8c8d:62e:59dc:849f%6]) with mapi id 15.20.4042.024; Tue, 20 Apr 2021 02:17:29 +0000 From: "Liu, Lingyu" To: Olivier Matz CC: "dev@dpdk.org" , "Zhang, Qi Z" , "thomas@monjalon.net" , "david.marchand@redhat.com" , Hemant Agrawal Thread-Topic: [PATCH v2] mbuf: support eCPRI hardware packet type Thread-Index: AQHXMzRqx6uwy2x/W0y0RWYkGCeIGaq76R6AgACsR2A= Date: Tue, 20 Apr 2021 02:17:29 +0000 Message-ID: References: <20210417090415.5477-1-lingyu.liu@intel.com> <20210417092531.6001-1-lingyu.liu@intel.com> <20210419142453.GC1726@platinum> In-Reply-To: <20210419142453.GC1726@platinum> 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.5.1.3 authentication-results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.209] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: badee81e-bc6e-4b18-1c19-08d903a272ea x-ms-traffictypediagnostic: BY5PR11MB4210: 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:374; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jyLJkA+zhF8hF+zL0NlGtdSWII/uzNk4dCOpXufUE563de7nxrvckivrdGfaFh8J7hZO6oJs9LUa94JOfTiJqp+xzSLtjxS5CV0BKahteHVBVCDAvqj4sUc7yPV0vruF3Y1AYSeFm0hONyq34h4wVnIeUm77CuDQrgoBf2lvh/xl6LOZ+4mjtatNq/ntUPcqiqh1RQbQjyag5HhzvrzTbnKHMDqkVok1yO7QEjFBvRrGYsgtmsM9OmVzwXsMAOo0KcaTlm7Nn634VeQMMe5CgQW8AP4L3m3I7STbWlk9zTa0qoMJBFHT6QEUzev3uhMMFJcudBcPLTos1vBtubwJSEEPU5wwrnvuHIboFkbImCobXFa/QvXerEqSLBNAIGu0qDnWjJN3eOdipTpBbaf5LQpwIeb6kKLBaDs7bCWMo+nu3z1pq0MBNRRPPnmWKGvGMb7vg63lmywswRbh7zIHb71JFlBqYkm5rtHXacmXRvSKHCGSP2uMlWiLwUT4F5M97395HQycPG0jK1IfCt9yO5tW7udm4+kNQ2KfCV7thNTUO8EKZV8phwAnx6HxkUPJGaTEABJ77uFrc0azpzXL4Sgck5Nx33T6VyCKr3LREks4igOu/tDSzS3yXL7co8WXO6QWQtotcyBAynbrSbmex15iu31gQV2RYEEuQDP5GxnPPBWu5y/Cg37yfchqEjtK x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3047.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(39860400002)(366004)(376002)(346002)(136003)(122000001)(76116006)(9686003)(8676002)(66946007)(7696005)(4326008)(55016002)(33656002)(71200400001)(5660300002)(8936002)(83380400001)(478600001)(26005)(6506007)(316002)(966005)(52536014)(66556008)(6916009)(53546011)(54906003)(66476007)(66446008)(86362001)(64756008)(186003)(2906002)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?2CcVXEy/Ra9MSetrk5epkwnRXNN+6mFpwg8gMbwCE5Vwm26uTnq8k4i4IxdV?= =?us-ascii?Q?XqV6+IgrnTfAiBe2T14PzMyn8sBU6tAHlniMf4qxbSDriI+GxMAeLgJ4OhWD?= =?us-ascii?Q?6EQuebg6h7qQnZz65q7A8ztAxNgQSnOK2UGypiPw63rOrK+rtVMLHDzq0Zqn?= =?us-ascii?Q?vHtvbc6Uw6lSqfhqkCpv5iHksuRL1Nw9N1YpoIoNiqjDZeddFly2w+uVPrw+?= =?us-ascii?Q?2d8GzSmfuOlbIjW3rVAC4hOK2APSyR/A5NR/21TN57N/9Pgi5VasLPsAA2Wm?= =?us-ascii?Q?mL8DWchzW9RpGIp/7bXCm2Hg03QJXKkjCWkyhMo6UWzx//FYTm3ZUkJHtIOG?= =?us-ascii?Q?Nq0q7MvTKOcC+e2XarKBs1Mi9Y91PThRGVsDIHxD+a5UZg4jdIyu4KGD2j53?= =?us-ascii?Q?g1zcABVjkK6qL4MMmYPJbcwq+QPd9IWGxlugaPWce/77h11SRAXKwkgQU6HE?= =?us-ascii?Q?hprt7ZyLn20ip/7J6yI2pKe3NhOtWT4DzuTowYSXHVKyscJ2qS05LYhP5ONg?= =?us-ascii?Q?BL1zUTwnxcz6/2g6Rg67KZ0Xj74PQUWFSV/k56RwesG667VeR+KuDIm30WIs?= =?us-ascii?Q?9JmwyQQfyJPgT+ovbkdW1a/1SngS4IqpxhJ40kim7T3ENz9V1u2cNZiJb0LS?= =?us-ascii?Q?yramdZrGwp1wN+9urEJqGNmKUPJ0wAv9sjGnDvkMWn8flmAvowQQGTanS1jy?= =?us-ascii?Q?L5xrYQ5MnFK2u4HvQbM+4qqC48gxKSFRXPT1RY0o0N1chWAuSzikPljbD3ee?= =?us-ascii?Q?WD7S+cDHbpcCd35/ldzopn+UzwgwXlwtwKez1kzCJAYDrmCKJkHhSc/CoIC7?= =?us-ascii?Q?V6npkSTJbzQisVR3LVpemWoq8TkzOQx+tyMapNniDSunFR1CEKdx2mhDDNhz?= =?us-ascii?Q?a1GJHwA9fncT9EExGWxBeGwvhcIN2fjex3S5+Kvtv51hErExTahpPyDfm2gz?= =?us-ascii?Q?7/fqIcOWOcbSmUkgOiP8gzQRi+V18V8/Qse0MMbEJnVxflVLaeqX8FPNImwI?= =?us-ascii?Q?D2v2jHxB+XIJ6D/1tRToAOqu8N5sazXr6VRaPmGeQHMQXMt+OkNu8irkMR9H?= =?us-ascii?Q?XHhYMys3RMC4MYH22SlHMApZYQsDEKcx9BYdp6U/bjcl3E7f9xj6Dga7D3RX?= =?us-ascii?Q?1Mn+idhAHidg8oCdwYjhhZdZjTNCJKm/XTp3DZea/Flk/11oAGMJ5VSBOSx0?= =?us-ascii?Q?eZyC2888GlT4zihvyu0o/z5Jgybvqy78WKubCHGQK3nXIGoYBw9+oHXGIoOF?= =?us-ascii?Q?xWm6jnFF1eZ8P6iLTw+aVvcKJ6r3lVaciY4p3EJkDDkPQ7QKdnG4+MSSI7K3?= =?us-ascii?Q?QbdiYq/SdVBYIdixKKzIhlAP?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3047.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: badee81e-bc6e-4b18-1c19-08d903a272ea X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2021 02:17:29.5457 (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: /M8wwvngzWmPFlA5SxSl1rA6EbJvCgzhX55k21KFuhXyiRpPjAstZSRjonsxw09Y72v/Fg6PvUVD7+dR1dwAgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4210 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] mbuf: support eCPRI hardware packet type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Olivier, This new packet type will be used by iavf driver to map ECPRI hardware pack= et. This is the patch which will use this new hardware packet type. http://patchwork.dpdk.org/project/dpdk/patch/20210420083817.10741-3-lingyu.= liu@intel.com/ Best Regards, Lingyu Liu > -----Original Message----- > From: Olivier Matz > Sent: Monday, April 19, 2021 10:25 PM > To: Liu, Lingyu > Cc: dev@dpdk.org; Zhang, Qi Z ; > thomas@monjalon.net; david.marchand@redhat.com; Hemant Agrawal > > Subject: Re: [PATCH v2] mbuf: support eCPRI hardware packet type >=20 > Hi Lingyu, >=20 > On Sat, Apr 17, 2021 at 09:25:31AM +0000, Lingyu Liu wrote: > > Add L2_ETHER_ECPRI and L4_UDP_TUNNEL_ECPRI in RTE_PTYPE. > > > > Signed-off-by: Lingyu Liu > > Acked-by: Hemant Agrawal >=20 > The number of available packet types for tunnels is quite low (already > mentionned in this thread [1]). >=20 > [1] https://patches.dpdk.org/project/dpdk/patch/20210408081720.23314-3- > ktejasree@marvell.com >=20 > Can you give some details about how it will be used? For instance, which > driver will set it, which kind of application will use it. >=20 > Thanks, > Olivier >=20 > > --- > > V2 change: > > - refine commit log > > > > app/test-pmd/util.c | 25 ++++++++++++++++--------- > > lib/librte_mbuf/rte_mbuf_ptype.c | 2 ++ > > lib/librte_mbuf/rte_mbuf_ptype.h | 22 ++++++++++++++++++++++ > > 3 files changed, 40 insertions(+), 9 deletions(-) > > > > diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index > > a9e431a8b2..494ebbf909 100644 > > --- a/app/test-pmd/util.c > > +++ b/app/test-pmd/util.c > > @@ -258,16 +258,23 @@ dump_pkt_burst(uint16_t port_id, uint16_t > queue, struct rte_mbuf *pkts[], > > udp_hdr =3D rte_pktmbuf_mtod_offset(mb, > > struct rte_udp_hdr *, > > l2_len + l3_len); > > - l4_len =3D sizeof(struct rte_udp_hdr); > > - vxlan_hdr =3D rte_pktmbuf_mtod_offset(mb, > > - struct rte_vxlan_hdr *, > > - l2_len + l3_len + l4_len); > > udp_port =3D RTE_BE_TO_CPU_16(udp_hdr- > >dst_port); > > - vx_vni =3D rte_be_to_cpu_32(vxlan_hdr- > >vx_vni); > > - MKDUMPSTR(print_buf, buf_size, cur_len, > > - " - VXLAN packet: packet type =3D%d, " > > - "Destination UDP port =3D%d, VNI > =3D %d", > > - packet_type, udp_port, vx_vni >> 8); > > + l4_len =3D sizeof(struct rte_udp_hdr); > > + if (RTE_ETH_IS_ECPRI_HDR(packet_type)) { > > + MKDUMPSTR(print_buf, buf_size, > cur_len, > > + " - eCPRI packet: packet type > =3D%d, " > > + "Destination UDP port =3D%d", > > + packet_type, udp_port); > > + } else { > > + vxlan_hdr =3D > rte_pktmbuf_mtod_offset(mb, > > + struct rte_vxlan_hdr *, > > + l2_len + l3_len + l4_len); > > + vx_vni =3D > rte_be_to_cpu_32(vxlan_hdr->vx_vni); > > + MKDUMPSTR(print_buf, buf_size, > cur_len, > > + " - VXLAN packet: packet > type =3D%d, " > > + "Destination UDP port =3D%d, > VNI =3D %d", > > + packet_type, udp_port, > vx_vni >> 8); > > + } > > } > > } > > MKDUMPSTR(print_buf, buf_size, cur_len, diff --git > > a/lib/librte_mbuf/rte_mbuf_ptype.c b/lib/librte_mbuf/rte_mbuf_ptype.c > > index d6f906b06c..2bf97c89c6 100644 > > --- a/lib/librte_mbuf/rte_mbuf_ptype.c > > +++ b/lib/librte_mbuf/rte_mbuf_ptype.c > > @@ -21,6 +21,7 @@ const char *rte_get_ptype_l2_name(uint32_t ptype) > > case RTE_PTYPE_L2_ETHER_PPPOE: return "L2_ETHER_PPPOE"; > > case RTE_PTYPE_L2_ETHER_FCOE: return "L2_ETHER_FCOE"; > > case RTE_PTYPE_L2_ETHER_MPLS: return "L2_ETHER_MPLS"; > > + case RTE_PTYPE_L2_ETHER_ECPRI: return "L2_ETHER_ECPRI"; > > default: return "L2_UNKNOWN"; > > } > > } > > @@ -71,6 +72,7 @@ const char *rte_get_ptype_tunnel_name(uint32_t > ptype) > > case RTE_PTYPE_TUNNEL_VXLAN_GPE: return "TUNNEL_VXLAN_GPE"; > > case RTE_PTYPE_TUNNEL_MPLS_IN_UDP: return > "TUNNEL_MPLS_IN_UDP"; > > case RTE_PTYPE_TUNNEL_MPLS_IN_GRE: return > "TUNNEL_MPLS_IN_GRE"; > > + case RTE_PTYPE_TUNNEL_ECPRI: return "TUNNEL_ECPRI"; > > default: return "TUNNEL_UNKNOWN"; > > } > > } > > diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h > > b/lib/librte_mbuf/rte_mbuf_ptype.h > > index 17a2dd3576..5fdf369ac0 100644 > > --- a/lib/librte_mbuf/rte_mbuf_ptype.h > > +++ b/lib/librte_mbuf/rte_mbuf_ptype.h > > @@ -144,6 +144,13 @@ extern "C" { > > * <'ether type'=3D[0x8847|0x8848]> > > */ > > #define RTE_PTYPE_L2_ETHER_MPLS 0x0000000a > > +/** > > + * eCPRI (extend Common Public Radio Interface) packet type. > > + * > > + * Packet format: > > + * <'ether type'=3D[0xAEFE]> > > + */ > > +#define RTE_PTYPE_L2_ETHER_ECPRI 0x0000000b > > /** > > * Mask of layer 2 packet types. > > * It is used for outer packet for tunneling cases. > > @@ -491,6 +498,19 @@ extern "C" { > > * | 'destination port'=3D6635> > > */ > > #define RTE_PTYPE_TUNNEL_MPLS_IN_UDP 0x0000d000 > > +/** > > + * ECPRI packet type. > > + * > > + * Packet format: > > + * <'ether type'=3D0x0800 > > + * | 'version'=3D4, 'protocol'=3D17, > > + * | 'destination port'=3D5123> > > + * or, > > + * <'ether type'=3D0x86DD > > + * | 'version'=3D6, 'protocol'=3D17, > > + * | 'destination port'=3D5123> > > + */ > > +#define RTE_PTYPE_TUNNEL_ECPRI 0x0000e000 > > /** > > * Mask of tunneling packet types. > > */ > > @@ -688,6 +708,8 @@ extern "C" { > > RTE_PTYPE_INNER_L3_MASK | \ > > RTE_PTYPE_INNER_L4_MASK)) > > > > +/* Check if it is a ECPRI packet */ > > +#define RTE_ETH_IS_ECPRI_HDR(ptype) ((ptype) & > > +RTE_PTYPE_TUNNEL_ECPRI) > > /** > > * Get the name of the l2 packet type > > * > > -- > > 2.25.1 > >