[PATCH net-next v3 4/4] bridge: netlink: export per-vlan stats

2016-04-30 Thread Nikolay Aleksandrov
(or something else if someone beats me to it) so avoiding at least a few more netlink attributes. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v3: no change v2: remove unused pvid pointer, fix the case where bridge has 0 vlans but there're global contexts and move to rtnl lin

[PATCH net-next v3 0/4] bridge: per-vlan stats

2016-04-30 Thread Nikolay Aleksandrov
d paddings for future extensions to avoid at least a few netlink attributes and improve struct alignment - drop the is_skb_forwardable argument constifying patch as it's not needed anymore, but it's a nice cleanup which I'll send separately Thank you, Nik Nikolay Aleksandrov (4): net: rtnetl

[PATCH net-next v3 2/4] net: rtnetlink: add linkxstats callbacks and attribute

2016-04-30 Thread Nikolay Aleksandrov
type. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v3: no change v2: add callback descriptions and make the size calculation more accurate, change the netlink xstats message structure with one more level for each rtnl link type which allows for private link type attr

Re: [PATCH net-next v2 0/5] bridge: per-vlan stats

2016-04-29 Thread Nikolay Aleksandrov
On 04/29/2016 10:12 PM, David Miller wrote: > From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> > Date: Fri, 29 Apr 2016 21:49:17 +0200 > >> Because that is not needed for the per-vlan stats to work, I did to >> unify the paths and simplify the pvid

Re: [PATCH net-next v2 0/5] bridge: per-vlan stats

2016-04-29 Thread Nikolay Aleksandrov
On 04/29/2016 09:33 PM, David Miller wrote: > From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> > Date: Thu, 28 Apr 2016 17:52:46 +0200 > >> This set adds support for bridge per-vlan statistics. > > Between the counter bumps in fast paths and new levels of poi

[PATCH net-next] net: constify is_skb_forwardable's arguments

2016-04-28 Thread Nikolay Aleksandrov
is_skb_forwardable is not supposed to change anything so constify its arguments Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- Hit this while working on the bridge per-vlan stats and needed to pass a constified skb down. skb_is_gso() already takes a const skb. i

[PATCH net-next v2 4/5] bridge: vlan: learn to count

2016-04-28 Thread Nikolay Aleksandrov
to account for Tx packets. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: no change net/bridge/br_private.h | 11 +- net/bridge/br_vlan.c| 53 +++-- 2 files changed, 53 insertions(+), 11 deletions(-) diff --git

[PATCH net-next v2 5/5] bridge: netlink: export per-vlan stats

2016-04-28 Thread Nikolay Aleksandrov
(or something else if someone beats me to it) so avoiding at least a few more netlink attributes. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: remove unused pvid pointer, fix the case where bridge has 0 vlans but there're global contexts and move to rtnl link type private attr

[PATCH net-next v2 0/5] bridge: per-vlan stats

2016-04-28 Thread Nikolay Aleksandrov
easily see that the infrastructure for private port/vlan stats is in place after this set. Though the stats api will need some more changes to support that. Nikolay Aleksandrov (5): net: rtnetlink: allow rtnl_fill_statsinfo to save private state counter net: rtnetlink: add linkxstats callbacks and

[PATCH net-next v2 3/5] bridge: vlan: RCUify pvid

2016-04-28 Thread Nikolay Aleksandrov
move to vlan passing via a pointer instead of id. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: no change net/bridge/br_netlink.c | 23 ++--- net/bridge/br_private.h | 16 +-- net/bridge/br_vlan.c

[PATCH net-next v2 1/5] net: rtnetlink: allow rtnl_fill_statsinfo to save private state counter

2016-04-28 Thread Nikolay Aleksandrov
by Roopa Prabhu. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: improve the error check in rtnl_fill_statsinfo, rename lidx to prividx, squash patch 2 into this one and save the current idx user instead of restricting only one net/core/rtnetlink.

[PATCH net-next v2 2/5] net: rtnetlink: add linkxstats callbacks and attribute

2016-04-28 Thread Nikolay Aleksandrov
type. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: add callback descriptions and make the size calculation more accurate, change the netlink xstats message structure with one more level for each rtnl link type which allows for private link type attributes and also

Re: [PATCH net-next 0/7] bridge: per-vlan stats

2016-04-28 Thread Nikolay Aleksandrov
On 04/27/2016 06:18 PM, Nikolay Aleksandrov wrote: > Hi, > This set adds support for bridge per-vlan statistics. > In order to be able to dump statistics we need a way to continue > dumping after reaching maximum size, thus patches 01-03 extend the new > stats API with a per-devic

Re: [PATCH net-next 2/7] net: rtnetlink: allow only one idx saving stats attribute

2016-04-28 Thread Nikolay Aleksandrov
On 04/28/2016 07:18 AM, Roopa Prabhu wrote: > On 4/27/16, 9:18 AM, Nikolay Aleksandrov wrote: >> We can't allow more than one stats attribute which uses the local idx >> since the result will be a mess. This is a simple check to make sure >> only one is being used

Re: [PATCH net-next 0/7] bridge: per-vlan stats

2016-04-27 Thread Nikolay Aleksandrov
On 04/27/2016 07:06 PM, Stephen Hemminger wrote: > On Wed, 27 Apr 2016 18:18:15 +0200 > Nikolay Aleksandrov <niko...@cumulusnetworks.com> wrote: > >> Hi, >> This set adds support for bridge per-vlan statistics. >> In order to be able to dump statistics we need a

[PATCH net-next 5/7] bridge: vlan: RCUify pvid

2016-04-27 Thread Nikolay Aleksandrov
move to vlan passing via a pointer instead of id. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- net/bridge/br_netlink.c | 23 ++--- net/bridge/br_private.h | 16 +-- net/bridge/br_vlan.c| 54 +++---

[PATCH net-next 7/7] bridge: netlink: export per-vlan stats

2016-04-27 Thread Nikolay Aleksandrov
Add a new LINK_XSTATS_BRIDGE_VLAN attribute and implement the RTM_GETSTATS callbacks for IFLA_STATS_LINK_XSTATS (fill_linkxstats and get_linkxstats_size) in order to export the per-vlan stats. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- include/uapi/linux/if_br

[PATCH net-next 3/7] net: rtnetlink: add linkxstats callbacks and attribute

2016-04-27 Thread Nikolay Aleksandrov
state and resume dumping (e.g. future bridge per-vlan stats will be dumped via this attribute and callbacks). Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- include/net/rtnetlink.h | 6 +- include/uapi/linux/if_link.h | 8 net/core/rtnetlink.c

[PATCH net-next 4/7] net: constify is_skb_forwardable's arguments

2016-04-27 Thread Nikolay Aleksandrov
is_skb_forwardable is not supposed to change anything so constify its arguments Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- include/linux/netdevice.h | 3 ++- net/core/dev.c| 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include

[PATCH net-next 6/7] bridge: vlan: learn to count

2016-04-27 Thread Nikolay Aleksandrov
to account for Tx packets. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- Note: maybe in the future it'd be better to rename br_allowed_ingress to br_vlan_ingress() or something similar as it's not doing only checks. net/bridge/br_private.h | 11 +- net/bridge/br_

[PATCH net-next 1/7] net: rtnetlink: allow rtnl_fill_statsinfo to save private state counter

2016-04-27 Thread Nikolay Aleksandrov
The new lidx argument allows the current dumping device to save a private state counter which would enable it to continue dumping from where it left off. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- net/core/rtnetlink.c | 21 +++-- 1 file chang

[PATCH net-next 2/7] net: rtnetlink: allow only one idx saving stats attribute

2016-04-27 Thread Nikolay Aleksandrov
We can't allow more than one stats attribute which uses the local idx since the result will be a mess. This is a simple check to make sure only one is being used at a time. Later when the filter_mask's 32 bits are over we can switch to a bitmap. Signed-off-by: Nikolay Aleksandrov <n

[PATCH net-next 0/7] bridge: per-vlan stats

2016-04-27 Thread Nikolay Aleksandrov
ivate port/vlan stats is in place after this set. Though the stats api will need some more changes to support that. Nikolay Aleksandrov (7): net: rtnetlink: allow rtnl_fill_statsinfo to save private state counter net: rtnetlink: allow only one idx saving stats attribute net: rtne

Re: [PATCH] veth: Fix potential memory leak in veth_newlink

2016-04-27 Thread Nikolay Aleksandrov
On 04/27/2016 12:42 PM, Haishuang Yan wrote: > Free peer netdev when failed to configure peer link or register dev. > > Signed-off-by: Haishuang Yan > --- > drivers/net/veth.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/veth.c

Re: [PATCH net-next 1/1] pch_gbe: replace private tx ring lock with common netif_tx_lock

2016-04-27 Thread Nikolay Aleksandrov
On 04/27/2016 12:49 AM, Francois Romieu wrote: > pch_gbe_tx_ring.tx_lock is only used in the hard_xmit handler and > in the transmit completion reaper called from NAPI context. > > Signed-off-by: Francois Romieu > --- > CONFIG_COMPILE_TESTed > >

[RFC PATCH] net: ipv4: add l3 and l4 multipath algorithms

2016-04-17 Thread Nikolay Aleksandrov
Hi all, I've been looking into adding both l3 and l4 multipath algorithms which are consistent in both forwarded and locally originated traffic. This attempt removes the old multipath code, and trades performance for unifying both locally originated and forwarded traffic cases. There's one case

[PATCH iproute2 v2 3/3] bridge: vlan: add support to filter by vlan id

2016-04-11 Thread Nikolay Aleksandrov
tvlan ids eth2 400-500 $ bridge vlan show vid 1 portvlan ids eth1 1 PVID Egress Untagged eth2 1 PVID br0 1 PVID Egress Untagged Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: don't print ports which are not matching the vlan filter The vcheck_re

[PATCH iproute2 v2 0/3] bridge: filtering by vlan id

2016-04-11 Thread Nikolay Aleksandrov
of empty "vlan ids" column Thank you, Nik Nikolay Aleksandrov (3): bridge: fdb: add support to filter by vlan id bridge: mdb: add support to filter by vlan id bridge: vlan: add support to filter by vlan id bridge/fdb.c | 21 +++-- bridge/mdb.c | 11 +

[PATCH iproute2 v2 1/3] bridge: fdb: add support to filter by vlan id

2016-04-11 Thread Nikolay Aleksandrov
2:54:00:bf:57:16 dev eth2 vlan 400 master br0 permanent Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: no change bridge/fdb.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/bridge/fdb.c b/bridge/fdb.c index df55e86

[PATCH iproute2 v2 2/3] bridge: mdb: add support to filter by vlan id

2016-04-11 Thread Nikolay Aleksandrov
ev br0 port eth2 grp 239.0.0.1 permanent vid 200 Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: no change bridge/mdb.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bridge/mdb.c b/bridge/mdb.c index 842536ec003c..6c904f8e6ae8 100644 --- a

Re: [PATCH iproute2 0/3] bridge: filtering by vlan id

2016-04-11 Thread Nikolay Aleksandrov
On 04/11/2016 03:18 PM, Nikolay Aleksandrov wrote: > Hi, > This set adds support for filtering by a vlan id when showing fdb/mdb/vlan > entries. Currently the filtering is implemented entirely in user-space, but > the plan is to add kernel support as well. The vlan show part is

[PATCH iproute2 2/3] bridge: mdb: add support to filter by vlan id

2016-04-11 Thread Nikolay Aleksandrov
ev br0 port eth2 grp 239.0.0.1 permanent vid 200 Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- bridge/mdb.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/bridge/mdb.c b/bridge/mdb.c index 842536ec003c..6c904f8e6ae8 100644 --- a/bridg

[PATCH iproute2 1/3] bridge: fdb: add support to filter by vlan id

2016-04-11 Thread Nikolay Aleksandrov
2:54:00:bf:57:16 dev eth2 vlan 400 master br0 permanent Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- bridge/fdb.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/bridge/fdb.c b/bridge/fdb.c index df55e86df83f..be849f980a80 10064

[PATCH iproute2 3/3] bridge: vlan: add support to filter by vlan id

2016-04-11 Thread Nikolay Aleksandrov
450 portvlan ids eth1 eth2 400-500 br0 Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- bridge/vlan.c | 63 +++ 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/bridge/vlan.c b/bridge/vlan.c ind

Re: [PATCHv3 net-next 0/6] bridge: support sending rntl info when we set attributes through sysfs/ioctl

2016-04-09 Thread Nikolay Aleksandrov
On 04/08/2016 06:03 PM, Xin Long wrote: > This patchset is used to support sending rntl info to user in some places, > and ensure that whenever those attributes change internally or from sysfs, > that a netlink notification is sent out to listeners. > > It also make some adjustment in bridge

Re: [PATCHv3 net-next 6/6] bridge: a netlink notification should be sent when those attributes are changed by ioctl

2016-04-09 Thread Nikolay Aleksandrov
h is used for ioctl. > > Signed-off-by: Xin Long <lucien@gmail.com> > --- > net/bridge/br_ioctl.c | 40 > 1 file changed, 24 insertions(+), 16 deletions(-) > LGTM, Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCHv3 net-next 5/6] bridge: a netlink notification should be sent when those attributes are changed by br_sysfs_if

2016-04-09 Thread Nikolay Aleksandrov
ange, before if the flags were the same a notification wouldn't be sent, now it would. Anyway I don't see a problem as this is true for other attributes which are set to the same value. Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCHv3 net-next 4/6] bridge: a netlink notification should be sent when those attributes are changed by br_sysfs_br

2016-04-09 Thread Nikolay Aleksandrov
individually. > > Signed-off-by: Xin Long <lucien@gmail.com> > --- > net/bridge/br_sysfs_br.c | 21 + > net/bridge/br_vlan.c | 30 +- > 2 files changed, 14 insertions(+), 37 deletions(-) > Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCHv3 net-next 3/6] bridge: simplify the stp_state_store by calling store_bridge_parm

2016-04-09 Thread Nikolay Aleksandrov
file changed, 9 insertions(+), 15 deletions(-) > Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCHv3 net-next 2/6] bridge: simplify the forward_delay_store by calling store_bridge_parm

2016-04-09 Thread Nikolay Aleksandrov
-- > 1 file changed, 10 insertions(+), 17 deletions(-) > Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCHv3 net-next 1/6] bridge: simplify the flush_store by calling store_bridge_parm

2016-04-09 Thread Nikolay Aleksandrov
cien@gmail.com> > --- > net/bridge/br_sysfs_br.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCH net-next v2] macvlan: Support interface operstate properly

2016-04-07 Thread Nikolay Aleksandrov
On 04/07/2016 12:36 AM, Debabrata Banerjee wrote: > Set appropriate macvlan interface status based on lower device and our > status. Can be up, down, or lowerlayerdown. What about dormant ? > > de7d244d0 improved operstate by setting it from unknown to up, however > it did not handle

Re: [PATCH] macvlan: Support interface operstate properly

2016-04-06 Thread Nikolay Aleksandrov
On 04/06/2016 11:26 PM, Banerjee, Debabrata wrote: > On 4/6/16, 5:03 PM, "Nikolay Aleksandrov" <niko...@cumulusnetworks.com> wrote: > > >> On 04/06/2016 10:30 PM, Debabrata Banerjee wrote: >>> Set appropriate macvlan interface status based on lower de

Re: [PATCH] macvlan: Support interface operstate properly

2016-04-06 Thread Nikolay Aleksandrov
On 04/06/2016 11:03 PM, Nikolay Aleksandrov wrote: > On 04/06/2016 10:30 PM, Debabrata Banerjee wrote: >> Set appropriate macvlan interface status based on lower device and our >> status. Can be up, down, or lowerlayerdown. >> >> Signed-off-by: Debabrata Banerjee <db

Re: [PATCH] macvlan: Support interface operstate properly

2016-04-06 Thread Nikolay Aleksandrov
On 04/06/2016 10:30 PM, Debabrata Banerjee wrote: > Set appropriate macvlan interface status based on lower device and our > status. Can be up, down, or lowerlayerdown. > > Signed-off-by: Debabrata Banerjee > May I ask what is exactly that you're fixing here ? I recently

Re: bridge/brctl/ip

2016-04-02 Thread Nikolay Aleksandrov
On 04/02/2016 09:26 PM, Bert Vermeulen wrote: > Hi all, > > I'm wondering about the current userspace toolset to control bridging in > the Linux kernel. As far as I can determine, functionality is a bit > scattered right now between the iproute2 (ip, bridge) and bridge-utils > (brctl) tools: > >

Re: [PATCH net-next 5/6] bridge: a netlink notification should be sent when those attributes are changed by br_sysfs_if

2016-03-20 Thread Nikolay Aleksandrov
On 03/16/2016 02:34 PM, Xin Long wrote: > Now when we change the attributes of bridge or br_port by netlink, > a relevant netlink notification will be sent, but if we change them > by ioctl or sysfs, no notification will be sent. > > We should ensure that whenever those attributes change

Re: [PATCH net-next 0/6] bridge: support sending rntl info when we set attributes through sysfs/ioctl

2016-03-20 Thread Nikolay Aleksandrov
On 03/16/2016 02:34 PM, Xin Long wrote: > This patchset is used to support sending rntl info to user in some places, > and ensure that whenever those attributes change internally or from sysfs, > that a netlink notification is sent out to listeners. > > It also make some adjustment in bridge

Re: [PATCH net-next 2/6] bridge: simplify the forward_delay_store by calling store_bridge_parm

2016-03-19 Thread Nikolay Aleksandrov
-- > 1 file changed, 10 insertions(+), 17 deletions(-) > I actually have a similar patch in my tree. :-) Acked-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCH net-next 1/6] bridge: add rtnl_lock in fdb_flush in br_sysfs_br.c

2016-03-19 Thread Nikolay Aleksandrov
On 03/16/2016 02:34 PM, Xin Long wrote: > In fdb_delete, it will send rtnl msg, so before that, we should > hold rtnl_lock in the function that call it in sysfs. > > Signed-off-by: Xin Long > --- > net/bridge/br_sysfs_br.c | 5 + > 1 file changed, 5 insertions(+) >

Re: [PATCH net-next 4/6] bridge: a netlink notification should be sent when those attributes are changed by br_sysfs_br

2016-03-19 Thread Nikolay Aleksandrov
On 03/16/2016 02:34 PM, Xin Long wrote: > Now when we change the attributes of bridge or br_port by netlink, > a relevant netlink notification will be sent, but if we change them > by ioctl or sysfs, no notification will be sent. > > We should ensure that whenever those attributes change

Re: [PATCH net-next 5/6] bridge: a netlink notification should be sent when those attributes are changed by br_sysfs_if

2016-03-19 Thread Nikolay Aleksandrov
On 03/16/2016 03:45 PM, Xin Long wrote: > On Wed, Mar 16, 2016 at 10:23 PM, Nikolay Aleksandrov > <niko...@cumulusnetworks.com> wrote: >> On 03/16/2016 02:34 PM, Xin Long wrote: >>> Now when we change the attributes of bridge or br_port by netlink, >>> a releva

Re: [PATCH net] bonding: fix bond_get_stats()

2016-03-19 Thread Nikolay Aleksandrov
s(+), 31 deletions(-) > Good catches! And the dev_get_stats() in bond_enslave is fine because the slave is not yet linked thus can't collide with reading/updating the stats via procfs. Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCH net-next 4/6] bridge: a netlink notification should be sent when those attributes are changed by br_sysfs_br

2016-03-19 Thread Nikolay Aleksandrov
On 03/16/2016 03:29 PM, Xin Long wrote: > On Wed, Mar 16, 2016 at 10:14 PM, Nikolay Aleksandrov > <niko...@cumulusnetworks.com> wrote: >> On 03/16/2016 02:34 PM, Xin Long wrote: >>> Now when we change the attributes of bridge or br_port by netlink, >>> a releva

Re: [PATCH net-next 3/6] bridge: simplify the stp_state_store by calling store_bridge_parm

2016-03-19 Thread Nikolay Aleksandrov
file changed, 7 insertions(+), 17 deletions(-) > LGTM. Note: it introduces a bug (missing rtnl) until patch 04 is applied. Acked-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [PATCH net-next 6/6] bridge: a netlink notification should be sent when those attributes are changed by ioctl

2016-03-19 Thread Nikolay Aleksandrov
h is used for ioctl. > > Signed-off-by: Xin Long <lucien@gmail.com> > --- > net/bridge/br_ioctl.c | 40 > 1 file changed, 24 insertions(+), 16 deletions(-) > LGTM, Acked-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

Re: [net-next 1/2] bonding: remove duplicate set of flag IFF_MULTICAST

2016-03-16 Thread Nikolay Aleksandrov
1 insertion(+), 1 deletion(-) > There're a few more bonding maintainers, I've added them to the CC list. Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com>

[PATCH iproute2 net-next v5] bridge: mdb: add support for extended router port information

2016-03-14 Thread Nikolay Aleksandrov
emp 234.39 dev br0 port eth1 grp 239.0.0.2 temp 97.17 dev br0 port eth1 grp 239.0.0.3 temp 105.36 router ports on br0: eth10.00 permanent router ports on br0: eth2 254.87 temp It also updates the bridge man page. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v5:

Re: [PATCHv2 net] bridge: a netlink notification should be sent whenever those attributes change

2016-03-08 Thread Nikolay Aleksandrov
On 03/08/2016 04:27 AM, Xin Long wrote: > Now when we change the attributes of bridge or br_port by netlink, > a relevant netlink notification will be sent, but if we change them > by ioctl or sysfs, no notification will be sent. > > we should ensure that whenever those attributes change

[PATCH iproute2 net-next v4] bridge: mdb: add support for extended router port information

2016-03-07 Thread Nikolay Aleksandrov
emp 234.39 dev br0 port eth1 grp 239.0.0.2 temp 97.17 dev br0 port eth1 grp 239.0.0.3 temp 105.36 router ports on br0: eth10.00 permanent router ports on br0: eth2 254.87 temp It also updates the bridge man page. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v4: mi

[PATCH iproute2 net-next v3] bridge: mdb: add support for extended router port information

2016-03-07 Thread Nikolay Aleksandrov
emp 234.39 dev br0 port eth1 grp 239.0.0.2 temp 97.17 dev br0 port eth1 grp 239.0.0.3 temp 105.36 router ports on br0: eth10.00 permanent router ports on br0: eth2 254.87 temp It also updates the bridge man page. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com&

Re: [PATCH iproute2 net-next] bridge: mdb: add support for extended router port information

2016-03-06 Thread Nikolay Aleksandrov
On 03/06/2016 09:56 PM, Stephen Hemminger wrote: > On Thu, 3 Mar 2016 16:19:34 +0100 > Nikolay Aleksandrov <niko...@cumulusnetworks.com> wrote: > >> +static int is_temp_mcast_rtr(__u8 type) >> { >> +if (type == MDB_RTR_TYPE_TEMP_QUERY || type == MDB_RTR_TY

Re: [PATCH net] bridge: a netlink notification should be sent whenever those attributes change

2016-03-05 Thread Nikolay Aleksandrov
On 03/05/2016 03:44 PM, Xin Long wrote: > On Thu, Mar 3, 2016 at 8:29 PM, Nikolay Aleksandrov > <niko...@cumulusnetworks.com> wrote: >> >> This is incorrect because you don't have rtnl here, bridge device sysfs >> options take care of rtnl only on per-option basis

Re: [PATCH net-next v3 4/4] ethtool.h: define INT_MAX for userland

2016-03-04 Thread Nikolay Aleksandrov
error: 'INT_MAX' undeclared (first > use in this function) > return speed <= INT_MAX || speed == SPEED_UNKNOWN > ^ > > Fixes: e02564ee334a ("ethtool: make validate_speed accept all speeds between > 0 and INT_MAX") > CC: Nikolay Aleksandrov <n

[PATCH iproute2 net-next v2] bridge: mdb: add support for extended router port information

2016-03-03 Thread Nikolay Aleksandrov
emp 234.39 dev br0 port eth1 grp 239.0.0.2 temp 97.17 dev br0 port eth1 grp 239.0.0.3 temp 105.36 router ports on br0: eth10.00 permanent router ports on br0: eth2 254.87 temp It also updates the bridge man page. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2:

[PATCH iproute2 net-next] bridge: mdb: add support for extended router port information

2016-03-03 Thread Nikolay Aleksandrov
emp 234.39 dev br0 port eth1 grp 239.0.0.2 temp 97.17 dev br0 port eth1 grp 239.0.0.3 temp 105.36 router ports on br0: eth10.00 permanent router ports on br0: eth2 254.87 temp It also updates the bridge man page. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- br

Re: [PATCH net] bridge: a netlink notification should be sent whenever those attributes change

2016-03-03 Thread Nikolay Aleksandrov
On 03/03/2016 01:16 PM, Xin Long wrote: > Now when we change the attributes of bridge or br_port by netlink, > a relevant netlink notification will be sent, but if we change them > by ioctl or sysfs, no notification will be sent. > > we should ensure that whenever those attributes change

[PATCH net-next v2 4/4] bridge: mcast: add support for more router port information dumping

2016-02-26 Thread Nikolay Aleksandrov
nsions to the router port without breaking compatibility. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: new patch, adds the extended router port netlink information include/uapi/linux/if_bridge.h | 14 +- net/bridge/br_mdb.c| 16 +

[PATCH net-next v2 3/4] bridge: mcast: add support for temporary port router

2016-02-26 Thread Nikolay Aleksandrov
Add support for a temporary router port which doesn't depend only on the incoming query. It can be refreshed if set to the same value, which is a no-op for the rest. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: split in two, this only adds the new temp router por

[PATCH net-next v2 1/4] bridge: mcast: use names for the different multicast_router types

2016-02-26 Thread Nikolay Aleksandrov
Using raw values makes it difficult to extend and also understand the code, give them names and do explicit per-option manipulation in br_multicast_set_port_router. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: set multicast_router first include/uapi/linux/if_br

[PATCH net-next v2 0/4] bridge: mcast: add support for temp router port

2016-02-26 Thread Nikolay Aleksandrov
in 2 Thanks, Nik Nikolay Aleksandrov (4): bridge: mcast: use names for the different multicast_router types bridge: mcast: do nothing if port's multicast_router is set to the same val bridge: mcast: add support for temporary port router bridge: mcast: add support for more router port

[PATCH net-next v2 2/4] bridge: mcast: do nothing if port's multicast_router is set to the same val

2016-02-26 Thread Nikolay Aleksandrov
This is needed for the upcoming temporary port router. There's no point to go through the logic if the value is the same. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- v2: no change net/bridge/br_multicast.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [PATCH net-next 0/3] bridge: mcast: add support for temp router port

2016-02-26 Thread Nikolay Aleksandrov
On 02/26/2016 07:59 PM, Nikolay Aleksandrov wrote: > Hi, > This set adds support for temporary router port which doesn't depend on > the incoming queries. It can be refreshed by setting multicast_router to > the same value (3). The first two patches are minor changes that prepar

[PATCH net-next 2/3] bridge: mcast: do nothing if port's multicast_router is set to the same val

2016-02-26 Thread Nikolay Aleksandrov
This is needed for the upcoming temporary port router. There's no point to go through the logic if the value is the same. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- net/bridge/br_multicast.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH net-next 1/3] bridge: mcast: use names for the different multicast_router types

2016-02-26 Thread Nikolay Aleksandrov
Using raw values makes it difficult to extend and also understand the code, give them names and do explicit per-option manipulation in br_multicast_set_port_router. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- include/uapi/linux/if_bridge.h | 7 + net/

[PATCH net-next 0/3] bridge: mcast: add support for temp router port

2016-02-26 Thread Nikolay Aleksandrov
to be able to dump its information the mdb router port format is changed and extended similar to how mdb entries format was done recently. The related iproute2 changes will be posted if this is accepted. Thanks, Nik Nikolay Aleksandrov (3): bridge: mcast: use names for the different

[PATCH net-next 3/3] bridge: mcast: add support for temporary port router

2016-02-26 Thread Nikolay Aleksandrov
ed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- include/uapi/linux/if_bridge.h | 15 ++- net/bridge/br_mdb.c| 16 ++-- net/bridge/br_multicast.c | 20 ++-- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/includ

Re: [PATCH net] net: vrf: Remove direct access to skb->data

2016-02-23 Thread Nikolay Aleksandrov
On 02/23/2016 07:10 PM, David Ahern wrote: > Nik pointed that the VRF driver should be using skb_header_pointer > instead of accessing skb->data and bits beyond directly which can > be garbage. > > Cc: Nikolay Aleksandrov <niko...@cumulusnetworks.com> > Si

[PATCH iproute2 net-next v2] bridge: mdb: add user-space support for extended attributes

2016-02-22 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Recently support was added to the kernel to be able to add more per-mdb entry attributes via standard netlink attributes of type MDBA_MDB_EATTR_. This patch adds support to iproute2 to parse and output these attributes. The first ex

Re: [PATCH iproute2 net-next] bridge: mdb: add user-space support for extended attributes

2016-02-22 Thread Nikolay Aleksandrov
On 02/22/2016 03:00 PM, Nikolay Aleksandrov wrote: > From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> > > Recently support was added to the kernel to be able to add more per-mdb > entry attributes via standard netlink attributes of type MDBA_MDB_EATTR_. > Th

[PATCH iproute2 net-next] bridge: mdb: add user-space support for extended attributes

2016-02-22 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Recently support was added to the kernel to be able to add more per-mdb entry attributes via standard netlink attributes of type MDBA_MDB_EATTR_. This patch adds support to iproute2 to parse and output these attributes. The first ex

Re: [PATCH net-next 0/2] bridge: mdb: add support for extended attributes

2016-02-18 Thread Nikolay Aleksandrov
On 02/18/2016 09:37 PM, David Miller wrote: > From: Nikolay Aleksandrov <ra...@blackwall.org> > Date: Tue, 16 Feb 2016 12:46:52 +0100 > >> Note that the reason we can't simply add an attribute after >> MDBA_MDB_ENTRY_INFO is that current users (e.g. iproute2) walk

[PATCH iproute2] iplink: bridge: remove unnecessary returns

2016-02-18 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> invarg exits so no need to return, remove this c error from my recent patches Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge.c | 50 -- 1

[PATCH net] net: make netdev_for_each_lower_dev safe for device removal

2016-02-17 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> When I used netdev_for_each_lower_dev in commit bad531623253 ("vrf: remove slave queue and private slave struct") I thought that it acts like netdev_for_each_lower_private and can be used to remove the current device fro

[PATCH iproute2 5/5] iplink: bridge_slave: add support for IFLA_BRPORT_FAST_LEAVE

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Add support to be able to view and change IFLA_BRPORT_FAST_LEAVE port attribute. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge_slave.c | 9 + 1 file changed, 9 insertions(+) dif

[PATCH iproute2 0/5] bridge: complete port netlink support

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Hi, This small set completes the port netlink support for iproute2 and allows to view and set all the available netlink port attributes. Cheers, Nik Nikolay Aleksandrov (5): iplink: bridge_slave: export read-only values

[PATCH iproute2 2/5] iplink: bridge_slave: add support for IFLA_BRPORT_PROXYARP

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Add support to be able to view and change IFLA_BRPORT_PROXYARP port attribute. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge_slave.c | 8 1 file changed, 8 insertions(+) dif

[PATCH iproute2 4/5] iplink: bridge_slave: add support for IFLA_BRPORT_MULTICAST_ROUTER

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Add support to be able to view and change IFLA_BRPORT_MULTICAST_ROUTER port attribute. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge_slave.c | 13 + 1 file changed, 13 inserti

[PATCH iproute2 3/5] iplink: bridge_slave: add support for IFLA_BRPORT_PROXYARP_WIFI

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Add support to be able to view and change IFLA_BRPORT_PROXYARP_WIFI port attribute. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge_slave.c | 9 + 1 file changed, 9 insertions(+)

[PATCH iproute2 1/5] iplink: bridge_slave: export read-only values

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Export all the read-only values that get returned about a bridge port such as the timers, the ids, designated_port and cost, topology_change_ack and config_pending. For the bridge ids the br_dump_bridge_id function is exporte

[PATCH net-next 1/2] bridge: mdb: reduce the indentation level in br_mdb_fill_info

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Switch the port check and skip if it's null, this allows us to reduce one indentation level. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- net/bridge/br_mdb.c | 33 + 1

[PATCH net-next 0/2] bridge: mdb: add support for extended attributes

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Hi, This small set allows to extend the per mdb entry exported attributes, before this set we had only a structure exported which couldn't be changed because we would've broken user-space, after this we extend the attribute that wa

[PATCH net-next 2/2] bridge: mdb: add support for more attributes and export timer

2016-02-16 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Currently mdb entries are exported directly as a structure inside MDBA_MDB_ENTRY_INFO attribute, we can't really extend it without breaking user-space. In order to export new mdb fields, I've converted the MDBA_MDB_ENTRY_INFO into a

[PATCH iproute2] iplink: bond_slave: fix ad_actor/partner_oper_port_state output

2016-02-08 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> It seems that I've made a mistake when I exported these, instead of a space in the end I've put a newline character which is wrong and breaks the single line output. Fixes: 7d6bc3b87abad ("bonding: export 3ad actor and partner

[PATCH iproute2 04/21] iplink: bridge: add support for IFLA_BR_GROUP_FWD_MASK

2016-02-08 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> This patch implements support for the IFLA_BR_GROUP_FWD_MASK attribute in iproute2 so it can change the group forwarding mask. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge.c | 13

[PATCH iproute2 01/21] iplink: bridge: export bridge_id and designated_root

2016-02-08 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Netlink returns the bridge_id and designated_root, we just need to make them visible. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge.c | 25 + 1 file changed, 2

[PATCH iproute2 21/21] iplink: bridge: add support for netfilter call attributes

2016-02-08 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> This patch implements support for the IFLA_BR_NF_CALL_(IP|IP6|ARP)TABLES attributes in iproute2 so it can change their values. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_b

[PATCH iproute2 06/21] iplink: bridge: add support for IFLA_BR_VLAN_DEFAULT_PVID

2016-02-08 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> This patch implements support for the IFLA_BR_VLAN_DEFAULT_PVID attribute in iproute2 so it can change the default pvid. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge.c | 14 ++

[PATCH iproute2 10/21] iplink: bridge: add support for IFLA_BR_MCAST_QUERIER

2016-02-08 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> This patch implements support for the IFLA_BR_MCAST_QUERIER attribute in iproute2 so it can toggle the mcast querier value. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_bridge.c | 13 +

[PATCH iproute2 14/21] iplink: bridge: add support for IFLA_BR_MCAST_STARTUP_QUERY_CNT

2016-02-08 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> This patch implements support for the IFLA_BR_MCAST_STARTUP_QUERY_CNT attribute in iproute2 so it can change the startup query count. Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> --- ip/iplink_b

<    1   2   3   4   5   6   7   8   9   10   >