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 65F0DA054F; Mon, 15 Mar 2021 04:05:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC26B4068B; Mon, 15 Mar 2021 04:05:50 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id D38A74003C for ; Mon, 15 Mar 2021 04:05:48 +0100 (CET) IronPort-SDR: i9+T61ZaQlgZEc+Ooo8bHMvovRjRMD2OGgOvVIlw8gqqiTsJqvqWbaWgWi8+apPuCFJOLCb8Gp mDigA7p5jM3A== X-IronPort-AV: E=McAfee;i="6000,8403,9923"; a="250394509" X-IronPort-AV: E=Sophos;i="5.81,249,1610438400"; d="scan'208";a="250394509" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2021 20:05:46 -0700 IronPort-SDR: Jo861inOcrAzve9zOLKzx86LDsomMSZ1UCfJorFcbZ3SB+PrkPEfbOtTRmo5jU3lYCewT/LZ8f bk+pQ3rmClGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,249,1610438400"; d="scan'208";a="411692550" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 14 Mar 2021 20:05:45 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sun, 14 Mar 2021 20:05:44 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sun, 14 Mar 2021 20:05:44 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Sun, 14 Mar 2021 20:05:44 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.175) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Sun, 14 Mar 2021 20:05:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SXcWOIwDHbCeBVEIWxVIES0dYuItn/+D9eeOUTU3fNpPeqUD6BhD4h0Q5YE69qwur/moN//zphd2wKGt/lkaaEbKGy9E5juoMibT1505/CRI3D7Dly5x4HPnRiHLL7GB87VnXDPBN4Nrvy44GsNiqnMFfTfYxonMXvtkzNYH9ocJT2OqxYdpgXCMK+1nN1OJJ1F1wklWRAZF7Uturp59NnyQyhlc2JNoAy1062uFJ2h/qgiVZPDDJ091lnnpfb6rP9Hwq3eSSQE+caG0rFGNo3Qc0ghspT5iPf50wSoI4ZZ1ZTq+lB58home2y7OO4vSPYlop70axkM85OF9rqyqMg== 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=hxjfI4aLJz61ormygKO+NV0DEFDXSR9ASTVx1WAGJJI=; b=EmR0HlIphp4r8vkzTKvGhKlMu+sx1TzgHR6eb/zrkxCBq3aNVML8hHcQxw/Iw7A3YRNt94DJpAzHY08Kx9wYQCQ/OMCizUbOfJXTUgoYKx0N/9oHgImzq+mGx5FHvT/uD4Yvt7Phq8/4UhTw28VTqVRNQS0AC7uDH1JFI3HR/dz4jYHhdv1ZCnuk0wQkFTYC1ZQe7Gb9r9pvOO+xZkT6XqkKCpekrtQ+sSkfCHmWyiEi94bf/61i2FhVxhp6k2gtKJjKpkp0IPtKs8NapUO7tLwtsJGBZ33PPpKFjN359kYlHFeNMmHP0x48AgFBC4+tSy9nhMeXLPUcKA5Lkpt8Dg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hxjfI4aLJz61ormygKO+NV0DEFDXSR9ASTVx1WAGJJI=; b=zNxN9yujGqXB931q9uOd0mkY9DmDP7FBhTGXVjiXNfhyq2/z5QabqVe7dC9crfiOahBVBHNlYqzLrk3NkqprMRGmeHy52NtFInj0iRnNMuEHLA5wJmcuG0EC9RfoQkIz0FQJ5BzxwpX9L4i3USghQ/KcTkNSRiZsg2sYB2NBtFY= Received: from BYAPR11MB2901.namprd11.prod.outlook.com (2603:10b6:a03:91::23) by BY5PR11MB4150.namprd11.prod.outlook.com (2603:10b6:a03:190::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Mon, 15 Mar 2021 03:05:38 +0000 Received: from BYAPR11MB2901.namprd11.prod.outlook.com ([fe80::4447:5f1e:984e:57f3]) by BYAPR11MB2901.namprd11.prod.outlook.com ([fe80::4447:5f1e:984e:57f3%3]) with mapi id 15.20.3933.032; Mon, 15 Mar 2021 03:05:38 +0000 From: "Xu, Rosen" To: Thomas Monjalon , "dev@dpdk.org" CC: Ori Kam , Ajit Khaparde , Somnath Kotur , Chas Williams , "Min Hu (Connor)" , Rahul Lakkireddy , Hemant Agrawal , Sachin Saxena , "Guo, Jia" , "Wang, Haiyue" , "Daley, John" , Hyong Youb Kim , Gaetan Rivet , "Ziyang Xuan" , Xiaoyun Wang , Guoyang Zhou , Yisen Zhuang , Lijun Ou , "Xing, Beilei" , "Wu, Jingjing" , "Yang, Qiming" , "Zhang, Qi Z" , "Matan Azrad" , Shahaf Shuler , "Viacheslav Ovsiienko" , Liron Himi , "Jerin Jacob" , Nithin Dabilpuram , Kiran Kumar K , Rasesh Mody , Shahed Shaikh , Andrew Rybchenko , "Singh, Jasvinder" , "Dumitrescu, Cristian" , "Wiles, Keith" , Jiawen Wu , Jian Wang , "Yigit, Ferruh" Thread-Topic: [PATCH v2 1/2] ethdev: replace callback getting filter operations Thread-Index: AQHXF2fRjE+KpRpoYUGKE/3Gc8pbI6qEYEYw Date: Mon, 15 Mar 2021 03:05:38 +0000 Message-ID: References: <20210311221742.3750589-1-thomas@monjalon.net> <20210312174645.162801-1-thomas@monjalon.net> <20210312174645.162801-2-thomas@monjalon.net> In-Reply-To: <20210312174645.162801-2-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.5.1.3 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzMwNTBlODgtOTIwZS00YmRkLTgyN2UtZWYwNzgxMDJiMmZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWiszeGNybVJEemthcjE1U0xzeGhZOXJqaFd5bmx6dHFPaDZBek04cGxma3JPdTlsZEhlZEdMZmxJZ3ZwRDlyZCJ9 x-ctpclassification: CTP_NT authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.54] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3479b99b-a3e3-4edf-b96e-08d8e75f3619 x-ms-traffictypediagnostic: BY5PR11MB4150: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Y3SX4lHyAhhMRSwBdTL4Z2bMd7jkSuaVVsxglqjU6fQVLC3tY9agNiqOlJwPbGxd5rlrYRhub4AGRyk8BjTD1DoMhQ/lSvmaTZ0BOcjlRe0VWEZaUeYAPOHPMXJ1DAq0qSqvSWbELr29YAZRSe5rWsELlyxA1p5oLUZkA80apJpy1ejEMdijl0OOH+EOr4hKC5r/eGCub/kCNQDy6pToLO1Gd4w0IjbLctysR2nZtCWI7rRhF2VhHMjMaKqwEMS7VXVDc1qtZPw9gzbwZYXh7cndgii5oJjHltFRfQOrrxCacVMzEW9u1qGYJ583DRPZzWunfgwPjny+5uHAp3gBKKW8nXji4OXnBRZ/i1U4XGrTkAo0Sz/FUD6k+wnlYBgBLROHcrGTZDcra/JV63w5y7C0Xkx5msAVHqNfdTomM6lS2YGBB7Q7eXel37mbyQ4dNW0Qpc4ViqDIGxKcFK4nscY+XYvO53ZqHDBs7bC86L6xAmHIZ3+dNDJ2y2r7Tdw/r1N2EVARaNpJ0Tf1prWHwqnsTJ48xzNY3WhmN1+sDN/a8NxID5toIksIMvTBfOxQ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2901.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(136003)(366004)(39860400002)(376002)(346002)(478600001)(110136005)(8676002)(4326008)(316002)(33656002)(83380400001)(66446008)(54906003)(71200400001)(7696005)(53546011)(6506007)(66556008)(66476007)(76116006)(7406005)(8936002)(66946007)(5660300002)(64756008)(55016002)(107886003)(9686003)(26005)(52536014)(7416002)(86362001)(2906002)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?waUFXlKMGpPuBpMEl9SyeDYx8FgF8OQKm+sMoiAOIbmqZg47OIh+EyOuoEU+?= =?us-ascii?Q?6jOhnBoj6HZXwCUvBMg78OO+VYVaQc9QWe/rDFxU2OfBGp2y8ac5NP5TINWE?= =?us-ascii?Q?ZR1LMTKqVeFpxdAkLbbfq46xpaeFGF0kwQgRFShmRho3gPwFzEtlOd257b20?= =?us-ascii?Q?cPx7i4V4U9WWkdk9AB2rkuB+BtwyZA5a509yaBl4Kly14O52Ld5uzw1rFi3M?= =?us-ascii?Q?DbO5gggDgBPjLQS0tYy2fWqa/ss3TDnuZLKw/tuVE/2C892FjvPwhXBtoHKp?= =?us-ascii?Q?mwGVP/RFDTyVeG80x4S+PrnerwGxDOM5y+67TO7zZkNXELeWn7JkUCiQ9UeH?= =?us-ascii?Q?q0jwdqfUw3NO1qwFr0C83vqlYPdQVqBDJYwKmvFWDwuzK5kjXQp85LntKvWU?= =?us-ascii?Q?V6zpzi5RTBYKbMq5D1ud1VG9Ed1koh1vnUS0i6z9sUb+a5K773mdmPgVmmy3?= =?us-ascii?Q?LnyrZ7Xh5cuVBd32sx+Z+HejXCgwlX18u95zfI5cQjnG6Zxa5oYZZsz9/zTa?= =?us-ascii?Q?lTX8J9CwbYUEzm493aRy1cmgIs+GQKvZx3p+m7qEvT+Wh2IqlCyA3LcuRPrz?= =?us-ascii?Q?G0jXcQiTjzk1qa13zA69uBok8dVCWEHmUobQsd3pNBl5e+W3llQODeVTzurX?= =?us-ascii?Q?JLJ6dD+1XxkzVOZ+G/jyFVjyI36nEcQUMddF2HYVbR9qTJ4JziOzU7sYJXhM?= =?us-ascii?Q?u+ry8R32rhmSQG0U25igJiVEDNH5s93WMVHvKqBBR2V/fJxWVLztg0gQbrQ1?= =?us-ascii?Q?MWVudJmU7ZFlaoHu0rzjFM8ATsvmNbJQEemvF/AgJ1KF9P2d/SXE1FP0IIEv?= =?us-ascii?Q?bBWh2DBcIcGurTCQM5WI9RUkw+kVIA8MihfL0DjiBZNqc6TyKlaOfAEAzSXJ?= =?us-ascii?Q?363YRtXcOV+iMXAKUjrnMi4l0t3ZzvCQNCfBKnRNs6mQ+QIquv437ulSls4m?= =?us-ascii?Q?GntGF3o4KOURKvOPuVNquueMqpU0AiQWpsmsYY2MnLf/OsKWtuCMh2ysNYyz?= =?us-ascii?Q?wMeCZbLLieweYKxNOWJ713YmACJbrJE3wucj7leUkCe5KGF1PkzajH56m9Uz?= =?us-ascii?Q?D+f7z9qKpehsE763RIivk60hIWNHn1mX2NzACMM69p9F3J8h7DWNw9uQid2T?= =?us-ascii?Q?LBh6HSzYVy89l6/dMG/ouJ7ms9W+uEtF9fc6y8nOmCOlNXTwB6JRagawurTM?= =?us-ascii?Q?cVQe4MT1P1YOAjj3kORZFahUDW03XWsJK4lY8BqY9iIJSXBbSTvDe0tN/tiW?= =?us-ascii?Q?EdxZQfXhUtZazXvoN90w4OKkoE3/rM8QAQ1sO6XNtI5stILTr8KpkztdcN5n?= =?us-ascii?Q?TQw=3D?= 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: BYAPR11MB2901.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3479b99b-a3e3-4edf-b96e-08d8e75f3619 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2021 03:05:38.6031 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zp2YpuOWU5q4mSG+auHiPzQzuJaXdjVvCNPP0obDIW7KseHqi4O75LY/A1SyKPx8YWExlTIUNf5bqAp5/CLU4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4150 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 1/2] ethdev: replace callback getting filter operations 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, > -----Original Message----- > From: Thomas Monjalon > Sent: Saturday, March 13, 2021 1:47 > To: dev@dpdk.org > Cc: Ori Kam ; Ajit Khaparde > ; Somnath Kotur > ; Chas Williams ; Min Hu > (Connor) ; Rahul Lakkireddy > ; Hemant Agrawal > ; Sachin Saxena ; > Guo, Jia ; Wang, Haiyue ; > Daley, John ; Hyong Youb Kim ; > Gaetan Rivet ; Ziyang Xuan ; > Xiaoyun Wang ; Guoyang Zhou > ; Yisen Zhuang ; > Lijun Ou ; Xing, Beilei ; Wu, > Jingjing ; Yang, Qiming ; > Zhang, Qi Z ; Xu, Rosen ; > Matan Azrad ; Shahaf Shuler ; > Viacheslav Ovsiienko ; Liron Himi > ; Jerin Jacob ; Nithin Dabilpuram > ; Kiran Kumar K ; > Rasesh Mody ; Shahed Shaikh > ; Andrew Rybchenko > ; Singh, Jasvinder > ; Dumitrescu, Cristian > ; Wiles, Keith ; > Jiawen Wu ; Jian Wang > ; Yigit, Ferruh > Subject: [PATCH v2 1/2] ethdev: replace callback getting filter operation= s >=20 > Since rte_flow is the only API for filtering operations, > the legacy driver interface filter_ctrl was too much complicated > for the simple task of getting the struct rte_flow_ops. >=20 > The filter type RTE_ETH_FILTER_GENERIC and > the filter operarion RTE_ETH_FILTER_GET are removed. > The new driver callback flow_ops_get replaces filter_ctrl. >=20 > Signed-off-by: Thomas Monjalon > --- > drivers/net/ipn3ke/ipn3ke_representor.c | 28 ++++----------- > diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c > b/drivers/net/ipn3ke/ipn3ke_representor.c > index 856d21ef9b..589d9fa587 100644 > --- a/drivers/net/ipn3ke/ipn3ke_representor.c > +++ b/drivers/net/ipn3ke/ipn3ke_representor.c > @@ -2821,11 +2821,9 @@ ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, > uint16_t mtu) > } >=20 > static int > -ipn3ke_afu_filter_ctrl(struct rte_eth_dev *ethdev, > - enum rte_filter_type filter_type, enum rte_filter_op filter_op, > - void *arg) > +ipn3ke_afu_flow_ops_get(struct rte_eth_dev *ethdev, > + const struct rte_flow_ops **ops) > { > - int ret =3D 0; > struct ipn3ke_hw *hw; > struct ipn3ke_rpst *rpst; >=20 > @@ -2836,27 +2834,13 @@ ipn3ke_afu_filter_ctrl(struct rte_eth_dev > *ethdev, > rpst =3D IPN3KE_DEV_PRIVATE_TO_RPST(ethdev); >=20 > if (hw->acc_flow) > - switch (filter_type) { > - case RTE_ETH_FILTER_GENERIC: > - if (filter_op !=3D RTE_ETH_FILTER_GET) > - return -EINVAL; > - *(const void **)arg =3D &ipn3ke_flow_ops; > - break; > - default: > - IPN3KE_AFU_PMD_WARN("Filter type (%d) not > supported", > - filter_type); > - ret =3D -EINVAL; > - break; > - } > + *ops =3D &ipn3ke_flow_ops; > else if (rpst->i40e_pf_eth) > - (*rpst->i40e_pf_eth->dev_ops->filter_ctrl)(ethdev, > - filter_type, > - filter_op, > - arg); > + (*rpst->i40e_pf_eth->dev_ops->flow_ops_get)(ethdev, ops); > else > return -EINVAL; >=20 > - return ret; > + return 0; > } >=20 > static const struct eth_dev_ops ipn3ke_rpst_dev_ops =3D { > @@ -2874,7 +2858,7 @@ static const struct eth_dev_ops > ipn3ke_rpst_dev_ops =3D { > .stats_reset =3D ipn3ke_rpst_stats_reset, > .xstats_reset =3D ipn3ke_rpst_stats_reset, >=20 > - .filter_ctrl =3D ipn3ke_afu_filter_ctrl, > + .flow_ops_get =3D ipn3ke_afu_flow_ops_get, >=20 > .rx_queue_start =3D ipn3ke_rpst_rx_queue_start, > .rx_queue_stop =3D ipn3ke_rpst_rx_queue_stop, Acked-by: Rosen Xu