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 E08ACA0579; Tue, 20 Apr 2021 15:01:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CC3E41749; Tue, 20 Apr 2021 15:01:56 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2086.outbound.protection.outlook.com [40.107.223.86]) by mails.dpdk.org (Postfix) with ESMTP id 83B0E41735 for ; Tue, 20 Apr 2021 15:01:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bHB9dxpnlyWzNV2Cz3gU2O+bj4I4/hQwNTV0cIfD/EFzMSl9svz9zBL30Tj2/PmFb7jvY1qp/AG7BQltGASCnqLOXLLjCkrVuQVQJxBOi/L4uB4wirBGhPeRdwaVTZigfn/rW0xgLnUW40EPDuSU0/wWFFbsnMhIyFWcYiLaic7XX1yh9hloNLW0I1o/rElx23P8LGEl9VJ27a6V4fQaTXTNmtouOtm4x0hzzhnczZ9r2FbZaK4IZRGaSdKFEO6gIbQ+5baCA3N0IkC4eqTntY7DSh8yKy6GTEfq5vOweRCS1g5+0+6TMfZLsE0nhn9Zv34TahP/o/IC4C01QSSPpw== 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=2vGn5+wWfZlhlAgVeMNqE1gB4De6PW27NTpoVTVEB6g=; b=fUew0zd0z9ANtv00aTRtb/NQVRKq8ZehdpMECPW7cV13MprIPNFmLryuHraisgqk/W06kYU4TpNOPNveid0ph5cWH8a8j+kZt5d3TNiq4uzmnsUi9U2OBtNxl4ry0dkj0bbyuxsq28QnbU++bUxPcpQK3slqkvUpHilz6nyEe+l9YMieL4GfVBHNiNkS+Csku9xr65BIPoEA88Jh8j6iY5yFXKmiu4VC4i8X4zFFp/hb5P1qVmPELAYI+a0sZF2Tq8+kQ/EyewgAMryW770pDll3Uofcrxa0+BGyUtg5LF8vPsqDTYNoYwmtGI0p3skLx2IFQ42wlboV5lBzQ09kew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2vGn5+wWfZlhlAgVeMNqE1gB4De6PW27NTpoVTVEB6g=; b=CZRhmYO7GXiQtYqttdWcJ1S6L5nJba/mqLjXLRC1D+N40CFnsGVYWf9x7P5GQQnXiqEWY5MWmtfbz1ITufwofSMSZ+TsAM3UoPoFtjFvkpJGcsOmcLYlHDOEg0RKeLCOTnM+SEDUvTLEbpSbqZZeDYCE0NTVh6BWXZovfSSZqjqLBYS27dqz33t2OS+uaZbucuuMZZ1vgdWOXfh6wEf51UcAwuOa6ETbw+Z5AZOUAiIvLuOOGiZVoySKfSpIW1gp81B76F9BWPF5Ckyf2d4SPZKmYBwpIlvUVDoiIZG33hoWlkwd0j5a2JaKv/KZlFla3/WdPZGttDeLTdyGT7unMA== Received: from MN2PR12MB2909.namprd12.prod.outlook.com (2603:10b6:208:103::13) by MN2PR12MB3470.namprd12.prod.outlook.com (2603:10b6:208:d0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.24; Tue, 20 Apr 2021 13:01:53 +0000 Received: from MN2PR12MB2909.namprd12.prod.outlook.com ([fe80::7cbc:e499:e936:7408]) by MN2PR12MB2909.namprd12.prod.outlook.com ([fe80::7cbc:e499:e936:7408%7]) with mapi id 15.20.4042.024; Tue, 20 Apr 2021 13:01:52 +0000 From: Bing Zhao To: "Liu, Lingyu" , Olivier Matz CC: "dev@dpdk.org" , "Zhang, Qi Z" , NBU-Contact-Thomas Monjalon , "david.marchand@redhat.com" , Hemant Agrawal Thread-Topic: [PATCH v2] mbuf: support eCPRI hardware packet type Thread-Index: AQHXNYtXmoPVRuIefEWiDRxqdGmmFKq9XMww Date: Tue, 20 Apr 2021 13:01:52 +0000 Message-ID: References: <20210417090415.5477-1-lingyu.liu@intel.com> <20210417092531.6001-1-lingyu.liu@intel.com> <20210419142453.GC1726@platinum> In-Reply-To: Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [39.183.8.98] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4cbaf6e0-64d8-4462-57c4-08d903fc77ff x-ms-traffictypediagnostic: MN2PR12MB3470: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-transport-forked: True x-ms-oob-tlc-oobclassifiers: OLM:561; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ni34tV1u6pRSPaRB/faIC5VcDeT18AlwLyRLWrY6GBnFcBuM8cNJuP1Vw9VgeW4qonCxFbgjsfrw+Wq4VewEUhKCH1WqsKCzxdQL+XHuSnJHazS10lEKQ/MVIHv/BnvppPEL57iNUmU585Lh4CisYBZMdqY9c9ISQduo4n4lUJZl5b4M9WMEzGsfAianTrf2DnQSWpMnmficEJQfE/Co7iZmwMLMZwhuGh3LZrC+QI2fR8CB61waWWLkDl5aHKmviGaDSsu7srAD8M7/E3Jd5NA902ef5RTshqyt7usW2JZZEPYiP4ZXbFfvVM9sZva5/LJQQ9jHKcqX6gJM/tJe7tSuOqGekFg6KdvlLQezOpeI89vaWRNAxFd65oP79ohkJYOQ/CaZBpx1djeTCirEvkxviSEb9Xh+sM3sxE5Xa4K72PGPaby3jDJmmymJRWh/dhsBXZQNdTB8YOK5hT8w4G/kQ9SYFUFTKQzqHCjHvrycGxJZAZirwE7QAV9xxIAwvq2PYAs+0HsTe3RGG3M2lBPdsFBg+CdscfzV9xY85JxFBf/QsZiD9jGk2SU23QSbpVNbA5lfyCPN4/7ltJ3bhnRuDTRIG3+8B98fHgbc73a2HINT0rR6oykP9JbOr1bjOoIos3dxXz4BiB1PgTG9PbbQXyZDnOGmD33parV9+z0Ta9UvPKNM0jD4GNe7eqV+ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB2909.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(346002)(136003)(396003)(39860400002)(6506007)(4326008)(76116006)(8676002)(316002)(8936002)(54906003)(53546011)(9686003)(86362001)(2906002)(5660300002)(71200400001)(55016002)(52536014)(33656002)(66446008)(83380400001)(26005)(186003)(7696005)(38100700002)(64756008)(122000001)(966005)(66556008)(66476007)(66946007)(110136005)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?6xYJffTW2sKJiP1TXh27V85rxJSCuO/k02rFCFiJGxUOW++sviFWnhXr0s3c?= =?us-ascii?Q?f9AtcM0hMxVtoHIOWyZ6oU5XCExZZdMy6JJxtnbFWi4t9/dsws9M/j2xo6nW?= =?us-ascii?Q?7cComVcwo7o7T2Jm/aaLACIF8HDEnzZpltjISOyR278eoFjSn38mDqymK4D3?= =?us-ascii?Q?3uQI52yOvA/PsFBhHyhTc/71QmId/7aq0BNQpLWP2TV3m9qoKuONqwtY7qy4?= =?us-ascii?Q?mpA6S+XJS4T3zrTmWe3uBedo8gjp339z2qjT6E8rllHfgruZpv2V9N9rzfXs?= =?us-ascii?Q?XbvLhNr1NGx77OWtRHlt7NzsDT+gv9L8ASQdX8b9kCGMwFJ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Ow5LZEj0XANFWTPfslKMX8/ktK4ZW04+rby68CM?= =?us-ascii?Q?WtIIpMybGUnsEuFSHvDbuR7ehyWYJl/R8rKYb44A8B/ZBJbBOntRgfsPMJaD?= =?us-ascii?Q?OTo=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB2909.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cbaf6e0-64d8-4462-57c4-08d903fc77ff X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2021 13:01:52.7141 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YIdr5PPneTSAeFGOm6Dx/RVuWQT/iq5Vw1YUex2PVbroKVZb8P/oOxpfaVB3ipubrN3EMJNuXgLbg+zbXDAi9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3470 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 Lingyu, > -----Original Message----- > From: dev On Behalf Of Liu, Lingyu > Sent: Tuesday, April 20, 2021 10:17 AM > To: Olivier Matz > Cc: dev@dpdk.org; Zhang, Qi Z ; NBU-Contact- > Thomas Monjalon ; david.marchand@redhat.com; > Hemant Agrawal > Subject: Re: [dpdk-dev] [PATCH v2] mbuf: support eCPRI hardware > packet type >=20 > External email: Use caution opening links or attachments >=20 >=20 > Hi Olivier, >=20 > This new packet type will be used by iavf driver to map ECPRI > hardware packet. > 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/ >=20 >=20 >=20 > Best Regards, >=20 > Lingyu Liu >=20 > > -----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 > > > > Hi Lingyu, > > > > 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 > > > > The number of available packet types for tunnels is quite low > (already > > mentionned in this thread [1]). > > > > [1] > > https://patches.dpdk.org/project/dpdk/patch/20210408081720.23314- > 3- > > ktejasree@marvell.com > > > > 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. > > > > Thanks, > > Olivier > > > > > --- > > > 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 Could you help to point out in which specification or other documentation t= hat the destination port is specified? I couldn't find it. eCPRI over UDP is supported in O-RAN standards, marked as "optional" in the= specs. Are the destination ports are specified during initialization but n= ot a fixed value with 5123? > > > /** > > > * 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) It is a bit wired. To my understanding, eCPRI is not a tunnel type like VxL= AN / GTP-U, etc. Did I miss something? Why it is considered a tunnel? > > > /** > > > * Get the name of the l2 packet type > > > * > > > -- > > > 2.25.1 > > > BR. Bing