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 A8E6CA0C41; Thu, 30 Sep 2021 16:38:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39718410E5; Thu, 30 Sep 2021 16:38:04 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2076.outbound.protection.outlook.com [40.107.102.76]) by mails.dpdk.org (Postfix) with ESMTP id 1A9DE40DDA for ; Thu, 30 Sep 2021 16:38:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RjAzs5djUPBj5L5WdM+bw8A5JNIyjTwqQHCGqg+We7S4iEiMw4dKxOd9AwUqxT65DXlL+IVBupujp7IeuFsowb2Lo0Z4cGVDq+v9UhDI0phoIDmM7RN72ok709xxHULp4jWRhoW6wm00V6FGOwFHrnnjsf3UljtmeTf4MXu8ad+7PjCl9wq+Pxv9WxHgeS3WzNmgQB/4aorOBmxOdz23zQnilEkMQyCZVOMUuV6SaUAcn12MmJTu1ciQKjGaADNExNT8TDI0MX5bSwT1YDBQpxawcR64nm80lYgUyH4ZqYpGq1Pl9RR5FjQhzu3pFc086m3NVCxBdic7KJtJZrv8rg== 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; bh=VshtD9Wpa12Miv5M9/xVdggVrGjaeQQcaH8OzdcV6eA=; b=j7tKH67+rIVYb/IjwZfLztqz2NAnEbqMAHsir+GSxYgXKIea7YT3I2Hd0v/gfqnOOBt+Hh8q2EU003RVd9HQydJq4cgyTnz5xt25Yv0Iu5Q3lPLyyNT1bEV2xb57Td7L2Hy0QGdMkzZBG6NfkBSyJPto4HblGJLXLqFDw4Uap5MBsZZ/XBbdbdGW2hmqhQjuBi49f3JgWRAIp4OLkJcCU/O4GS8BKMapEvGuNEWnPHXwLZvv5CMi3181TvTH/hlcnb6Mw1uXEwroVkGVXFl5iLKY76pLTs6u+TW0PqjA9CH5BskEqzMK/20u8wlOFUT+BmUwttbrOge2K/Tr6y2RJw== 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=VshtD9Wpa12Miv5M9/xVdggVrGjaeQQcaH8OzdcV6eA=; b=BnZBNCPNz6nK7FxhBdveF4knGYZVs5OrrkYgj/s/gc5AN4ORznSH+EpiSdvmbTznZxCJQMx5MijyYbk/KxGZ44Y7BXG0kj42d0ZZF5O5zyPBGff7dklyXoR67KxHOlkZuOQ5iGygvV6zMsN36sf7EQUuNw+/saIdPvH1ALOu7A5rcBYVpfZcAiY09Cz6sqwS3tVaQLK3FqoeUA8CgUxbTW7UMqyOvuyL1+fAi8BjJT6TzimD9EJZSJkSDSy5UluAySnX7kvQ77vVBAHilBvLRBveK2u82VOMXQ5XzAUrAp944AlNMDKz/afPvGkW109Gz5O8JjMkK3J+m4MLRY9Rtw== Received: from DM8PR12MB5400.namprd12.prod.outlook.com (2603:10b6:8:3b::12) by DM8PR12MB5477.namprd12.prod.outlook.com (2603:10b6:8:35::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14; Thu, 30 Sep 2021 14:38:01 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32]) by DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32%6]) with mapi id 15.20.4544.022; Thu, 30 Sep 2021 14:38:01 +0000 From: Ori Kam To: Jie Wang , "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , NBU-Contact-Thomas Monjalon , "andrew.rybchenko@oktetlabs.ru" , "xiaoyun.li@intel.com" , "jingjing.wu@intel.com" , "beilei.xing@intel.com" , "wenjun1.wu@intel.com" , "stevex.yang@intel.com" Thread-Topic: [dpdk-dev] [PATCH 3/4] ethdev: support PPPoL2TPv2oUDP RSS Hash Thread-Index: AQHXsRSfvJtk+a+kLUedUuKqn5uurau8pyoA Date: Thu, 30 Sep 2021 14:38:01 +0000 Message-ID: References: <20210924151705.287571-1-jie1x.wang@intel.com> <20210924151705.287571-4-jie1x.wang@intel.com> In-Reply-To: <20210924151705.287571-4-jie1x.wang@intel.com> Accept-Language: en-US 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-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9b14483a-6153-4028-9e8c-08d9841fe7c4 x-ms-traffictypediagnostic: DM8PR12MB5477: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ye7kJPKByR90QjN6+dAiVDZol8Wd3MnLd6+uP5/P9UJQwm7IuqTT1hQLqu127baldCLBvHJ9lcOxeOuu3C/lEEltQF0EdHq/KbhbB+Nuyfmm4xln0utYKUHj16Yf5QcamQjU2TK4EvMbMq9LeqELEljy7dwDQQtF8VLHMbWE9xui8M481tGyurjoh8TVAo823lBzFOyBzMb2aXe1OQ7SvfMIK9pJCGRh4DL7L5aie2cFjL1YILBj/oO5gNkk69j2+TZTUkxWTQ6KC3e+xwe0bnhDPSxdv54pGn0Q4Rzu56HQ4l7+Hqrmm761f+2aVkNyUxuWEJi/f6SLj+0XshWF8W6KC/uEZAXkHwoQjnxuG4r9SoEaus/DwYHMYwVtuZt+VXeMxbRkPo/bZMOEKtdow0Jiy/XYfA5JoGLeuQ4Ca1pIR2MFqfgkZOjyyvCYW65cGpCvIicsmpsFAV4rSSpqGtA6Aww3ngMp3qkdo28rkIklDX24Edcb4i+G4VbnCm8HKjulsg3XxOCwgl5iTIb+iw+L5QuoLCXo3Flia0us5Ho9eU2Q/dus3NwKhdmXnodAbfGn0VWFnl8YvDOgbNV0d8D/DMK+j7ytx4JdC98O9RmBhB+phC96oKzLslabvQ2oAp9C5GdovDDmblcvPUK2OUaRxojzYqwFIU0TFtFYehSgrCs/7OC+waC/5bSPIYNN5e2CuUZDnP0SIKGqZbj+yQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR12MB5400.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(64756008)(66446008)(66556008)(66476007)(83380400001)(66946007)(4326008)(76116006)(8676002)(5660300002)(55016002)(8936002)(33656002)(9686003)(7416002)(6506007)(53546011)(54906003)(7696005)(86362001)(71200400001)(508600001)(52536014)(186003)(2906002)(122000001)(110136005)(38100700002)(316002)(38070700005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?DRIMYH1/vwLgKE1/0G59suPEyc+SDuAfAYbC1ht/6Zqlqom9AppkQAeBO+vN?= =?us-ascii?Q?MlsYIUm6UM32sm65jETqEV7CrZQNXoJoC+L5C3A8LmFd69Z3YXErnExytwDe?= =?us-ascii?Q?igyWZi/2GU3mpeiT1Y6IF+lVJ0TIzQpm0/VVopfwKM/l3yHWXE0NAB3rBd/d?= =?us-ascii?Q?PDBqBlQ3kR2M5zsloToXvZ64MZtHiFtGrnHcwoLQ1MhFtNmWObaS++rxQ4Ox?= =?us-ascii?Q?3z6Aw2o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mKrIZixF5EQfoDYs?= =?us-ascii?Q?uRnzvy2rhdIUQkIsTMALzA9g8Eg87K0FlihDBQexLXyt8hJIIQhQ6cVe/+vA?= =?us-ascii?Q?T5rotuyQ4uCcGbI+C5Mv+TF0xmNagAQoFDUJTB/oOuHGQNLdfNHpsl6UGEfO?= =?us-ascii?Q?20b3Kwp4GZ4a+caHm4HVUOMCjSSMs5hEZQoRAr0k4kIXeBM9VaOdw26EHhWk?= =?us-ascii?Q?jDGDrcTfWKF6bABQKC0hDO5qUM0rkTQhsXJhy5iCJVOS5w0rwprAdF6KA5o8?= =?us-ascii?Q?yxM1weQsrXqG1WH9gaFrzEzdq8BS?= x-ms-exchange-transport-forked: True 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: DM8PR12MB5400.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b14483a-6153-4028-9e8c-08d9841fe7c4 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2021 14:38:01.5178 (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: BmuRhMqGhY6cX4hzrwdMQeDjglE20HBuiTckj68a9t4rJtF3UL5EtnbV8DuLzMviVBNubZYpHmeeQkfmqTnnsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5477 Subject: Re: [dpdk-dev] [PATCH 3/4] ethdev: support PPPoL2TPv2oUDP RSS Hash 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 Jie, You are missing updating the rte_flow.rst and release notes: Please see more comments below. Thanks, Ori > -----Original Message----- > From: dev On Behalf Of Jie Wang > Sent: Friday, September 24, 2021 6:17 PM > Subject: [dpdk-dev] [PATCH 3/4] ethdev: support PPPoL2TPv2oUDP RSS > Hash >=20 > Add flow pattern items, RSS offload types and header formats of L2TPv2 an= d > PPP. >=20 > Signed-off-by: Wenjun Wu > Signed-off-by: Jie Wang > --- > lib/ethdev/rte_flow.c | 2 + > lib/ethdev/rte_flow.h | 99 > +++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 101 insertions(+) >=20 > diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index > 8cb7a069c8..307fbc3abe 100644 > --- a/lib/ethdev/rte_flow.c > +++ b/lib/ethdev/rte_flow.c > @@ -98,6 +98,8 @@ static const struct rte_flow_desc_data > rte_flow_desc_item[] =3D { > MK_FLOW_ITEM(PFCP, sizeof(struct rte_flow_item_pfcp)), > MK_FLOW_ITEM(ECPRI, sizeof(struct rte_flow_item_ecpri)), > MK_FLOW_ITEM(GENEVE_OPT, sizeof(struct > rte_flow_item_geneve_opt)), > + MK_FLOW_ITEM(L2TPV2, sizeof(struct rte_flow_item_l2tpv2)), > + MK_FLOW_ITEM(PPP, sizeof(struct rte_flow_item_ppp)), > MK_FLOW_ITEM(INTEGRITY, sizeof(struct rte_flow_item_integrity)), > MK_FLOW_ITEM(CONNTRACK, sizeof(uint32_t)), }; diff --git > a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index > 70f455d47d..93205b7d1e 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -554,6 +554,20 @@ enum rte_flow_item_type { > */ > RTE_FLOW_ITEM_TYPE_GENEVE_OPT, >=20 > + /** > + * Matches L2TPV2 Header. > + * > + * See struct rte_flow_item_l2tpv2. > + */ > + RTE_FLOW_ITEM_TYPE_L2TPV2, > + > + /** > + * Matches PPP Header. > + * > + * See struct rte_flow_item_ppp. > + */ > + RTE_FLOW_ITEM_TYPE_PPP, > + Why did you push the new items here and not in the end? > /** > * [META] > * > @@ -1799,6 +1813,91 @@ static const struct rte_flow_item_conntrack > rte_flow_item_conntrack_mask =3D { }; #endif >=20 > +/** > + * @warning > + * @b EXPERIMENTAL: this structure may change without prior notice > + * RTE_FLOW_ITEM_TYPE_L2TPV2 > + * > + * Matches L2TPv2 Header > + */ > +RTE_STD_C11 > +struct rte_flow_item_l2tpv2 { > + rte_be16_t flags_version; /**< flag(12) version(2). version must be > 2 */ > + union{ > + struct{ > + rte_be16_t length; /**< length(16) */ > + rte_be16_t tunnel_id; /**< tunnel id(16) */ > + rte_be16_t session_id; /**< session id(16) */ > + rte_be32_t ns_nr; /**< Ns(16) + Nr(16) */ Why not split those fields?=20 > + rte_be32_t offset; /**< offset size(16) + offset > padding(16) */ Why not split those fields? > + } type1; > + struct{ > + rte_be16_t tunnel_id; /**< tunnel id(16) */ > + rte_be16_t session_id; /**< session id(16) */ > + rte_be32_t ns_nr; /**< Ns(16) + Nr(16) */ > + rte_be32_t offset; /**< offset size(16) + offset > padding(16) */ > + } type2; > + struct{ > + rte_be16_t length; /**< length(16) */ > + rte_be16_t tunnel_id; /**< tunnel id(16) */ > + rte_be16_t session_id; /**< session id(16) */ > + rte_be32_t offset; /**< offset size(16) + offset > padding(16) */ > + } type3; > + struct{ > + rte_be16_t length; /**< length(16) */ > + rte_be16_t tunnel_id; /**< tunnel id(16) */ > + rte_be16_t session_id; /**< session id(16) */ > + rte_be32_t ns_nr; /**< Ns(16) + Nr(16) */ > + } type4; > + struct{ > + rte_be16_t tunnel_id; /**< tunnel id(16) */ > + rte_be16_t session_id; /**< session id(16) */ > + rte_be32_t offset; /**< offset size(16) + offset > padding(16) */ > + } type5; > + struct{ > + rte_be16_t tunnel_id; /**< tunnel id(16) */ > + rte_be16_t session_id; /**< session id(16) */ > + rte_be32_t ns_nr; /**< Ns(16) + Nr(16) */ > + } type6; > + struct{ > + rte_be16_t length; /**< length(16) */ > + rte_be16_t tunnel_id; /**< tunnel id(16) */ > + rte_be16_t session_id; /**< session id(16) */ > + } type7; > + struct{ > + rte_be16_t tunnel_id; /**< tunnel id(16) */ > + rte_be16_t session_id; /**< session id(16) */ > + } type8; > + }; > +}; > + The size of each of the types is different so using this struct as is will = be hard if someone wish to use it for encap or just as header. Why not creating different structs for each type? > +/** Default mask for RTE_FLOW_ITEM_TYPE_L2TPV2. */ #ifndef > __cplusplus > +static const struct rte_flow_item_l2tpv2 rte_flow_item_l2tpv2_mask =3D { > + .flags_version =3D 0xffff, Should the default be match on all the flags? And the version? > +}; > +#endif > + > +/** > + * @warning > + * @b EXPERIMENTAL: this structure may change without prior notice > + * RTE_FLOW_ITEM_TYPE_PPP > + * > + * Matches PPP Header > + */ > +struct rte_flow_item_ppp { > + rte_be16_t pppaddr_ctrl; /**< ppp address(8) + control(8) */ Why not split? > + rte_be16_t pppproto_id; /**< ppp protocol id(16) */ }; > + > +/** Default mask for RTE_FLOW_ITEM_TYPE_PPP. */ #ifndef __cplusplus > +static const struct rte_flow_item_ppp rte_flow_item_ppp_mask =3D { > + .pppaddr_ctrl =3D 0xffff, > + .pppproto_id =3D 0xffff, > +}; > +#endif > + > /** > * Matching pattern item definition. > * > -- > 2.25.1