bridge.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevic@redhat.com>
To: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>,
	Vladislav Yasevich <vyasevich@gmail.com>,
	netdev@vger.kernel.org
Cc: stephen@networkplumber.org, bridge@lists.linux-foundation.org
Subject: Re: [Bridge] [PATCH v3 net-next 1/3] bridge: Add a default_pvid sysfs attribute
Date: Fri, 03 Oct 2014 09:42:00 -0400	[thread overview]
Message-ID: <542EA7A8.1070701@redhat.com> (raw)
In-Reply-To: <542DF6FA.4050107@lab.ntt.co.jp>

On 10/02/2014 09:08 PM, Toshiaki Makita wrote:
> On 2014/10/03 8:54, Vladislav Yasevich wrote:
>> This patch allows the user to set and retrieve default_pvid
>> value.  A new value can only be stored when vlan filtering
>> is disabled.
>>
>> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
>> ---
> ...
>> +int br_vlan_set_default_pvid(struct net_bridge *br, unsigned long val)
>> +{
>> +	u16 pvid = val;
>> +	int err = 0;
>> +
>> +	if (!val || val >= VLAN_VID_MASK)
>> +		return -EINVAL;
>> +
>> +	if (!rtnl_trylock())
>> +		return restart_syscall();
>> +
>> +	if (pvid == br->default_pvid)
>> +		goto unlock;
>> +
>> +	/* Only allow default pvid change when filtering is disabled */
>> +	if (br->vlan_enabled) {
>> +		pr_info_once("Please disable vlan filtering to change default_pvid\n");
>> +		err = -EPERM;
>> +		goto unlock;
>> +	}
>> +
>> +	br->default_pvid = vid;
> 
> typo: s/vid/pvid/

How the hell did this even build then...!  Oh,  the last patch moved it elsewhere and
fixed it.

Fixed.
Thanks
-vlad

> 
> Thanks,
> Toshiaki Makita
> 


  reply	other threads:[~2014-10-03 13:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 23:54 [Bridge] [PATCH v3 net-next 0/3] bridge: Add vlan filtering support for default pvid Vladislav Yasevich
2014-10-02 23:54 ` [Bridge] [PATCH v3 net-next 1/3] bridge: Add a default_pvid sysfs attribute Vladislav Yasevich
2014-10-03  1:08   ` Toshiaki Makita
2014-10-03 13:42     ` Vlad Yasevich [this message]
2014-10-03 14:31       ` Toshiaki Makita
2014-10-02 23:54 ` [Bridge] [PATCH v3 net-next 2/3] bridge: Simplify pvid checks Vladislav Yasevich
2014-10-03  1:11   ` Toshiaki Makita
2014-10-02 23:54 ` [Bridge] [PATCH v3 net-next 3/3] bridge: Add filtering support for default_pvid Vladislav Yasevich
2014-10-03  1:11   ` Toshiaki Makita
2014-10-03  4:41   ` Cong Wang
2014-10-03 13:37     ` Vlad Yasevich
2014-10-03 16:42       ` Cong Wang

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=542EA7A8.1070701@redhat.com \
    --to=vyasevic@redhat.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=makita.toshiaki@lab.ntt.co.jp \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vyasevich@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).