DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Singh, Jasvinder" <jasvinder.singh@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
Cc: Kumara Parameshwaran <kparameshwar@vmware.com>,
	Kumara Parameshwaran <kumaraparamesh92@gmail.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH v1] drivers/net: use internal API to get eth dev from name
Date: Fri, 4 Feb 2022 09:51:45 +0000	[thread overview]
Message-ID: <CY4PR11MB1589A1661225E5D17E58AFFCE0299@CY4PR11MB1589.namprd11.prod.outlook.com> (raw)
In-Reply-To: <09e0651f-88d2-4d26-52ae-c4b64c985640@intel.com>



> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Thursday, February 3, 2022 12:36 PM
> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>
> Cc: Kumara Parameshwaran <kparameshwar@vmware.com>; Kumara
> Parameshwaran <kumaraparamesh92@gmail.com>; dev@dpdk.org
> Subject: Re: [PATCH v1] drivers/net: use internal API to get eth dev from
> name
> 
> On 2/3/2022 8:24 AM, Kumara Parameshwaran wrote:
> > From: Kumara Parameshwaran<kparameshwar@vmware.com>
> >
> > Make changes in PMDs to use the new function where
> > rte_eth_dev_get_port_by_name is used to get port_id to access
> > rte_eth_devices
> >
> > Signed-off-by: Kumara Parameshwaran<kparameshwar@vmware.com>
> > ---
> > v1
> > * Replace rte_eth_get_get_port_by_name in PMDs with
> rte_eth_dev_get_by_name
> >    where port_id is used to retrieve rte_eth_dev data structure
> 
> Hi Jasvinder, Cristian,
> 
> Can you please investigate using 'rte_eth_dev_get_by_name()' internal API
> instead of 'rte_eth_dev_get_port_by_name()' to eliminate direct access to
> global 'rte_eth_devices' array from softnic driver?
> 
> Thanks,
> Ferruh


Hi Ferruh

I addition to the changes that already made in the patch, there are two more places when "'rte_eth_dev_get_port_by_name()" is used to access rte_eth_devices[] array. 

1. In dpdk/drivers/net/softnic/rte_eth_softnic_internals.h , wrapper function is defined for accessing rte_eth_devices[] using 'rte_eth_dev_get_port_by_name (), that could be removed. 
	static inline struct rte_eth_dev * ETHDEV(struct pmd_internals *softnic)

2.  In dpdk/drivers/net/softnic/rte_eth_softnic_flow.c, remove the usage of above wrapper function at 2 places, and 'rte_eth_dev_get_by_name() can be used.


Thanks,
Jasvinder


      reply	other threads:[~2022-02-04  9:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  8:24 Kumara Parameshwaran
2022-02-03 11:09 ` kumaraparameshwaran rathinavel
2022-02-03 11:31   ` Ferruh Yigit
2022-02-07 16:08     ` Ali Alnubani
2022-02-07 16:36       ` Ferruh Yigit
2022-02-07 16:47         ` Ali Alnubani
2022-02-07 17:25           ` Ferruh Yigit
2022-02-07 19:58             ` Owen Hilyard
2022-02-10 20:44               ` Yigit, Ferruh
2022-02-10 22:06                 ` Owen Hilyard
2022-02-03 12:31 ` Ferruh Yigit
2022-02-04 13:46   ` Ferruh Yigit
2022-02-03 12:34 ` Ferruh Yigit
2022-02-03 12:35 ` Ferruh Yigit
2022-02-04  9:51   ` Singh, Jasvinder [this message]

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=CY4PR11MB1589A1661225E5D17E58AFFCE0299@CY4PR11MB1589.namprd11.prod.outlook.com \
    --to=jasvinder.singh@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=kparameshwar@vmware.com \
    --cc=kumaraparamesh92@gmail.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).