DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Andriy Berestovskyy <Andriy.Berestovskyy@caviumnetworks.com>
Cc: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] net/thunderx: add empty link up/down callbacks
Date: Mon, 3 Apr 2017 20:43:17 +0530	[thread overview]
Message-ID: <20170403151315.2yrchyh4fgpjn3ha@localhost.localdomain> (raw)
In-Reply-To: <1490968669-9161-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com>

On Fri, Mar 31, 2017 at 03:57:48PM +0200, Andriy Berestovskyy wrote:
> Some applications and DPDK examples expect link up/down
> functionality to be provided.
> 
> Signed-off-by: Andriy Berestovskyy <Andriy.Berestovskyy@caviumnetworks.com>
> ---
>  drivers/net/thunderx/nicvf_ethdev.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index 1060319..984c218 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -1924,11 +1924,25 @@ nicvf_dev_configure(struct rte_eth_dev *dev)
>  	return 0;
>  }
>  
> +static int
> +nicvf_dev_set_link_up(struct rte_eth_dev *dev __rte_unused)
> +{
> +	return 0;
> +}
> +
> +static int
> +nicvf_dev_set_link_down(struct rte_eth_dev *dev __rte_unused)
> +{
> +	return 0;
> +}


Since the VF drivers can't really initiate link_up and link_down and
other VF drivers like i40e VF is not setting this callback. I think, it is
OK keep it as -ENOSUP(which is default).

Since Christain Acked on the fix on the usage of examples/ip_pipeline
application. Probably we are OK without this change.

http://dpdk.org/ml/archives/dev/2017-March/062704.html

Any thought from ethdev maintainers?

> +
>  /* Initialize and register driver with DPDK Application */
>  static const struct eth_dev_ops nicvf_eth_dev_ops = {
>  	.dev_configure            = nicvf_dev_configure,
>  	.dev_start                = nicvf_dev_start,
>  	.dev_stop                 = nicvf_dev_stop,
> +	.dev_set_link_up          = nicvf_dev_set_link_up,
> +	.dev_set_link_down        = nicvf_dev_set_link_down,
>  	.link_update              = nicvf_dev_link_update,
>  	.dev_close                = nicvf_dev_close,
>  	.stats_get                = nicvf_dev_stats_get,
> -- 
> 2.7.4
> 

  parent reply	other threads:[~2017-04-03 15:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 13:57 Andriy Berestovskyy
2017-03-31 13:57 ` [dpdk-dev] [PATCH 2/2] net/thunderx: wait to complete during link update Andriy Berestovskyy
2017-04-03 14:55   ` Jerin Jacob
2017-04-03 15:35     ` Ferruh Yigit
2017-04-03 15:13 ` Jerin Jacob [this message]
2017-04-13 11:04   ` [dpdk-dev] [PATCH 1/2] net/thunderx: add empty link up/down callbacks Ferruh Yigit
2017-04-14 12:37     ` Jerin Jacob

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=20170403151315.2yrchyh4fgpjn3ha@localhost.localdomain \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=Andriy.Berestovskyy@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=maciej.czekaj@caviumnetworks.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).