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 B7FA2A0547; Thu, 29 Apr 2021 12:13:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D48741194; Thu, 29 Apr 2021 12:13:24 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2046.outbound.protection.outlook.com [40.107.220.46]) by mails.dpdk.org (Postfix) with ESMTP id E4C4D41125 for ; Thu, 29 Apr 2021 12:13:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JJvQRdPw9zaYc/TfJ0/mBVt9AaMH/nGhpVivjKR47BJE1ddeylImMQuMkpz9CYn3fmF6NoqVo85UZyZ3t+abzfgLq2b4V31Yx9y3/i3fDiRQk5quOMnUigKJiol1DoaXqOM5k29MzWstPyxfa2T5bh5Onu9VBbtE8Q0Bx0cPYGN4N5fiBvFhbGZIlhyKT77Yh3rujqInbZW2AH9/DJEEYOlpNXQy5XJ/sNEpxhfoufJRL3FkwsBOYM7uArrx3IWY3JPl9R2ilbHArIGSobeqAXm/+XckduhiDqlTnQdRVK5tVFatFPJo8j2YAtLULFnqayZ27jFc1at54rfXVHO5pw== 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=J2TKUtdn5FCGmdD2LZAK0Jzoz6uw+g8+Q7RhLbQ52mE=; b=DlRTdZF/ZnHiLwV52V2FSS/QR5KhJvvWKG29jtozHOFVhypXX1EHSr1hZQFri+X+epSTWbExTCXqmvgcXvoL47cUhtllrVjTQV2Ny8am5mqde6VEin/ZjjmI15egtZj9muvR9gyIvNjczFlZ7D9NCvLhtaGKZXkociPEOubPeH46R90YlUXxBWc2q/h3GKNY2ScUpw4Zhwtf9bMMYPzwA1GJ5696zqs/syPN34iEYcVPaoz7txcz8/khOEkRWWI4JqJCe5tSP1Pih+/WedadSr/89EvyX8l+IJAD18hDPPPncH68+R7QvXc1a+Wb7xbMo/U24rm3z+RNdWPlvAXlsg== 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=J2TKUtdn5FCGmdD2LZAK0Jzoz6uw+g8+Q7RhLbQ52mE=; b=VmLiutwdIfJE3VIFiP5gC13hTd7bgJ6fv1x9v0o/iawYzfrf3FwFZxcnw4NYabtPgN/1KkF8pFnRVNkwtjSapsyjP0zIczQZCMqF6oU9FYv37Tl2lkb+YiwCRf/jF9W+uovUmXx5QPuOgawFnUVKxq7J52h9SK0oca4cjWvHNpzlX+Th48ywgaE/UNQuOaSXjlKKWMTAvNsKB7CMcSku1b5NwVrnGbN0ZrxYu9eQz6GYDn3LotmmbmruEAaPff3Yrk26vfg6xl4XsOZ1Xem4iMRCUnuZJf867WXDpA9Eb0JdAtZxpRkXxDQPtb+L0U8AtCjnqDNyBg26QVISHgxSdQ== Received: from DM6PR12MB4987.namprd12.prod.outlook.com (2603:10b6:5:163::31) by DM6PR12MB4530.namprd12.prod.outlook.com (2603:10b6:5:2aa::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Thu, 29 Apr 2021 10:13:21 +0000 Received: from DM6PR12MB4987.namprd12.prod.outlook.com ([fe80::f5ce:c5a8:6aec:e308]) by DM6PR12MB4987.namprd12.prod.outlook.com ([fe80::f5ce:c5a8:6aec:e308%7]) with mapi id 15.20.4042.027; Thu, 29 Apr 2021 10:13:21 +0000 From: Ori Kam To: Gregory Etelson , "dev@dpdk.org" CC: Matan Azrad , Raslan Darawsheh , Slava Ovsiienko , NBU-Contact-Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ajit Khaparde Thread-Topic: [PATCH v2 1/4] ethdev: fix integrity flow item Thread-Index: AQHXPL9AZflRiAPi10KI0Mdesys8JKrLRj1w Date: Thu, 29 Apr 2021 10:13:21 +0000 Message-ID: References: <20210428175906.21387-1-getelson@nvidia.com> <20210429061634.3481-1-getelson@nvidia.com> <20210429061634.3481-2-getelson@nvidia.com> In-Reply-To: <20210429061634.3481-2-getelson@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [2a00:7c40:c360:2a4:8a6:7709:ae13:2a49] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 06070287-54e3-455d-862b-08d90af76ae4 x-ms-traffictypediagnostic: DM6PR12MB4530: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8LvwTZVyhXdrTKJ6EotehxNiCjGZIL94cUnb+soHeGQgAOAS/9tYuWSsX9WVb537DWiA8x4aH7/vprnx7MSQgU8pmI/PGtkfMHpKCUYqL882lnOWhh2BdcpUy6wpgu2TCCg7EYilrMU/exwNfQcC6+KT4SSJFj1dwKg/syutqDx7MDrEFht2P9xRhB3ej3MY+xzRSDWnFEScJEbv5RpE5ZgKLwfum25HEhNCXvAUgDScYOrx9MD662RC18Tx0/VWbbc5mXsyp1kcZnyLpIwFKcWRtLTtMf960MOC/Sf5dk4mvhNB+sD14X1y+UTNKLdUb7ae1MXHm59Md5W4xJP14UbmB5IQoF5t863Cp6AWPC5x2RsyNfV24hQfsQaIYAVjFYPiptCSTH4YwXaKw5J5/IhgSxC7wqVLbKuei2ePU/TWLzqM6PwMa7hJIorBOSirGToaU5pAj8LSlan/y70CaII9BdXuEWTry5AFoMDC2aiEf/9gxeCluB7bffu/MoNPgVPucddNYqGElSKPtrhJFcO1VXPpr16YFn7d2dAC78rbUObZp22k4Eo9QuaTiuk5GwKt+E3vt7Sd1DZra9f6xTnvsEcQlroQ51NJystp+oI= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4987.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39850400004)(396003)(136003)(366004)(346002)(2906002)(66446008)(52536014)(76116006)(5660300002)(66946007)(64756008)(33656002)(66476007)(83380400001)(71200400001)(66556008)(4326008)(86362001)(478600001)(186003)(38100700002)(122000001)(8936002)(55016002)(316002)(110136005)(53546011)(8676002)(9686003)(54906003)(7696005)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?8b7C2SLqXBLnXHAEvlZfLpAxb8h3XU5FZX62qclPX6RPjY893jaV9V7Ip+2O?= =?us-ascii?Q?ICPKrUfm6uU60Il1i4WO3ocOTX11a3KQBhGEXrytoRk03cFjE4Wt3U4tmtYu?= =?us-ascii?Q?A2kE42vY2oxnOBh/QZkGvyQzFnbzpKBrYiq6TlUf95hishHAujvmpgPi/ylG?= =?us-ascii?Q?yps+nAPeoh7jS26j88mhA4M5cC7mGcKEKiperPzFmwOHVqmkIGhbT8v/W7wu?= =?us-ascii?Q?gGjznAkbilFc3oc7WoyDyUmUcLTMwxGkHdYdIiP3/GcZx8qIGWxbasKNlu5x?= =?us-ascii?Q?DarPrq6P1icoD6St1KchWruaE3Wc7Nnui1ZQaOzXCDcFhphyeWhpI5LfFdxo?= =?us-ascii?Q?pwlNZjHG5dyE9l51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ascii?Q?Yw826ahpyhxxJzxVz95HcHXGusKw23UiLLl8xG0MPKORB+ShS2WtBPceV9pk?= =?us-ascii?Q?l1pm0Wks/WrMnU7T8vbD78ke+3d4CLe8fUoeyHTTXnBRMHYlyAxNHn4pjzm5?= =?us-ascii?Q?aUwCK5n8lEvU/ce/62MTuLhU1P9U?= 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: DM6PR12MB4987.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06070287-54e3-455d-862b-08d90af76ae4 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Apr 2021 10:13:21.4578 (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: FcHz42W9YHlNdtwhgAtzqZ9QKit+TlVuXd00xqKLLzi9YwQggt+elIEbAGQLfMZBwr0qE5XxQjZJHSOo62RbQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4530 Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: fix integrity flow item 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 Gregory, > -----Original Message----- > From: Gregory Etelson > Sent: Thursday, April 29, 2021 9:17 AM > Subject: [PATCH v2 1/4] ethdev: fix integrity flow item >=20 > Add integrity item definition to the rte_flow_desc_item array. > The new entry allows to build RTE flow item from a data stored in > rte_flow_item_integrity type. >=20 > Add bitmasks to the integrity item value. > The masks allow to query multiple integrity filters in a single compare > operation. >=20 > Fixes: b10a421a1f3b ("ethdev: add packet integrity check flow rules") >=20 > Signed-off-by: Gregory Etelson > Acked-by: Viacheslav Ovsiienko > --- > lib/ethdev/rte_flow.c | 1 + > lib/ethdev/rte_flow.h | 9 +++++++++ > 2 files changed, 10 insertions(+) >=20 > diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index > c7c7108933..8cb7a069c8 100644 > --- a/lib/ethdev/rte_flow.c > +++ b/lib/ethdev/rte_flow.c > @@ -98,6 +98,7 @@ 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(INTEGRITY, sizeof(struct rte_flow_item_integrity)), > MK_FLOW_ITEM(CONNTRACK, sizeof(uint32_t)), }; >=20 This fix is correct.=20 > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index > 94c8c1ccc8..147fdefcae 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -1738,6 +1738,15 @@ struct rte_flow_item_integrity { > }; > }; >=20 > +#define RTE_FLOW_ITEM_INTEGRITY_PKT_OK RTE_BIT64(0) > +#define RTE_FLOW_ITEM_INTEGRITY_L2_OK RTE_BIT64(1) > +#define RTE_FLOW_ITEM_INTEGRITY_L3_OK RTE_BIT64(2) > +#define RTE_FLOW_ITEM_INTEGRITY_L4_OK RTE_BIT64(3) > +#define RTE_FLOW_ITEM_INTEGRITY_L2_CRC_OK RTE_BIT64(4) > +#define RTE_FLOW_ITEM_INTEGRITY_IPV4_CSUM_OK RTE_BIT64(5) > +#define RTE_FLOW_ITEM_INTEGRITY_L4_CSUM_OK RTE_BIT64(6) > +#define RTE_FLOW_ITEM_INTEGRITY_L3_LEN_OK RTE_BIT64(7) > + I don't think that we need those flags, this means two option for the same = API, I suggest that we remove the value from the struct. In any case I think this should be in a different thread then the above fix= . > #ifndef __cplusplus > static const struct rte_flow_item_integrity rte_flow_item_integrity_mas= k =3D > { > -- > 2.31.1 Best, Ori