DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Shepard Siegel <shepard.siegel@atomicrules.com>,
	Ed Czeck <ed.czeck@atomicrules.com>,
	John Miller <john.miller@atomicrules.com>,
	Allain Legacy <allain.legacy@windriver.com>,
	Matt Peters <matt.peters@windriver.com>,
	Harish Patil <harish.patil@cavium.com>,
	Rasesh Mody <rasesh.mody@cavium.com>,
	Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Shreyansh Jain <shreyansh.jain@nxp.com>,
	Marcin Wojtas <mw@semihalf.com>,
	Michal Krawczyk <mk@semihalf.com>,
	Guy Tzalik <gtzalik@amazon.com>,
	Evgeny Schemeilin <evgenys@amazon.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>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Shijith Thotton <shijith.thotton@cavium.com>,
	Srisivasubramanian Srinivasan <ssrinivasan@cavium.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Nelio Laranjeiro <nelio.laranjeiro@6wind.com>,
	Yongseok Koh <yskoh@mellanox.com>, Jacek Siuda <jck@semihalf.com>,
	Tomasz Duszynski <tdu@semihalf.com>,
	Dmitri Epshtein <dima@marvell.com>,
	Natalie Samsonov <nsamsono@marvell.com>,
	Jianbo Liu <jianbo.liu@arm.com>,
	Alejandro Lucero <alejandro.lucero@netronome.com>,
	Tetsuya Mukawa <mtetsuyah@gmail.com>,
	Santosh Shukla <santosh.shukla@caviumnetworks.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	Shahed Shaikh <shahed.shaikh@cavium.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Matej Vido <vido@cesnet.cz>,
	Pascal Mazon <pascal.mazon@6wind.com>,
	Maciej Czekaj <maciej.czekaj@caviumnetworks.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Tiwei Bie <tiwei.bie@intel.com>,
	Shrikrishna Khare <skhare@vmware.com>,
	Remy Horton <remy.horton@intel.com>, Ori Kam <orika@mellanox.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	Radu Nicolau <radu.nicolau@intel.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	Tomasz Kantecki <tomasz.kantecki@intel.com>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] ethdev: replace bus specific struct with generic dev
Date: Wed, 28 Mar 2018 12:34:52 +0530	[thread overview]
Message-ID: <43970f11-d3a2-8f85-8937-91d5459b5f31@nxp.com> (raw)
In-Reply-To: <20180327174052.266285-1-ferruh.yigit@intel.com>

On 3/27/2018 11:10 PM, Ferruh Yigit wrote:
> Public struct rte_eth_dev_info has a "struct rte_pci_device" field in it
> although it is common for all ethdev in all buses.
> 
> Replacing pci specific struct with generic device struct and updating
> places that are using pci device in a way to get this information from
> generic device.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> There is no deprecation notice sent for this update but in this release
> ethdev info already updated and ABI already broken, it can be good
> opportunity for this update.
> ---
>   app/test-pmd/config.c                     | 11 ++++++++++-
>   app/test-pmd/testpmd.h                    | 24 ++++++++++++++++++------
>   drivers/net/af_packet/rte_eth_af_packet.c |  1 +
>   drivers/net/ark/ark_ethdev.c              |  4 +++-
>   drivers/net/avf/avf_ethdev.c              |  2 +-
>   drivers/net/avp/avp_ethdev.c              |  2 +-
>   drivers/net/bnx2x/bnx2x_ethdev.c          |  2 +-
>   drivers/net/bnxt/bnxt_ethdev.c            |  2 +-
>   drivers/net/cxgbe/cxgbe_ethdev.c          |  2 +-
>   drivers/net/dpaa/dpaa_ethdev.c            |  1 +
>   drivers/net/dpaa2/dpaa2_ethdev.c          |  1 +
>   drivers/net/e1000/em_ethdev.c             |  2 +-
>   drivers/net/e1000/igb_ethdev.c            |  4 ++--
>   drivers/net/ena/ena_ethdev.c              |  2 +-
>   drivers/net/enic/enic_ethdev.c            |  2 +-
>   drivers/net/fm10k/fm10k_ethdev.c          |  2 +-
>   drivers/net/i40e/i40e_ethdev.c            |  2 +-
>   drivers/net/i40e/i40e_ethdev_vf.c         |  2 +-
>   drivers/net/ixgbe/ixgbe_ethdev.c          |  4 ++--
>   drivers/net/kni/rte_eth_kni.c             |  2 +-
>   drivers/net/liquidio/lio_ethdev.c         |  2 +-
>   drivers/net/mlx4/mlx4_ethdev.c            |  2 +-
>   drivers/net/mlx5/mlx5_ethdev.c            |  2 +-
>   drivers/net/mrvl/mrvl_ethdev.c            |  2 ++
>   drivers/net/nfp/nfp_net.c                 |  2 +-
>   drivers/net/null/rte_eth_null.c           |  1 +
>   drivers/net/octeontx/octeontx_ethdev.c    |  2 +-
>   drivers/net/pcap/rte_eth_pcap.c           |  1 +
>   drivers/net/qede/qede_ethdev.c            |  2 +-
>   drivers/net/ring/rte_eth_ring.c           |  1 +
>   drivers/net/sfc/sfc_ethdev.c              |  2 +-
>   drivers/net/szedata2/rte_eth_szedata2.c   |  2 +-
>   drivers/net/tap/rte_eth_tap.c             |  2 +-
>   drivers/net/thunderx/nicvf_ethdev.c       |  2 +-
>   drivers/net/virtio/virtio_ethdev.c        |  2 +-
>   drivers/net/vmxnet3/vmxnet3_ethdev.c      |  2 +-
>   examples/ethtool/lib/rte_ethtool.c        | 15 +++++++++------
>   examples/ip_pipeline/init.c               | 10 ++++++++--
>   examples/kni/main.c                       | 10 +++++++---
>   lib/librte_ether/rte_ethdev.h             |  2 +-
>   test/test/test_kni.c                      | 28 ++++++++++++++++++++++------
>   41 files changed, 114 insertions(+), 54 deletions(-)
> 

[...]

> diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
> index 781d75cc2..ec3a024c6 100644
> --- a/drivers/net/cxgbe/cxgbe_ethdev.c
> +++ b/drivers/net/cxgbe/cxgbe_ethdev.c
> @@ -148,7 +148,7 @@ static void cxgbe_dev_info_get(struct rte_eth_dev *eth_dev,
>   		.nb_align = 1,
>   	};
>   
> -	device_info->pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
> +	device_info->device = eth_dev->device;
>   
>   	device_info->min_rx_bufsize = CXGBE_MIN_RX_BUFSIZE;
>   	device_info->max_rx_pktlen = CXGBE_MAX_RX_PKTLEN;
> diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
> index db493648a..29513158f 100644
> --- a/drivers/net/dpaa/dpaa_ethdev.c
> +++ b/drivers/net/dpaa/dpaa_ethdev.c
> @@ -245,6 +245,7 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
>   
>   	PMD_INIT_FUNC_TRACE();
>   
> +	dev_info->device = dev->device;
>   	dev_info->max_rx_queues = dpaa_intf->nb_rx_queues;
>   	dev_info->max_tx_queues = dpaa_intf->nb_tx_queues;
>   	dev_info->min_rx_bufsize = DPAA_MIN_RX_BUF_SIZE;
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index 2fb7b2da7..7802067e8 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -163,6 +163,7 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>   
>   	dev_info->if_index = priv->hw_id;
>   
> +	dev_info->device = dev->device;
>   	dev_info->max_mac_addrs = priv->max_mac_filters;
>   	dev_info->max_rx_pktlen = DPAA2_MAX_RX_PKT_LEN;
>   	dev_info->min_rx_bufsize = DPAA2_MIN_RX_BUF_SIZE;

[...]

For dpaa and dpaa2 specific change...

> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
> index ab1030d42..0ed903966 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -995,7 +995,7 @@ struct rte_pci_device;
>    * Ethernet device information
>    */
>   struct rte_eth_dev_info {
> -	struct rte_pci_device *pci_dev; /**< Device PCI information. */
> +	struct rte_device *device; /** Generic device information */
>   	const char *driver_name; /**< Device Driver name. */
>   	unsigned int if_index; /**< Index to bound host interface, or 0 if none.
>   		Use if_indextoname() to translate into an interface name. */

[...]

And for the above change:

Acked-By: Shreyansh Jain <shreyansh.jain@nxp.com>

_
Shreyansh

  reply	other threads:[~2018-03-28  7:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 17:40 Ferruh Yigit
2018-03-28  7:04 ` Shreyansh Jain [this message]
2018-03-28 13:11 ` Legacy, Allain
2018-03-29  6:17 ` Tomasz Duszynski
2018-03-29  9:20   ` Ferruh Yigit
2018-03-29  8:01 ` santosh
2018-03-29 14:50 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2018-03-29 17:52   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2018-03-30  6:44     ` David Marchand
2018-03-30 10:27       ` Ferruh Yigit
2018-03-30 15:17     ` [dpdk-dev] [PATCH v4] " Ferruh Yigit
2018-03-30 15:29       ` David Marchand
2018-04-02  9:40         ` David Marchand
2018-04-02 16:13         ` santosh
2018-04-03  9:06           ` David Marchand
2018-04-03  9:50             ` Ferruh Yigit
2018-04-04 17:57               ` De Lara Guarch, Pablo
2018-04-05  9:19                 ` Ferruh Yigit
2018-04-05 16:40       ` [dpdk-dev] [PATCH v5] " Ferruh Yigit
2018-04-09 12:09         ` [dpdk-dev] [PATCH v6] " Ferruh Yigit
2018-04-10 13:34           ` Thomas Monjalon
2018-04-10 18:19             ` Ferruh Yigit

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=43970f11-d3a2-8f85-8937-91d5459b5f31@nxp.com \
    --to=shreyansh.jain@nxp.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=akhil.goyal@nxp.com \
    --cc=alejandro.lucero@netronome.com \
    --cc=allain.legacy@windriver.com \
    --cc=arybchenko@solarflare.com \
    --cc=beilei.xing@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=dima@marvell.com \
    --cc=ed.czeck@atomicrules.com \
    --cc=evgenys@amazon.com \
    --cc=ferruh.yigit@intel.com \
    --cc=gtzalik@amazon.com \
    --cc=harish.patil@cavium.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hyonkim@cisco.com \
    --cc=jck@semihalf.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=jianbo.liu@arm.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.miller@atomicrules.com \
    --cc=johndale@cisco.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=linville@tuxdriver.com \
    --cc=maciej.czekaj@caviumnetworks.com \
    --cc=matt.peters@windriver.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mk@semihalf.com \
    --cc=mtetsuyah@gmail.com \
    --cc=mw@semihalf.com \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=nsamsono@marvell.com \
    --cc=orika@mellanox.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=pascal.mazon@6wind.com \
    --cc=qi.z.zhang@intel.com \
    --cc=radu.nicolau@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rasesh.mody@cavium.com \
    --cc=remy.horton@intel.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=shahed.shaikh@cavium.com \
    --cc=shepard.siegel@atomicrules.com \
    --cc=shijith.thotton@cavium.com \
    --cc=skhare@vmware.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=ssrinivasan@cavium.com \
    --cc=tdu@semihalf.com \
    --cc=thomas@monjalon.net \
    --cc=tiwei.bie@intel.com \
    --cc=tomasz.kantecki@intel.com \
    --cc=vido@cesnet.cz \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.w.wang@intel.com \
    --cc=yskoh@mellanox.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).