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 C9ABDA0546; Thu, 16 Jul 2020 17:05:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A89541BFA5; Thu, 16 Jul 2020 17:05:07 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60040.outbound.protection.outlook.com [40.107.6.40]) by dpdk.org (Postfix) with ESMTP id A7F041BF67 for ; Thu, 16 Jul 2020 17:05:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DIdW9E0VM7eBEo1fQLwg9iu5Jdmrwlpve5XcikUOybTIGVTHyqgXLgAeUozpIcQygDYr9/ecU01twFnzWHQPJZFJ1BYPgtEtu/fNbdRoKSGKkxDCdt5f54IfHm1HB8t2mazM2ZfHO1T5bOiJZtBxr9t6kcRKXDDmqKRu5fY055lF88RcNMKS5J1iOz04b+tINCenqBR4xteAeR7GgezkGCqyfX6DgKTrsZvaIoXXvjq7WhU1AfBAlBdbWTukJLcV4QBuM9i4oztPZW8pztMMrQ4ubDYSGETCeyRUSMpnXyfFNjy0BcQcs3FbNn7wgvSg8xmJzx1pFEzSW7t4j6av7w== 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=7jmtOEmvF7NDJB/MXaBN3IUY6/zCSQO7/BVu2PEciiQ=; b=U+X4sohbX+PV4XipnJkhAxg3o8noDgdsXoone2enMf9a0cVnsK/oHSfelFbDZHLYSpyO/o70aXKhEOqQgUpYLDm/GUzZoToCPQ9Hy3YWblfsH5cAC5qdkHDQv5XTASap53y32ktl4lDYuUmAEPSHltOPhr/J480rjw22psdPKU8BJbqNHpASLIggNtPqaJ9JV5zXrP8eZcU0chZ/pG4uopsgAGzdI1719jFsO6hB8+uZYnOW/OJhaRhsiAW8OswwfH9kRWnHmsy5HwwLQphCa3qanEyGyOmq5lWNHcKZ/Bjd6N05dL5sJmNOwMx9rIZJBsuGmjonNzD9jHDJ5c1esw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7jmtOEmvF7NDJB/MXaBN3IUY6/zCSQO7/BVu2PEciiQ=; b=KrvmrIlaGikCl97m7pJcSiBCF43td7bhLg1vDmXN+oSTgsY7efRq1DwC02h4HfJSnHVq3n7jyWXJCnvH5PaSk/gA1hS96WkCzYa+7aA+gbUWJcUhAbP5CIKvtgHJY41ppwTxivDzb8+4TanBkK7G7yNiL5eAuu+5Lujxq4hk+Ck= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (2603:10a6:205:8::26) by AM0PR05MB6737.eurprd05.prod.outlook.com (2603:10a6:20b:159::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Thu, 16 Jul 2020 15:05:04 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::194e:dc46:7543:50ed]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::194e:dc46:7543:50ed%2]) with mapi id 15.20.3195.018; Thu, 16 Jul 2020 15:05:04 +0000 From: Slava Ovsiienko To: Bing Zhao , Ori Kam CC: Raslan Darawsheh , Matan Azrad , "dev@dpdk.org" , Netanel Gonen Thread-Topic: [PATCH v3 4/7] common/mlx5: adding DevX command for flex parsers Thread-Index: AQHWW3zKkGkUw+yhnUqkDPWX+thwVakKTfDA Date: Thu, 16 Jul 2020 15:05:04 +0000 Message-ID: References: <1594907399-63329-1-git-send-email-bingz@mellanox.com> <1594909426-64843-1-git-send-email-bingz@mellanox.com> <1594909426-64843-5-git-send-email-bingz@mellanox.com> In-Reply-To: <1594909426-64843-5-git-send-email-bingz@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 17965ea0-5cc6-4e73-1ab2-08d829999f1b x-ms-traffictypediagnostic: AM0PR05MB6737: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gtZU1bQtpA1z+p/RmRMSjGulXnQ35gSQGr5vboovqGM4v2R4OCqx8KmC7OtwuwPBJCHbN/HIa9IHH1E7yRZ0KMmcJc4zMFY0N/LvVYZ9Kqxt4P3CpwEvwHTnI2nnGfkLpUUcw7dHluM8l0+tSxnbBo1ni7U8JTs0dwj1ktiwI8/of4/Q9uMcD1TvXcosamRVbIdMA5e8aYDOdt+sTdzoxjQ1m2Uq//Ok7RVXco1WeZ5yxUA9pnu8L6xku1pgrWiOqjx1m/IjUcASM2vz0pFzvhlVzf+ctZ6G5HVtf5zELg/Np3W3AQYd3mJik3rnTbtu8vVV53mtPJFg/AwCQnkeQQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM4PR05MB3265.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(346002)(366004)(376002)(39860400002)(396003)(54906003)(9686003)(52536014)(71200400001)(110136005)(33656002)(4326008)(53546011)(2906002)(316002)(83380400001)(66946007)(6636002)(7696005)(55016002)(26005)(107886003)(478600001)(86362001)(76116006)(186003)(8936002)(8676002)(6506007)(66556008)(66476007)(5660300002)(64756008)(66446008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: tOs2saTRZePQXtKhEoc+vwM5B7XM69+qLZDwMWYwe62yfoL0YiN+U/kxzW2ecL36W7OehfPSKsfECwWOkJKYUK2/4gt013Mqrz8hhMGsDXZYYrzSNJJ+t5RMgwb4FLmbyC9CqkJybazv+Ecy4Fp0OW78mLh7raVqXZiw5l8Rv7oEXxQk1YExuqU2OKHgTQnGfpdbJzv1oiO0cHU8U9HsJWT2/58sc8j8VODZL4mN9CYomtKHqZXU5iV5zlG7ZxRnzmhe4fAWROsoQTzTa/HOmlFda8z8dvKMwW/Gwi9hWQfXvMdPBI1P2M+r/0RQOFtyt4j7GZ1eXkANVTmyuq3hO7AcRa+enFnzqNJWzwHR4c1U6cRqeghIcKiXjL1HVXEQpjkN48QL7GaM2B3M1RQfKD9V7QkaaAGf4ULBJBL+NqFdDPJ6bwEQ53qHRbllgy1KSdD8bnhWSc7fVUNjLVkhIrrguaT+/E8Z/Bj973e+LT8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM4PR05MB3265.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17965ea0-5cc6-4e73-1ab2-08d829999f1b X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2020 15:05:04.8164 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ZZ6nj3swlq55AIwR/quAQVxYTbhCZVHAaPLtPFcxqWnBJDQaQVCu7sU5P4PiK0HicLduXG2bM0bftBczBJIn886Ij6Z7TatDN86XrqEsvLg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6737 Subject: Re: [dpdk-dev] [PATCH v3 4/7] common/mlx5: adding DevX command for flex parsers 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" > -----Original Message----- > From: Bing Zhao > Sent: Thursday, July 16, 2020 17:24 > To: Ori Kam ; Slava Ovsiienko > > Cc: Raslan Darawsheh ; Matan Azrad > ; dev@dpdk.org; Netanel Gonen > > Subject: [PATCH v3 4/7] common/mlx5: adding DevX command for flex > parsers >=20 > In order to use dynamic flex parser to parse protocols that is not suppor= ted > natively, two steps are needed. >=20 > Firstly, creating the parse graph node. There are three parts of the flex > parser: node, arc and sample. Node is the whole structure of a flex parse= r, > when creating, the length of the protocol should be specified. Then the i= nput > arc(s) is(are) mandatory, it will tell the HW when to use this parser to = parse > the packet. For a single parser node, up to 8 input arcs could be support= ed > and it gives SW ability to support this protocol over multiple layers. Th= e > output arc is optional and also up to 8 arcs could be supported. If the > protocol is the last header of the stack, then output arc should be NULL.= Or > else it should be specified. The protocol type in the arc is used to indi= cate the > parser pointing to or from this flex parser node. For output arc, the nex= t > header type field offset and size should be set in the node structure, th= en the > HW could get the proper type of the next header and decide which parser t= o > point to. > Note: the parsers have two types now, native parser and flex parser. > The arc between two flex parsers are not supported in this stage. >=20 > Secondly, querying the sample IDs. If the protocol header parsed with fle= x > parser needs to used in flow rule offloading, the DW samples are needed > when creating the parse graph node. The offset of bytes starting from the > header needs to be set. After creating the node successfully, a general o= bject > handle will be returned. > This object could be queryed with Devx command to get the sample IDs. > When creating a flow, sample IDs could be used to sample a DW from the > parsed header - 4 continuous bytes starting from the offset. The flow ent= ry > could specify some mask to use part of this DW for matching. Up to 8 > samples could be supported for a single parse graph node. The offset shou= ld > not exceed the header length. >=20 > The HW resources have some limitation, low layer driver error should be > checked once there is a failure of creating parse graph node. >=20 > Signed-off-by: Netanel Gonen > Signed-off-by: Bing Zhao Acked-by: Viacheslav Ovsiienko