DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wang, Haiyue" <haiyue.wang@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Ori Kam <orika@nvidia.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Chas Williams <chas3@att.com>,
	"Min Hu (Connor)" <humin29@huawei.com>,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@oss.nxp.com>,
	"Guo, Jia" <jia.guo@intel.com>,
	"Daley, John" <johndale@cisco.com>,
	Hyong Youb Kim <hyonkim@cisco.com>, Gaetan Rivet <grive@u256.net>,
	Ziyang Xuan <xuanziyang2@huawei.com>,
	"Xiaoyun Wang" <cloud.wangxiaoyun@huawei.com>,
	Guoyang Zhou <zhouguoyang@huawei.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>,
	Lijun Ou <oulijun@huawei.com>,
	"Xing,  Beilei" <beilei.xing@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Yang, Qiming" <qiming.yang@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>,
	 "Xu, Rosen" <rosen.xu@intel.com>, Matan Azrad <matan@nvidia.com>,
	"Shahaf Shuler" <shahafs@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Liron Himi <lironh@marvell.com>, Jerin Jacob <jerinj@marvell.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Rasesh Mody <rmody@marvell.com>,
	Shahed Shaikh <shshaikh@marvell.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	"Singh, Jasvinder" <jasvinder.singh@intel.com>,
	"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
	"Wiles, Keith" <keith.wiles@intel.com>,
	Jiawen Wu <jiawenwu@trustnetic.com>,
	Jian Wang <jianwang@trustnetic.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: replace callback getting filter operations
Date: Fri, 12 Mar 2021 01:44:42 +0000	[thread overview]
Message-ID: <BN8PR11MB3795C25359A52AA65D845147F76F9@BN8PR11MB3795.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210311221742.3750589-2-thomas@monjalon.net>

> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, March 12, 2021 06:18
> To: dev@dpdk.org
> Cc: Ori Kam <orika@nvidia.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>; Somnath Kotur
> <somnath.kotur@broadcom.com>; Chas Williams <chas3@att.com>; Min Hu (Connor) <humin29@huawei.com>;
> Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>; Hemant Agrawal <hemant.agrawal@nxp.com>; Sachin
> Saxena <sachin.saxena@oss.nxp.com>; Guo, Jia <jia.guo@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>;
> Daley, John <johndale@cisco.com>; Hyong Youb Kim <hyonkim@cisco.com>; Gaetan Rivet <grive@u256.net>;
> Ziyang Xuan <xuanziyang2@huawei.com>; Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>; Guoyang Zhou
> <zhouguoyang@huawei.com>; Yisen Zhuang <yisen.zhuang@huawei.com>; Lijun Ou <oulijun@huawei.com>; Xing,
> Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Xu, Rosen <rosen.xu@intel.com>; Matan
> Azrad <matan@nvidia.com>; Shahaf Shuler <shahafs@nvidia.com>; Viacheslav Ovsiienko
> <viacheslavo@nvidia.com>; Liron Himi <lironh@marvell.com>; Jerin Jacob <jerinj@marvell.com>; Nithin
> Dabilpuram <ndabilpuram@marvell.com>; Kiran Kumar K <kirankumark@marvell.com>; Rasesh Mody
> <rmody@marvell.com>; Shahed Shaikh <shshaikh@marvell.com>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>; Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; Wiles, Keith <keith.wiles@intel.com>; Jiawen Wu
> <jiawenwu@trustnetic.com>; Jian Wang <jianwang@trustnetic.com>; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: [PATCH 1/2] ethdev: replace callback getting filter operations
> 
> 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.
> 
> 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.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  doc/guides/nics/features.rst            |  4 +--
>  doc/guides/prog_guide/rte_flow.rst      | 14 +-------
>  doc/guides/rel_notes/release_20_11.rst  |  2 +-
>  doc/guides/rel_notes/release_2_2.rst    |  2 +-
>  drivers/net/bnxt/bnxt.h                 |  6 ++--
>  drivers/net/bnxt/bnxt_ethdev.c          | 40 +++++++--------------
>  drivers/net/bnxt/bnxt_reps.c            |  2 +-
>  drivers/net/bonding/rte_eth_bond_pmd.c  | 13 +++----
>  drivers/net/cxgbe/cxgbe_ethdev.c        |  2 +-
>  drivers/net/cxgbe/cxgbe_flow.c          | 22 +++---------
>  drivers/net/cxgbe/cxgbe_flow.h          |  7 ++--
>  drivers/net/dpaa2/dpaa2_ethdev.c        | 44 +++--------------------
>  drivers/net/dpaa2/dpaa2_flow.c          | 29 +++++-----------
>  drivers/net/e1000/igb_ethdev.c          | 31 ++++-------------
>  drivers/net/enic/enic_ethdev.c          | 30 +++++-----------
>  drivers/net/enic/enic_vf_representor.c  | 33 ++++++------------
>  drivers/net/failsafe/failsafe_ops.c     | 16 +++------
>  drivers/net/hinic/hinic_pmd_ethdev.c    | 36 ++++---------------
>  drivers/net/hns3/hns3_ethdev.c          |  2 +-
>  drivers/net/hns3/hns3_ethdev.h          |  5 ++-
>  drivers/net/hns3/hns3_ethdev_vf.c       |  2 +-
>  drivers/net/hns3/hns3_flow.c            | 30 ++++------------
>  drivers/net/i40e/i40e_ethdev.c          | 32 ++++-------------
>  drivers/net/iavf/iavf_ethdev.c          | 32 ++++-------------
>  drivers/net/ice/ice_dcf_ethdev.c        | 27 +++------------
>  drivers/net/ice/ice_ethdev.c            | 32 ++++-------------
>  drivers/net/igc/igc_ethdev.c            |  2 +-
>  drivers/net/igc/igc_filter.c            | 23 +++----------
>  drivers/net/igc/igc_filter.h            |  5 ++-
>  drivers/net/ipn3ke/ipn3ke_representor.c | 28 ++++-----------
>  drivers/net/ixgbe/ixgbe_ethdev.c        | 32 ++++-------------
>  drivers/net/mlx4/mlx4.c                 |  2 +-
>  drivers/net/mlx4/mlx4_flow.c            | 32 ++++-------------
>  drivers/net/mlx4/mlx4_flow.h            |  5 +--
>  drivers/net/mlx5/mlx5.c                 |  4 +--
>  drivers/net/mlx5/mlx5.h                 |  5 +--
>  drivers/net/mlx5/mlx5_flow.c            | 32 ++++-------------
>  drivers/net/mvpp2/mrvl_ethdev.c         | 26 ++++----------
>  drivers/net/octeontx2/otx2_ethdev.c     |  2 +-
>  drivers/net/octeontx2/otx2_ethdev.h     |  5 ++-
>  drivers/net/octeontx2/otx2_ethdev_ops.c | 21 +++--------
>  drivers/net/qede/qede_ethdev.c          |  2 +-
>  drivers/net/qede/qede_ethdev.h          |  7 ++--
>  drivers/net/qede/qede_filter.c          | 27 ++++-----------
>  drivers/net/sfc/sfc_ethdev.c            | 31 +++--------------
>  drivers/net/softnic/rte_eth_softnic.c   | 17 +++------
>  drivers/net/tap/rte_eth_tap.c           |  2 +-
>  drivers/net/tap/tap_flow.c              | 27 ++++-----------
>  drivers/net/tap/tap_flow.h              |  6 ++--
>  drivers/net/txgbe/txgbe_ethdev.c        | 26 +++-----------
>  lib/librte_ethdev/ethdev_driver.h       | 46 +++++++++----------------
>  lib/librte_ethdev/rte_eth_ctrl.h        |  2 +-
>  lib/librte_ethdev/rte_flow.c            |  9 ++---
>  lib/librte_ethdev/rte_flow_driver.h     | 25 --------------
>  54 files changed, 226 insertions(+), 720 deletions(-)
> 

> -enum rte_filter_op {
> -	RTE_ETH_FILTER_GET,      /**< get flow API ops */
> -};
> -
> -typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
> -				 enum rte_filter_type filter_type,
> -				 enum rte_filter_op filter_op,
> -				 void *arg);
> -/**< @internal Take operations to assigned filter type on an Ethernet device */
> +struct rte_flow_ops;
> +typedef int (*eth_flow_ops_get_t)(struct rte_eth_dev *dev,
> +				  const struct rte_flow_ops **ops);
> +/**< @internal Get flow operations */
> 

How about to change the return type to "const struct rte_flow_ops *" directly ?

typedef const struct rte_flow_ops * (*eth_flow_ops_get_t)(struct rte_eth_dev *dev);


> --
> 2.30.1


  reply	other threads:[~2021-03-12  1:45 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 22:17 [dpdk-dev] [PATCH 0/2] ethdev: remove some use of legacy filtering interface Thomas Monjalon
2021-03-11 22:17 ` [dpdk-dev] [PATCH 1/2] ethdev: replace callback getting filter operations Thomas Monjalon
2021-03-12  1:44   ` Wang, Haiyue [this message]
2021-03-12  8:22     ` Thomas Monjalon
2021-03-12  8:25       ` Andrew Rybchenko
2021-03-12  8:40         ` Wang, Haiyue
2021-03-12  7:09   ` Andrew Rybchenko
2021-03-12  8:26     ` Thomas Monjalon
2021-03-11 22:17 ` [dpdk-dev] [PATCH 2/2] drivers/net: remove explicit include of legacy filtering Thomas Monjalon
2021-03-12  1:21   ` Xu, Rosen
2021-03-12 17:46 ` [dpdk-dev] [PATCH v2 0/2] ethdev: remove some use of legacy filtering interface Thomas Monjalon
2021-03-12 17:46   ` [dpdk-dev] [PATCH v2 1/2] ethdev: replace callback getting filter operations Thomas Monjalon
2021-03-12 19:14     ` Ajit Khaparde
2021-03-13  4:16     ` Wang, Haiyue
2021-03-15  3:05     ` Xu, Rosen
2021-03-15  7:18     ` Andrew Rybchenko
2021-03-15  7:54       ` Thomas Monjalon
2021-03-15  8:43         ` Andrew Rybchenko
2021-03-15  8:55           ` Thomas Monjalon
2021-03-15  9:08             ` Andrew Rybchenko
2021-03-15  9:15               ` Thomas Monjalon
2021-03-19 18:12                 ` Thomas Monjalon
2021-03-20  7:54                   ` Andrew Rybchenko
2021-03-20 10:38                     ` Thomas Monjalon
2021-03-15  7:22     ` Hemant Agrawal
2021-03-12 17:46   ` [dpdk-dev] [PATCH v2 2/2] drivers/net: remove explicit include of legacy filtering Thomas Monjalon
2021-03-15  7:19     ` Hemant Agrawal
2021-03-21  8:59 ` [dpdk-dev] [PATCH v3 0/2] ethdev: remove some use " Thomas Monjalon
2021-03-21  9:00   ` [dpdk-dev] [PATCH v3 1/2] ethdev: replace callback getting filter operations Thomas Monjalon
2021-03-21  9:08     ` Andrew Rybchenko
2021-03-24 18:05     ` Ferruh Yigit
2021-03-26 17:41       ` Ferruh Yigit
2021-03-29 20:56     ` Matan Azrad
2021-03-21  9:00   ` [dpdk-dev] [PATCH v3 2/2] drivers/net: remove explicit include of legacy filtering Thomas Monjalon
2021-03-24 18:08     ` Ferruh Yigit
2021-03-24 20:00       ` Thomas Monjalon
2021-03-25  5:53         ` Andrew Rybchenko
2021-03-25 10:00           ` Ferruh Yigit
2021-03-25 10:20             ` Thomas Monjalon
2021-03-26 15:37               ` Ferruh Yigit
2021-03-26 21:45                 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN8PR11MB3795C25359A52AA65D845147F76F9@BN8PR11MB3795.namprd11.prod.outlook.com \
    --to=haiyue.wang@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=beilei.xing@intel.com \
    --cc=chas3@att.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=grive@u256.net \
    --cc=hemant.agrawal@nxp.com \
    --cc=humin29@huawei.com \
    --cc=hyonkim@cisco.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jerinj@marvell.com \
    --cc=jia.guo@intel.com \
    --cc=jianwang@trustnetic.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=jingjing.wu@intel.com \
    --cc=johndale@cisco.com \
    --cc=keith.wiles@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=lironh@marvell.com \
    --cc=matan@nvidia.com \
    --cc=ndabilpuram@marvell.com \
    --cc=orika@nvidia.com \
    --cc=oulijun@huawei.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rmody@marvell.com \
    --cc=rosen.xu@intel.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=shahafs@nvidia.com \
    --cc=shshaikh@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=xuanziyang2@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=zhouguoyang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).