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 5DCCAA04BB; Tue, 6 Oct 2020 12:28:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 938A11023; Tue, 6 Oct 2020 12:28:19 +0200 (CEST) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id C9A9AF64 for ; Tue, 6 Oct 2020 12:28:17 +0200 (CEST) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 06 Oct 2020 03:28:03 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 6 Oct 2020 10:28:04 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 6 Oct 2020 10:28:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RI9s0IaRIpdeLyMmrHxn2AcJwup5WYwdqkuNQmIyDFZUXXUmF8lyhgMrsnWEpvuRO/Eoj1F+YaYw+vnuZbFyxGdqg21JxhVrFwxNPFGy1VIs8GNtZbEK0NtjDwwC7YQlzySes81gHugzh3NLV7ludbk1xXtJxhC0hO8SkCVB9AQMv5T9Z3lAltium6MgPURbCqolDlixsUIDOux4i88NGKgc5hDJQXYVfG6+BFu+S13wZCC1QnWIAnPnDC35DrtMlPZf3PI/TebZDKMbefQyoKZ9tgJTFNRwtjdPU8Br4WQ4fwKPAqawhGJwbrjIGs3StgJfOkK8LluRxKzVGCCcFQ== 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=M++QAUgPhfeSZw5hjQ7MosytZLF9vCmLtbw1ggapAyc=; b=mUarVEUthuP2N+mMM09reimqrrS3sKCdyeR5hvBjchghjla7rk393KCp8CKrkf9qSBlz2eDu3a1Lv0DRJi4TbQLO7Kypqpp8Bkkk983PJexOTdvy1SskX8MssCtZlN81SZeUhCLS0zkEzgnb3a5O5AbAFiJFCHZi8D8Xv2l8/4a8lehJTHzNnMVHITYJNNwzyOhnL6Mq2OnOde9hmuAKP3f8lMe4sfL/iK3F2LHGOo1TJOG4BrPk5JiMwGN+Q02p4gaHYJrI8uULdlJLjYd1g2NWtA9PRGmupdPi2ZtzTT9ZgvpqquGXnS6efHTEdNVlEJRjzNhzkSgaQxB1KedsQQ== 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 MWHPR1201MB2525.namprd12.prod.outlook.com (2603:10b6:300:e0::19) by MW2PR12MB2412.namprd12.prod.outlook.com (2603:10b6:907:b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Tue, 6 Oct 2020 10:28:03 +0000 Received: from MWHPR1201MB2525.namprd12.prod.outlook.com ([fe80::3ccb:ec09:9346:54b1]) by MWHPR1201MB2525.namprd12.prod.outlook.com ([fe80::3ccb:ec09:9346:54b1%7]) with mapi id 15.20.3433.045; Tue, 6 Oct 2020 10:28:03 +0000 From: Andrey Vesnovaty To: Ori Kam , "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: AQHWmj8aDtbCg9HVV0SvatNh/jlBEamKYNiw Date: Tue, 6 Oct 2020 10:28:03 +0000 Message-ID: References: <20201003220619.19231-1-andreyv@nvidia.com> <20201003220619.19231-3-andreyv@nvidia.com> In-Reply-To: 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: [87.71.166.102] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4017873c-f01d-4acb-1284-08d869e2820d x-ms-traffictypediagnostic: MW2PR12MB2412: 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: E/q8OIv+xUa0l67wR98p1dYmnBJnoKUAnU48hSwhGklHwxaPOlrGCdPedBqEXwz1zrv5QNxiHS1bX3o9OyQGqcbhD2mhzyd4IlzvUlwD1RTlcxLEhRkJzAIGuFFYAzo7s9NLCwr6WOADIUtqhOWoFVrvmL3ZB+PIByEP5tvhxqEBEiH3JmGuV5/gFf35Je6l1qoCqNEk7rlnY4DRSS1FM+JDJxmqOJ9J7MDYqQZsSFWiWasolobGL1z0g5ocoOdEYX0oO6bpBnGePtOso4wBtY5hV+leV5TWO6Uawv4QACtRuY3mUEiRhSqQY9Ua6sl6 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1201MB2525.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(396003)(39860400002)(366004)(346002)(26005)(478600001)(186003)(66446008)(64756008)(9686003)(4326008)(76116006)(7416002)(66476007)(66946007)(66556008)(110136005)(52536014)(54906003)(71200400001)(53546011)(8676002)(2906002)(6506007)(83380400001)(33656002)(7696005)(5660300002)(86362001)(8936002)(316002)(55016002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: eDCWNA9La3DkuTXI5mzxXwYuEI7NA0JEjJWyFkcUBtCDj/w639Hd8MLKBJpLAeNEyNlHGljJWJfsg8KjfixuIjPgJWtK5+xFBFHnuD4zKMy68AYAxHb6zih73azUXSFS/lCQnhXjCFC2bMLNF3QyQCczq4v3mYGQQARkE5Z4m1TXcAvYzQbk4Lmqvv156m/ky2RcycMPizRx66Js+ANalJ9pCTjJyqPC97GkNYXZgsQ2hy+N69GKdnpwHwl9bmP910v/rhaTM/xRIS4Q8AymNDuKj2p7ZCAz9jVF0FtdX+HeLDjsm+a8BqWcuTGVbGI7VJgjikZ1iJYuWk9T82LUq6Ebw2hp30xPRIQjCTGNGM66yYi1JZSyks3OwW44h9dcUNE2RuJEPZFIFtQcqT3MSYXBgTE7ms3U/SzoaOVdmPw1U32WVRWMiIP0jZQa5Ca1UUk/toYF4QhXc5pyqqKkmabveT+ea0jQqDBtG/OhCoW8EfvNWD0337kAnvB6h/Y9LvEdidutmG1AsCvefLR1sb1qJBXvaBGxJE0uIss4H/woAnrAhVIkdt4tAjsmC9rm768X+6w5bg9JnS769mM39CXPQ7WtMpSP6FANvwGaIFecxwsFI6cFhcrvf5qQKJXfmcMJ4OKz/P2o6ixhNsf4Sw== 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: MWHPR1201MB2525.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4017873c-f01d-4acb-1284-08d869e2820d X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2020 10:28:03.7395 (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: fAnDYRmwlcN7yDvZh4sq4bAdXl1yIk9TlCI8KmSkpmCroTQuA5bq40avL1AgDcBBDcJlm+q+XxUFkIGBQk/IAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2412 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601980083; bh=M++QAUgPhfeSZw5hjQ7MosytZLF9vCmLtbw1ggapAyc=; 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=cy96ywoKFLmt9Eh6K45R2gQUdzHQfTNPnaJLNP1T/ftmKCEyc/TQeAsYMnrF30DID CXUYmY4q+1wh0Xy/xzgfCcPkxBuKeWYrJ4KbdgWEXHnT3+RAt/mZ7BQYo8kZscwgr+ UvsRqdFOCH/v16FZdzuQqrWH/QuF2t3xuPKwVqqdTFQsHZL9CI0Q9QxVYV0mB+gO4M ZAmJ+c/udbT+c2l7MDeaqnPtK5ecy8n4TES0XEKWajoyD66WeUo9jxnVMo9rBFYQgF 4qginLZICNVMD/PupO7DCGezYHqW7v2nSA5BHQr1sQUK7Q0jDaXfiY4fG+Q+FL7WGo q97vEx5TKb5Sw== 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" PSB > -----Original Message----- > From: Ori Kam > Sent: Sunday, October 4, 2020 2:11 PM > 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 > Subject: RE: [PATCH v3 02/10] ethdev: add conf arg to shared action icrea= te API >=20 > Hi Andrey >=20 > Why is this patch not part of the previous one? Got it. Will be squashed. >=20 > 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= API > > > > 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. > > > > 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(-) > > > > 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, > > > > 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); > > > > +/** > > + * 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); > > > > @@ -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); > > > > /** > > * @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