From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, <dev@dpdk.org>,
Shepard Siegel <shepard.siegel@atomicrules.com>,
Ed Czeck <ed.czeck@atomicrules.com>,
"John Miller" <john.miller@atomicrules.com>,
Igor Russkikh <igor.russkikh@aquantia.com>,
Pavel Belous <pavel.belous@aquantia.com>,
Somalapuram Amaranath <asomalap@amd.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Hemant Agrawal <hemant.agrawal@nxp.com>,
Sachin Saxena <sachin.saxena@nxp.com>,
Wei Zhao <wei.zhao1@intel.com>, Jeff Guo <jia.guo@intel.com>,
John Daley <johndale@cisco.com>,
Hyong Youb Kim <hyonkim@cisco.com>,
Qi Zhang <qi.z.zhang@intel.com>,
Xiao Wang <xiao.w.wang@intel.com>,
Beilei Xing <beilei.xing@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Qiming Yang <qiming.yang@intel.com>,
Matan Azrad <matan@mellanox.com>,
Shahaf Shuler <shahafs@mellanox.com>,
"Viacheslav Ovsiienko" <viacheslavo@mellanox.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
"Haiyang Zhang" <haiyangz@microsoft.com>,
Long Li <longli@microsoft.com>,
Heinrich Kuhn <heinrich.kuhn@netronome.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>,
Maciej Czekaj <mczekaj@marvell.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Chenbo Xia <chenbo.xia@intel.com>,
Zhihong Wang <zhihong.wang@intel.com>,
Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations
Date: Sat, 29 Aug 2020 14:57:55 +0300 [thread overview]
Message-ID: <8da6077c-ab19-f819-3a3c-b4575bc512d9@solarflare.com> (raw)
In-Reply-To: <20200824094021.2323605-2-ferruh.yigit@intel.com>
On 8/24/20 12:40 PM, Ferruh Yigit wrote:
> This patch is a preparation to hide the 'struct eth_dev_ops' from
> applications by moving some device operations from 'struct eth_dev_ops'
> to 'struct rte_eth_dev'.
>
> Mentioned ethdev APIs are in the data path and implemented as inline
> because of performance reasons.
>
> Exposing 'struct eth_dev_ops' to applications is bad because it is a
> contract between ethdev and PMDs, not really needs to be known by
> applications, also changes in the struct causing ABI breakages which
> shouldn't.
>
> To be able to both keep APIs inline and hide the 'struct eth_dev_ops',
> moving device operations used in ethdev inline APIs to 'struct
> rte_eth_dev' to the same level with Rx/Tx burst functions.
>
> The list of dev_ops moved:
> eth_rx_queue_count_t rx_queue_count;
> eth_rx_descriptor_status_t rx_descriptor_status;
> eth_tx_descriptor_status_t tx_descriptor_status;
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
doc/guides/nics/features.rst should be updated since it says
that status callbacks live in eth_dev_ops.
plus an net/sfc-related nit below:
[snip]
> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
> index 65e0ff7d48..0b06bf91a0 100644
> --- a/drivers/net/sfc/sfc_ethdev.c
> +++ b/drivers/net/sfc/sfc_ethdev.c
[snip]
> @@ -1962,6 +1959,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
> dev->tx_pkt_burst = dp_tx->pkt_burst;
>
> dev->dev_ops = &sfc_eth_dev_ops;
> + dev->rx_queue_count = sfc_rx_queue_count;
> + dev->rx_descriptor_status = sfc_rx_descriptor_status;
> + dev->tx_descriptor_status = sfc_tx_descriptor_status;
May I ask to put it just after dev->tx_pkt_burst = ... line
since these callbacks go before dev_ops in the structure.
>
> return 0;
>
> @@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
>
> static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
> .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get,
> - .rx_queue_count = sfc_rx_queue_count,
> - .rx_descriptor_status = sfc_rx_descriptor_status,
> - .tx_descriptor_status = sfc_tx_descriptor_status,
> .reta_query = sfc_dev_rss_reta_query,
> .rss_hash_conf_get = sfc_dev_rss_hash_conf_get,
> .rxq_info_get = sfc_rx_queue_info_get,
> @@ -2069,6 +2066,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
> dev->tx_pkt_prepare = dp_tx->pkt_prepare;
> dev->tx_pkt_burst = dp_tx->pkt_burst;
> dev->dev_ops = &sfc_eth_dev_secondary_ops;
> + dev->rx_queue_count = sfc_rx_queue_count;
> + dev->rx_descriptor_status = sfc_rx_descriptor_status;
> + dev->tx_descriptor_status = sfc_tx_descriptor_status;
Same here.
[snip]
next prev parent reply other threads:[~2020-08-29 11:58 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
2020-08-24 9:40 ` [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations Ferruh Yigit
2020-08-29 11:57 ` Andrew Rybchenko [this message]
2020-08-31 12:25 ` Ferruh Yigit
2020-08-24 9:40 ` [dpdk-dev] [PATCH 3/7] ethdev: make device operations struct private Ferruh Yigit
2020-08-29 12:03 ` Andrew Rybchenko
2020-08-24 9:40 ` [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions Ferruh Yigit
2020-08-29 12:07 ` Andrew Rybchenko
2020-08-24 9:40 ` [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions Ferruh Yigit
2020-08-29 12:13 ` Andrew Rybchenko
2020-08-24 9:40 ` [dpdk-dev] [PATCH 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
2020-08-29 12:14 ` Andrew Rybchenko
2020-08-24 9:40 ` [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
2020-08-29 12:16 ` Andrew Rybchenko
2020-08-29 11:47 ` [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Andrew Rybchenko
2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 2/7] ethdev: move inline device operations Ferruh Yigit
2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private Ferruh Yigit
2020-09-08 12:19 ` Ferruh Yigit
2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 4/7] ethdev: mark internal functions Ferruh Yigit
2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 5/7] ethdev: use hairpin helper functions Ferruh Yigit
2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 2/7] ethdev: move inline device operations Ferruh Yigit
2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private Ferruh Yigit
2020-09-09 12:57 ` Ferruh Yigit
2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 4/7] ethdev: mark internal functions Ferruh Yigit
2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 5/7] ethdev: use hairpin helper functions Ferruh Yigit
2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
2020-09-09 12:07 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API David Marchand
2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations Ferruh Yigit
2020-09-10 1:56 ` Sachin Saxena (OSS)
2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 3/7] ethdev: make device operations struct private Ferruh Yigit
2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 4/7] ethdev: mark internal functions Ferruh Yigit
2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 5/7] ethdev: use hairpin helper functions Ferruh Yigit
2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
2020-09-10 2:04 ` Sachin Saxena (OSS)
2020-09-10 12:50 ` [dpdk-dev] [PATCH v4 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 01/10] app/procinfo: fix redundant condition Ferruh Yigit
2021-01-08 10:36 ` David Marchand
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 02/10] app/procinfo: fix negative check on unsigned variable Ferruh Yigit
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 03/10] app/procinfo: remove suspicious sizeof Ferruh Yigit
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 04/10] app/procinfo: remove useless assignment Ferruh Yigit
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 05/10] net/pcap: remove local variable shadowing outer one Ferruh Yigit
2021-01-08 10:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 06/10] net/bonding: " Ferruh Yigit
2021-01-08 10:34 ` David Marchand
2021-01-11 1:03 ` Min Hu (Connor)
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 07/10] net/af_xdp: remove useless assignment Ferruh Yigit
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 08/10] net/bnxt: fix redundant return Ferruh Yigit
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true condition Ferruh Yigit
2020-11-23 15:25 ` Zhang, Roy Fan
2020-11-19 11:59 ` [dpdk-dev] [v21.02 v3 10/10] net/avp: " Ferruh Yigit
2020-11-20 17:40 ` Steven Webster
2021-01-11 9:47 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck David Marchand
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=8da6077c-ab19-f819-3a3c-b4575bc512d9@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=ajit.khaparde@broadcom.com \
--cc=asomalap@amd.com \
--cc=beilei.xing@intel.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=ed.czeck@atomicrules.com \
--cc=ferruh.yigit@intel.com \
--cc=haiyangz@microsoft.com \
--cc=heinrich.kuhn@netronome.com \
--cc=hemant.agrawal@nxp.com \
--cc=hyonkim@cisco.com \
--cc=igor.russkikh@aquantia.com \
--cc=jerinj@marvell.com \
--cc=jia.guo@intel.com \
--cc=jingjing.wu@intel.com \
--cc=john.miller@atomicrules.com \
--cc=johndale@cisco.com \
--cc=kirankumark@marvell.com \
--cc=kys@microsoft.com \
--cc=longli@microsoft.com \
--cc=matan@mellanox.com \
--cc=maxime.coquelin@redhat.com \
--cc=mczekaj@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=pavel.belous@aquantia.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=rmody@marvell.com \
--cc=sachin.saxena@nxp.com \
--cc=shahafs@mellanox.com \
--cc=shepard.siegel@atomicrules.com \
--cc=shshaikh@marvell.com \
--cc=somnath.kotur@broadcom.com \
--cc=sthemmin@microsoft.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@mellanox.com \
--cc=wei.zhao1@intel.com \
--cc=xiao.w.wang@intel.com \
--cc=zhihong.wang@intel.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).