netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] vlan: add proto for proc interface
Date: Fri, 7 Mar 2014 13:15:22 +0100	[thread overview]
Message-ID: <20140307121522.GA11396@macbook.localnet> (raw)
In-Reply-To: <1394194251-11656-2-git-send-email-dingtianhong@huawei.com>

On Fri, Mar 07, 2014 at 08:10:50PM +0800, Ding Tianhong wrote:
> The vlan could support 2 proto: 802.1q and 802.1ad, so add it to
> proc interface, the user could easily distinguish the proto for
> each vlan dev.
> 
> And the dev->priv_flags seems inappropriate, modify to Priv_Flags,
> looks more comfortable.

The proc interface is obsolete, but this doesn't mean you're allowed
to break it. This information is available through netlink. The proc
interface should not be touched.

Nacked-by: Patrick McHardy <kaber@trash.net>

> 
> ---------------------- the old format: --------------------------
> 
> eth2.10  VID: 10         REORDER_HDR: 1  dev->priv_flags: 1
>          total frames received            5
>           total bytes received          336
>       Broadcast/Multicast Rcvd            0
> 
>       total frames transmitted           13
>        total bytes transmitted         1026
> Device: eth2
> INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
>  EGRESS priority mappings:
> 
> ----------------------- the new format: -------------------------
> 
> eth2.20  Proto: 802.1q  VID: 20  REORDER_HDR: 1  Priv_Flags: 1
>          total frames received            0
>           total bytes received            0
>       Broadcast/Multicast Rcvd            0
> 
>       total frames transmitted            0
>        total bytes transmitted            0
> Device: eth2
> INGRESS priority mappings: 0:0  1:0  2:0  3:0  4:0  5:0  6:0 7:0
>  EGRESS priority mappings:
> 
> ----------------------------------------------------------------
> 
> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> ---
>  net/8021q/vlanproc.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
> index 1d0e8921..a40abbc 100644
> --- a/net/8021q/vlanproc.c
> +++ b/net/8021q/vlanproc.c
> @@ -285,8 +285,10 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
>  
>  	stats = dev_get_stats(vlandev, &temp);
>  	seq_printf(seq,
> -		   "%s  VID: %d	 REORDER_HDR: %i  dev->priv_flags: %hx\n",
> -		   vlandev->name, vlan->vlan_id,
> +		   "%s  Proto: %s  VID: %d  REORDER_HDR: %i  Priv_Flags: %hx\n",
> +		   vlandev->name,
> +		   vlan->vlan_proto == htons(ETH_P_8021Q) ? "802.1q" : "802.1ad",
> +		   vlan->vlan_id,
>  		   (int)(vlan->flags & 1), vlandev->priv_flags);
>  
>  	seq_printf(seq, fmt64, "total frames received", stats->rx_packets);
> -- 
> 1.8.0
> 

  reply	other threads:[~2014-03-07 12:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 12:10 [PATCH net-next 0/2] vlan: add proto for vlan proc interface Ding Tianhong
2014-03-07 12:10 ` [PATCH net-next 1/2] vlan: add proto for " Ding Tianhong
2014-03-07 12:15   ` Patrick McHardy [this message]
2014-03-10  1:33     ` Ding Tianhong
2014-03-07 12:10 ` [PATCH net-next 2/2] vlan: add proto and regulate the /proc/net/vlan/config Ding Tianhong

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=20140307121522.GA11396@macbook.localnet \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=dingtianhong@huawei.com \
    --cc=netdev@vger.kernel.org \
    /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).