DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ciara Power <ciara.power@intel.com>, mtetsuyah@gmail.com
Cc: dev@dpdk.org, Andrew Rybchenko <arybchenko@solarflare.com>,
	Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [RFC] net/null: add empty promiscuous mode functions
Date: Wed, 16 Oct 2019 19:07:06 +0100	[thread overview]
Message-ID: <ff5c5fb3-85c1-16d5-2b59-b186c2539d38@intel.com> (raw)
In-Reply-To: <20191016154606.39218-1-ciara.power@intel.com>

On 10/16/2019 4:46 PM, Ciara Power wrote:
> Adding promiscuous functions prevents sample applications failing when run
> on this virtual PMD. The sample applications call promiscuous functions,
> and fail if this function call returns an error, which occurs when the
> virtual PMD does not support the promiscuous function being called. 
> 
> This change will be implemented for all virtual PMDs that currently do not
> have existing promiscuous functions. Multicast functions will also be
> added for virtual PMDs to prevent sample application breakages here also.

+Andrew

With the some ethdev APIs returning error code, some sample applications stop
working with virtual interfaces,

We can,
1- update sample applications to ignore the errors
2- Add dummy dev_ops support to (almost all) virtual PMDs (what this RFC suggests)

(1) puts us back to before the ethdev APIs updated status, and this may be wrong
for the physical devices case, so I am for this RFC.

Only perhaps we can have some common empty function and keep assigning that one
to reduce the dummy code, what do you think?


> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> ---
>  drivers/net/null/rte_eth_null.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
> index e2ff41a22..b8472a0cf 100644
> --- a/drivers/net/null/rte_eth_null.c
> +++ b/drivers/net/null/rte_eth_null.c
> @@ -441,11 +441,25 @@ eth_mac_address_set(__rte_unused struct rte_eth_dev *dev,
>  	return 0;
>  }
>  
> +static int
> +eth_dev_promiscuous_enable(__rte_unused struct rte_eth_dev *dev)
> +{
> +	return 0;
> +}
> +
> +static int
> +eth_dev_promiscuous_disable(__rte_unused struct rte_eth_dev *dev)
> +{
> +	return 0;
> +}
> +
>  static const struct eth_dev_ops ops = {
>  	.dev_start = eth_dev_start,
>  	.dev_stop = eth_dev_stop,
>  	.dev_configure = eth_dev_configure,
>  	.dev_infos_get = eth_dev_info,
> +	.promiscuous_enable = eth_dev_promiscuous_enable,
> +	.promiscuous_disable = eth_dev_promiscuous_disable,
>  	.rx_queue_setup = eth_rx_queue_setup,
>  	.tx_queue_setup = eth_tx_queue_setup,
>  	.rx_queue_release = eth_queue_release,
> 


  reply	other threads:[~2019-10-16 18:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 15:46 Ciara Power
2019-10-16 18:07 ` Ferruh Yigit [this message]
2019-10-17 10:37   ` Andrew Rybchenko
2019-10-17 10:47     ` Ferruh Yigit
2019-10-17 10:51       ` Andrew Rybchenko
2019-10-17 11:05         ` Ferruh Yigit
2019-10-17 13:43           ` Bruce Richardson
2019-10-17 15:33             ` Ferruh Yigit
2019-10-18  8:18               ` Ferruh Yigit
2019-10-18  8:30                 ` Andrew Rybchenko
2019-10-18 10:13               ` Bruce Richardson
2019-10-18 11:38                 ` Ferruh Yigit
2019-10-18 11:57                   ` Andrew Rybchenko
2019-10-18 13:02                     ` Ferruh Yigit
2019-10-18 13:12                   ` Bruce Richardson
2019-10-18 13:38                     ` 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=ff5c5fb3-85c1-16d5-2b59-b186c2539d38@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=arybchenko@solarflare.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=mtetsuyah@gmail.com \
    --cc=thomas@monjalon.net \
    /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).