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 08B89A034F; Sun, 3 Oct 2021 13:53:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B55D44123B; Sun, 3 Oct 2021 13:52:59 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam08on2067.outbound.protection.outlook.com [40.107.100.67]) by mails.dpdk.org (Postfix) with ESMTP id 73F384122F for ; Sun, 3 Oct 2021 13:52:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TxEKuXnpKq0KETbNMWTn2Cb+gs3lFit5i7YF+phBMeuA5RC+FHzG8zFY9EDRuQKdSJLU3TRvh5CGmrhg64NHbXsVhhS+dA31gfz3UmMy4cYM05xFc8/b32l93oswr2T3hVDSMQ2g9F764QedixCB9ofnhgu9ViQ7kaYRH/xd4JkUD4K6PF0Cdzuoo5IOZD9JjW9Ih0DSqLER8PsOhYQODJ9hinrFmzxQ6mFvyB3vFnKKDcRN6vAaOURa7vurp2lcCBG7QUWHeLuXqr5IlZ3dGdCUUafx2i111MmkZXu5MRwM5um15abXwbJAfkVV1eDCsuIZFwGNbNUw+SJX8UC40g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lK8lfOh4OiLSJFOenSCTXeYp2zMJVDkVVQ+U/dXOGZM=; b=aLXZiku+bZgfj0xcOYSuEJgxtMixUhnIPWBYSSTfYXday7e6rS7b1wSKsV7BxY6aG2mnCuhr1hZ3itGc+N6QHIehxmkNXfihiMT9ThRyCvlhK3uRPJb1GpOglSBspGiYA9apJLUuYq+2UUBVPQYUxFKhOas0bHN7F9bA3lMSozPWSpNJgNMdei3oi8BhjESOfvAC6dG5neTt57R4wTevOESKspJJpnV8ERu5Oz5bbq7XsT1/VuB7AvQJbQJcWAl14OkMvXR+TMYP5e7lx1CWKUeUcjUqh6qYxgxkG0pYlJ/iIUYin46xhB4ZeNKA+zD6VfILPfiE9eie3mcTBc8o6Q== 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=lK8lfOh4OiLSJFOenSCTXeYp2zMJVDkVVQ+U/dXOGZM=; b=Ar0GBpbsdgNWlZsVFMrpxxqsjyIdD1hWxWILzIBHJ3GeTbY22lr9uuH10iF/B3n3K84lyu9mwSJkbueyq0DSbUSMuRfjVCjEjn1ZvnRHB7OE22xiKmFhJ1YJ9I6SEKw1xo/SBRmQ5FJ38bjDJ+0qFXwat5V+DrxjJmYcsr8JtBjM2U70FoF7pXIWG0NBctZydG2da63SrxJjBVgnJe2Loi9nRzvKK3VG0ndAhRZFKngdyQ6DaGwqkpkmZ765IkfpiTu8J5Mw0iIsJ32Ucd/x3vNb9ZhxrupmuOdD0mkJb/J5V0LEGjT952qk7LJLKx9Db21PJS2HmRIrmqUyhJ9fCw== Received: from DM8PR12MB5400.namprd12.prod.outlook.com (2603:10b6:8:3b::12) by DM4PR12MB5261.namprd12.prod.outlook.com (2603:10b6:5:398::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Sun, 3 Oct 2021 11:52:55 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32]) by DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32%5]) with mapi id 15.20.4566.022; Sun, 3 Oct 2021 11:52:55 +0000 From: Ori Kam To: Andrew Rybchenko , Xiaoyun Li , NBU-Contact-Thomas Monjalon , Ferruh Yigit CC: "dev@dpdk.org" , Ivan Malov Thread-Topic: [PATCH v1 01/12] ethdev: add ethdev item to flow API Thread-Index: AQHXtsrnPlQQg04+Q0+SbHfRbnqBtavBKfvA Date: Sun, 3 Oct 2021 11:52:55 +0000 Message-ID: References: <20210907125157.3843-1-ivan.malov@oktetlabs.ru> <20211001134716.1608857-1-andrew.rybchenko@oktetlabs.ru> <20211001134716.1608857-2-andrew.rybchenko@oktetlabs.ru> In-Reply-To: <20211001134716.1608857-2-andrew.rybchenko@oktetlabs.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2b439bcd-359b-4b34-bd1d-08d986645693 x-ms-traffictypediagnostic: DM4PR12MB5261: 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: 1re+axgq+r+xjutqXEHwv6nKL+cjhmN7IxUF3mjejda4qfGRB4PyLM2nsC9t7VkgWdfDGBg56N4BvOT5AL+anJUZhhNmaP3PS5rL782o5yufFXeZyi3po78/u5aWTvgtPOAYZrkl/p2yPDZwKKu3YDTtwY+NRj6DXtEJjIGK9lDV3xdiwUtv5dc/cJTjgjmYf565XzIT8kKulzWm6hdbPifVIlwMI8WBsALGIH5vHL4vb7mk6U0tgzS+sAJZkN+qTGWQLthugf3LZV66XTviQuvdL3kZPEBxYF3NZWRbXVl3UxEYz1n8K20ZAItlOU9nr+s95PstrmOpGRls+eXpdAIpJrKbLqZ5/T1NPrIncUMEImt+7/bbMx0YLNSQDl1rx2cXvLzn63GTB9JgI5ptq2z0SdwMhWUa+e7VtqAgXeprCaLhWeCYHueO22gHbTZ5QhSSGS7VvDhpx+i0lyimi4R+zhE74XSRHIcHcTlFSVBBqYNMePJc+zYVc2IIF7ltF//nj28Lq0JO3fcSB7vUJ8ZFDWwxRzKmb4cvltqxJrrhq88XnFHvedfG42EghCaCgS2Qwg42gJFAvoZXM5Ro2rr4N0QxYU2u49iLQoyCzYCOvF8/IeAanYAtw6WGgLe5JRJjg1AFYW3mtO97ETMNCVe3YWXrTBbEvFarzEgr27PUXkPBGZ3vwGwGB4JZp+AiP5AOGELTCO0dR0kFHiWcaQ== 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)(316002)(86362001)(53546011)(8676002)(76116006)(66476007)(66556008)(64756008)(66446008)(186003)(66946007)(7696005)(52536014)(4326008)(54906003)(8936002)(6506007)(71200400001)(55016002)(9686003)(83380400001)(508600001)(122000001)(2906002)(33656002)(110136005)(38070700005)(5660300002)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aQFbfe5XTeTihyX1Ad3YUBjPBxMmBALKQ+zcikUbgtkV8RmXOaJSHY+CrEbD?= =?us-ascii?Q?CwN+5JWb6hdMqApIXiTUqelYBgLMzFXhI5aLSDWpMrTFIZIsiKy7v6lcvAH5?= =?us-ascii?Q?0clMhJi2BmXWrjCCccUCmp+vhXBtw3//+KsP5teNFd4nxvZ2G/aUE10tbLwQ?= =?us-ascii?Q?9pPBr8wiOBKfp0/7oQUT4SxdE+b0mfnRkaHOZ9G80UX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P4sVg7aK+k8Tm5uhhZ9BHYJQ6c+rfvm8SMZr/PAqrtcJIVcMlV?= =?us-ascii?Q?zXEzj2HZJHN7wqMtzslzdUIcG/Kzc/TJw9SgLUvlHEwGnvFNxbL0s4Lyzn0J?= =?us-ascii?Q?VrS5tEX+lEEMoHTgra7Vf+tCzpdok6qhdf5WKmreRqtczMiQ+sQiwqDImADA?= =?us-ascii?Q?u0HR6B51T8e3XSMVTL3gcXwPwd5PRxSx52HYDMNRktIwCadN30tDgLSoiR1D?= =?us-ascii?Q?Z2QWVN4Hl2ZQuwt37L6gzN4IDkeMX16G5+WpsO+TcEGr/UJZV4lXDsz3L+bX?= =?us-ascii?Q?O2kCUlXQTrHX/EgZLGnpt9icFddr?= 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: 2b439bcd-359b-4b34-bd1d-08d986645693 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2021 11:52:55.5745 (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: xzogsGLHcG2xynFG3sOhqZ4anNkesgmXqfcuOXvkFM8kMWSEde9jSpMcPB3G3T8wRPXQo16FQZm/Z0mgdkzZ6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5261 Subject: Re: [dpdk-dev] [PATCH v1 01/12] ethdev: add ethdev item to flow API 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 Andrew and Ivan, > -----Original Message----- > From: Andrew Rybchenko > Sent: Friday, October 1, 2021 4:47 PM > Subject: [PATCH v1 01/12] ethdev: add ethdev item to flow API >=20 > From: Ivan Malov >=20 > For use with "transfer" flows. Supposed to match traffic transmitted by t= he > DPDK application via the specified ethdev, at e-switch level. >=20 > Must not be combined with attributes "ingress" / "egress". >=20 > Signed-off-by: Ivan Malov > Signed-off-by: Andrew Rybchenko > --- [Snip] > /** Generate flow_action[] entry. */ > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index > 7b1ed7f110..880502098e 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -574,6 +574,15 @@ enum rte_flow_item_type { > * @see struct rte_flow_item_conntrack. > */ > RTE_FLOW_ITEM_TYPE_CONNTRACK, > + > + /** > + * [META] > + * > + * Matches traffic at e-switch going from (sent by) the given ethdev. > + * > + * @see struct rte_flow_item_ethdev > + */ > + RTE_FLOW_ITEM_TYPE_ETHDEV, > }; >=20 > /** > @@ -1799,6 +1808,24 @@ 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 > + * > + * Provides an ethdev ID for use with items which are as follows: > + * RTE_FLOW_ITEM_TYPE_ETHDEV. > + */ > +struct rte_flow_item_ethdev { > + uint16_t id; /**< Ethdev ID */ True for all above uses, should this be renamed to port? > +}; > + > +/** Default mask for RTE_FLOW_ITEM_TYPE_ETHDEV */ #ifndef > __cplusplus > +static const struct rte_flow_item_ethdev rte_flow_item_ethdev_mask =3D { > + .id =3D 0xffff, > +}; > +#endif > + > /** > * Matching pattern item definition. > * > -- > 2.30.2