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 1D96FA04B7; Sun, 4 Oct 2020 13:11:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF8C81BC8C; Sun, 4 Oct 2020 13:11:43 +0200 (CEST) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by dpdk.org (Postfix) with ESMTP id E63121BC0C for ; Sun, 4 Oct 2020 13:11:40 +0200 (CEST) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 04 Oct 2020 04:10:45 -0700 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 4 Oct 2020 11:11:27 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 4 Oct 2020 11:11:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BHGLPoTtO9FEB5irTgPIf3rq599E7jTK4L0+Yu4RD+Ux4bZO6MbWMLgFlVCEhOk8CX+NozwTgoUV94RkkNmpMNj4yFywnlbWPXvxc5IwRHh5FgdVzABlJHpYff4u7jDNn3j73xD3tPxURAd0+oe68lRj3n84HVK8Vma/NmPC5sJoZDDBMAF3WV+5zwzeMEsFweHYEvNS5+HKdWB8XjNur605bzpcvYXNLW2WUgToGGEi2x45kqjgcEq/F+G/nbbhyCMZfwPzNbv+KdIU/JmE4nyy7HYhxaAxzyWUibaStEMG1fYJdSMB+q8dKmriklQo3U8yqiOkSTBMULImMBydMg== 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=5psEUIWXKDt8z9Pt4YSXJtvBAAhDEUNCAzIGeJzD6Ns=; b=kpPP2ZxsLJCDPiEPd5wikGsz3s41k8Pg4TELYGs0QOWkV890+2ytFhLhclaTKErchm6K94rOHf+Vs/pAWYHq3VFfvjznGi6uq/WG2ffDol7wNFdwKi4jTTvSQHvi+HrQH/LeKFPi4EkY6pdAlzA+h7KJ4P36rB54/Ayq4bo3iJW1TJLBBsPvLLXSHFtb8CfoSYNpBMRas5lmJ0K3IbIkjfRwuqTJckHZz8OGVlFgio7Ua0KsQKwI9zbfMP5eW6v7qmyN4fJYvOd+uoVnA5yjV5SrfBlWJ8xXxIfTvBjFhlqBx5eKErAJd5ETpOjbjClYPeNzrXMiLiO5iXM9KnLDEQ== 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 Received: from MN2PR12MB4286.namprd12.prod.outlook.com (2603:10b6:208:199::22) by BL0PR12MB2434.namprd12.prod.outlook.com (2603:10b6:207:4d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32; Sun, 4 Oct 2020 11:11:26 +0000 Received: from MN2PR12MB4286.namprd12.prod.outlook.com ([fe80::61fd:a36e:cf4f:2d3f]) by MN2PR12MB4286.namprd12.prod.outlook.com ([fe80::61fd:a36e:cf4f:2d3f%8]) with mapi id 15.20.3433.042; Sun, 4 Oct 2020 11:11:26 +0000 From: Ori Kam To: Andrey Vesnovaty , "dev@dpdk.org" CC: "jer@marvell.com" , "jerinjacobk@gmail.com" , NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "stephen@networkplumber.org" , "bruce.richardson@intel.com" , Slava Ovsiienko , "andrey.vesnovaty@gmail.com" , "mdr@ashroe.eu" , "nhorman@tuxdriver.com" , "ajit.khaparde@broadcom.com" , "samik.gupta@broadcom.com" , Ori Kam , Andrew Rybchenko Thread-Topic: [PATCH v3 02/10] ethdev: add conf arg to shared action icreate API Thread-Index: AQHWmdGTGU0mp6IIH06TxM/OcuklIKmHSkdA Date: Sun, 4 Oct 2020 11:11:26 +0000 Message-ID: References: <20201003220619.19231-1-andreyv@nvidia.com> <20201003220619.19231-3-andreyv@nvidia.com> In-Reply-To: <20201003220619.19231-3-andreyv@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: [147.236.152.129] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dba9926c-fb50-41ea-8087-08d868563c69 x-ms-traffictypediagnostic: BL0PR12MB2434: 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:4125; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: irkQaZfJCXwGNgLfLOMo1czVUft+7LF4VQFxa0LHywCT5mbNneYcB0f/hV2LhK7q7bkRy2PyFWZgsD4ZYMU+bBpAaliFzQjLDo84cp9gfHnVbxL1vtyACQMURY1xfkC/Gg7vEw4ZyMY9ZdlED+rhy44b7i20qfJh+aYpvTkUa4BOVlD5xUCq8+K/y5s4RJ0qtKBO0oG61UMHeta/u/aZQuq30JL/wTjk64BLyoxMPdlPL3X4CnhD4364UbcSS23n4oeFBrdvNSJW0pcbyVlCb5S6AQ8HEnEfDCcSFJwIZVrs3jFyLkUwBqdtJikn6jkn x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB4286.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(376002)(136003)(366004)(346002)(8936002)(71200400001)(2906002)(86362001)(55016002)(8676002)(186003)(7416002)(76116006)(6506007)(52536014)(66446008)(64756008)(26005)(4326008)(83380400001)(316002)(9686003)(54906003)(110136005)(53546011)(66556008)(66476007)(33656002)(7696005)(478600001)(5660300002)(66946007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: shGquXGrwJjNxBrkJRN6ZG36r565dASYrXBOskJRN4F3GjqnVfgILJOkNZdbvP9u1m9cWoACIcq63qUTwdaj8RKu5Vt/UWuhaMAHsV14yZCwR/tHvdMknZv8A9U84ktUM95aJ9s4Wqk6kuNnbLqrGLiQMpk5IbTLcFeA0smh3aI4zOB2+I2rhvdtuXEVJu2lV2VnJUHQ4SB1YZMo/qqMezauLIvxBGz0RaKVvMkVl847B0Fu6h/PIbU3gUxgNfwftcP9SJhqStNrqIQkMrbNwBkSZwi6LMOqYcAsDkfoYx0PrJ4zww9fDkcBsSwMjbsUzkXisxecsd4IjG/ayNXOfbS8nlZ+7yooxi/3vhz61AB0dWMiwyC4dFZWMUuQgcuG0gQ2YAPCcBi2bsccooDqqJGFUPYSVdEM1qToaqWzbK5+b4Flee/O7tDm2w9ngcMxu14Mrh1EmeYGinQW+OPisZcVSxhxdIxDNOISyzuY2YQTiiBMihvUWI7fmrsHPv2D5nCuZfJjeAaWIzMeTNRFVfkLH55LquxnRhXHlypz84rE3lJUfwk5M/jZPUVyVBC20ki5ycGxy/QM4ekwJJefxfokrpxD+eRSR6jKi+TV5uCcZDVGIVVZGYX9QQGd5YdgwQnO5agkH8DEOtloOJDl0A== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4286.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dba9926c-fb50-41ea-8087-08d868563c69 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2020 11:11:26.1016 (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: PePRE7DmTvDQZj/4a0sysYk+kAD7WQy3YtRznX4CkM3MwB3XUeaa1JGcAykXFRhEXi5FPw6vMX6MfhH6hrmuLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2434 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601809845; bh=5psEUIWXKDt8z9Pt4YSXJtvBAAhDEUNCAzIGeJzD6Ns=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=aZK5gB5NMlEromo91AQfDCqOZ30q1/ZpRbIx2MZl17+UG6vj/Q8vo2OcvREMiQDuP ema93geOhjviu6kmi3nI+p6NrpMHkXMBaiDZtQgUQG9gwWKdvGeCEXOC4UVeqWUaXp K8mi5Bn7pHSd4CVkBsKav6nTmxTEjNq++f6O+1u872nxatWNgb3duSvSIA6nssBptQ pMxODCnfwHIZYrjepe2Fr/Rrr3+HzairrZtN0Fn642IM78gftqNaQJxjm/1vronmI4 CCbpOnmPfZn9rZejndFCqK347rcWJSTTtA1ug8a2bNBOoXU60/pmZL1NdY36NI+YiP yVKPGduuqlYsQ== Subject: Re: [dpdk-dev] [PATCH v3 02/10] ethdev: add conf arg to shared action icreate API 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" Hi Andrey Why is this patch not part of the previous one? Best, Ori > -----Original Message----- > From: Andrey Vesnovaty > Sent: Sunday, October 4, 2020 1:06 AM > To: dev@dpdk.org > Cc: jer@marvell.com; jerinjacobk@gmail.com; NBU-Contact-Thomas Monjalon > ; ferruh.yigit@intel.com; > stephen@networkplumber.org; bruce.richardson@intel.com; Ori Kam > ; Slava Ovsiienko ; > andrey.vesnovaty@gmail.com; mdr@ashroe.eu; nhorman@tuxdriver.com; > ajit.khaparde@broadcom.com; samik.gupta@broadcom.com; Ori Kam > ; Andrew Rybchenko > Subject: [PATCH v3 02/10] ethdev: add conf arg to shared action icreate A= PI >=20 > Add configuration argument to shared action create interface. > Currently there is only ingress & egress fields but more fields can be > added later. Shared action configuration & implementation are PMD > specific. >=20 > Signed-off-by: Andrey Vesnovaty > --- > lib/librte_ethdev/rte_flow.c | 4 +++- > lib/librte_ethdev/rte_flow.h | 17 +++++++++++++++-- > lib/librte_ethdev/rte_flow_driver.h | 5 +++-- > 3 files changed, 21 insertions(+), 5 deletions(-) >=20 > diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c > index ba3f01f7c7..9afa8905df 100644 > --- a/lib/librte_ethdev/rte_flow.c > +++ b/lib/librte_ethdev/rte_flow.c > @@ -1255,6 +1255,7 @@ rte_flow_get_aged_flows(uint16_t port_id, void > **contexts, >=20 > struct rte_flow_shared_action * > rte_flow_shared_action_create(uint16_t port_id, > + const struct rte_flow_shared_action_conf *conf, > const struct rte_flow_action *action, > struct rte_flow_error *error) > { > @@ -1265,7 +1266,8 @@ rte_flow_shared_action_create(uint16_t port_id, > if (unlikely(!ops)) > return NULL; > if (likely(!!ops->shared_action_create)) { > - shared_action =3D ops->shared_action_create(dev, action, error); > + shared_action =3D ops->shared_action_create(dev, conf, action, > + error); > if (shared_action =3D=3D NULL) > flow_err(port_id, -rte_errno, error); > return shared_action; > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > index 02391316cb..8a2db4f6da 100644 > --- a/lib/librte_ethdev/rte_flow.h > +++ b/lib/librte_ethdev/rte_flow.h > @@ -3380,6 +3380,16 @@ int > rte_flow_get_aged_flows(uint16_t port_id, void **contexts, > uint32_t nb_contexts, struct rte_flow_error *error); >=20 > +/** > + * Specify shared action configuration > + */ > +struct rte_flow_shared_action_conf { > + uint32_t ingress:1; > + /**< Action valid for rules applied to ingress traffic. */ > + uint32_t egress:1; > + /**< Action valid for rules applied to egress traffic. */ > +}; > + > /** > * @warning > * @b EXPERIMENTAL: this API may change without prior notice. > @@ -3388,6 +3398,8 @@ rte_flow_get_aged_flows(uint16_t port_id, void > **contexts, > * > * @param[in] port_id > * The port identifier of the Ethernet device. > + * @param[in] conf > + * Shared action configuration. > * @param[in] action > * Action configuration for shared action creation. > * @param[out] error > @@ -3404,6 +3416,7 @@ rte_flow_get_aged_flows(uint16_t port_id, void > **contexts, > __rte_experimental > struct rte_flow_shared_action * > rte_flow_shared_action_create(uint16_t port_id, > + const struct rte_flow_shared_action_conf *conf, > const struct rte_flow_action *action, > struct rte_flow_error *error); >=20 > @@ -3432,8 +3445,8 @@ rte_flow_shared_action_create(uint16_t port_id, > __rte_experimental > int > rte_flow_shared_action_destroy(uint16_t port_id, > - struct rte_flow_shared_action *action, > - struct rte_flow_error *error); > + struct rte_flow_shared_action *action, > + struct rte_flow_error *error); >=20 > /** > * @warning > diff --git a/lib/librte_ethdev/rte_flow_driver.h > b/lib/librte_ethdev/rte_flow_driver.h > index 72bfc3b7a7..adaace47ea 100644 > --- a/lib/librte_ethdev/rte_flow_driver.h > +++ b/lib/librte_ethdev/rte_flow_driver.h > @@ -111,8 +111,9 @@ struct rte_flow_ops { > /** See rte_flow_shared_action_create() */ > struct rte_flow_shared_action *(*shared_action_create) > (struct rte_eth_dev *dev, > - const struct rte_flow_action *action, > - struct rte_flow_error *error); > + const struct rte_flow_shared_action_conf *conf, > + const struct rte_flow_action *action, > + struct rte_flow_error *error); > /** See rte_flow_shared_action_destroy() */ > int (*shared_action_destroy) > (struct rte_eth_dev *dev, > -- > 2.26.2