DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Vijayakumar Muthuvel Manickam <mmvijay@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] kni: Add link status update
Date: Mon, 15 Jun 2015 09:09:04 -0700	[thread overview]
Message-ID: <20150615090904.4b4d45a5@urahara> (raw)
In-Reply-To: <1434356503-7747-1-git-send-email-mmvijay@gmail.com>

On Mon, 15 Jun 2015 04:21:43 -0400
Vijayakumar Muthuvel Manickam <mmvijay@gmail.com> wrote:

> Implement .ndo_change_carrier to enable
> DPDK applications to propagate link state changes to
> kni virtual interfaces through sysfs
> 
> Signed-off-by: Vijayakumar Muthuvel Manickam <mmvijay@gmail.com>
> ---
> Implemented .ndo_change_carrier instead of adding a new ioctl
> 
>  lib/librte_eal/linuxapp/kni/kni_net.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c b/lib/librte_eal/linuxapp/kni/kni_net.c
> index dd95db5..10c94ce 100644
> --- a/lib/librte_eal/linuxapp/kni/kni_net.c
> +++ b/lib/librte_eal/linuxapp/kni/kni_net.c
> @@ -632,6 +632,15 @@ static int kni_net_set_mac(struct net_device *netdev, void *p)
>  	return 0;
>  }
>  
> +static int kni_net_change_carrier(struct net_device *dev, bool new_carrier)
> +{
> +	if (new_carrier)
> +		netif_carrier_on(dev);
> +	else
> +		netif_carrier_off(dev);
> +	return 0;
> +}
> +
>  static const struct header_ops kni_net_header_ops = {
>  	.create  = kni_net_header,
>  	.rebuild = kni_net_rebuild_header,
> @@ -648,6 +657,7 @@ static const struct net_device_ops kni_net_netdev_ops = {
>  	.ndo_get_stats = kni_net_stats,
>  	.ndo_tx_timeout = kni_net_tx_timeout,
>  	.ndo_set_mac_address = kni_net_set_mac,
> +	.ndo_change_carrier = kni_net_change_carrier,
>  };
>  
>  void

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

You might need to have a kernel version test?? since carrier change was
introduced in 3.9 kernel

  reply	other threads:[~2015-06-15 16:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 23:33 [dpdk-dev] [PATCH] " Vijayakumar Muthuvel Manickam
2015-05-19  0:54 ` Zhang, Helin
2015-06-15  0:57   ` Zhang, Helin
2015-06-15  1:11     ` Vijayakumar Muthuvel Manickam
2015-06-15  1:12       ` Zhang, Helin
2015-06-15  8:21         ` [dpdk-dev] [PATCH v2] " Vijayakumar Muthuvel Manickam
2015-06-15 16:09           ` Stephen Hemminger [this message]
2015-06-16  6:39             ` [dpdk-dev] [PATCH v3] " Vijayakumar Muthuvel Manickam
2015-06-16  7:33               ` Zhang, Helin
2015-06-16 14:29                 ` Thomas Monjalon
2015-05-19  3:11 ` [dpdk-dev] [PATCH] " Stephen Hemminger

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=20150615090904.4b4d45a5@urahara \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=mmvijay@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).