patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Iremonger, Bernard" <bernard.iremonger@intel.com>
To: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Wu, Jingjing" <jingjing.wu@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix ixgbe private API calling
Date: Thu, 12 Jan 2017 10:08:47 +0000	[thread overview]
Message-ID: <8CEF83825BEC744B83065625E567D7C224D1D2E5@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B55864B@shsmsx102.ccr.corp.intel.com>

Hi Wenzhuo,

> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Thursday, January 12, 2017 1:09 AM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>; dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix ixgbe private API calling
> 
> Hi Bernard,
> 
> > -----Original Message-----
> > From: Iremonger, Bernard
> > Sent: Wednesday, January 11, 2017 6:27 PM
> > To: Lu, Wenzhuo; dev@dpdk.org
> > Cc: Wu, Jingjing; stable@dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH] app/testpmd: fix ixgbe private API
> > calling
> >
> > Hi Wenzhuo,
> >
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> > > Sent: Wednesday, January 11, 2017 2:48 AM
> > > To: dev@dpdk.org
> > > Cc: Wu, Jingjing <jingjing.wu@intel.com>; Lu, Wenzhuo
> > > <wenzhuo.lu@intel.com>; stable@dpdk.org
> > > Subject: [dpdk-dev] [PATCH] app/testpmd: fix ixgbe private API
> > > calling
> > >
> > > Some ixgbe private APIs are added to expose ixgbe specific functions.
> > > When they're used by testpmd, there's no check for if the NICs are ixgbe.
> > > Other NICs also have chance to  call these APIs.
> > > This patch add the check and the feedback print.
> >
> > I am not sure that testpmd is the right place to do this.
> > The rte_pmd_ixgbe_* functions are public API's which can be called by
> > other applications.
> > The checks should be in the rte_pmd_ixgbe_* API's
> To be safer, it's better to add a check in the APIs.

I have already sent a patch for ixgbe which Ferruh has reviewed and applied to dpdk-next-net
http://dpdk.org/dev/patchwork/patch/19151/

We should consider doing something similar for the i40e.

> But the APIs is so called private API, not really public.  Considering if we have
> the same function on different NICs, for example we have rte_pmd_ixgbe_a
> and rte_pmd_i40e_a.
> APP still need to call them one by one, like ret = rte_pmd_ixgbe_a; ret =
> rte_pmd_i40e_a;
> 
> then, why not add the check, like
> If (NIC is ixgbe)
> 	ret = rte_pmd_ixgbe_a;
> if (NIC is i40e)
> 	ret = rte_pmd_i40e_a;

There is already code like the above in testpmd in cases where there is a choice of rte_pmd_* functions to call.
 
> testpmd is an example to let the users to know how to use the APIs. They
> should follow the example.
> How about your opinion?

In the case where there is no choice of function to make. There is no need to check the NIC in testpmd (as it is now done in the rte_pmd_ixgbe_* API's).

Regards,

Bernard.

      reply	other threads:[~2017-01-12 10:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11  2:47 [dpdk-stable] " Wenzhuo Lu
2017-01-11 10:27 ` [dpdk-stable] [dpdk-dev] " Iremonger, Bernard
2017-01-11 15:20   ` Iremonger, Bernard
2017-01-11 15:26     ` Ferruh Yigit
2017-01-11 15:47       ` Iremonger, Bernard
2017-01-11 16:19         ` Ferruh Yigit
2017-01-11 16:29           ` Iremonger, Bernard
2017-01-11 18:07             ` Ferruh Yigit
2017-01-12  1:08   ` Lu, Wenzhuo
2017-01-12 10:08     ` Iremonger, Bernard [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=8CEF83825BEC744B83065625E567D7C224D1D2E5@IRSMSX108.ger.corp.intel.com \
    --to=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@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).