From: Roman Mashak <hidden> Date: 2017-09-08 21:52:44
Process IFLA_BRIDGE_VLAN_INFO attribute nested in IFLA_AF_SPEC, which
contains bridge vlan table per port passed in link events.
Roman Mashak (3):
bridge: isolate vlans parsing code in a separate API
bridge: dump vlan table information for link
bridge: request vlans along with link information
bridge/br_common.h | 1 +
bridge/link.c | 23 +++++++--
bridge/vlan.c | 145 +++++++++++++++++++++++++++--------------------------
3 files changed, 96 insertions(+), 73 deletions(-)
--
1.9.1
From: Roman Mashak <hidden> Date: 2017-09-08 21:52:51
IFLA_BRIDGE_VLAN_INFO parsing logic will be used in link and vlan
processing code, so it makes sense to move it in the separate function.
Signed-off-by: Roman Mashak <redacted>
---
bridge/br_common.h | 1 +
bridge/vlan.c | 145 +++++++++++++++++++++++++++--------------------------
2 files changed, 76 insertions(+), 70 deletions(-)
From: Roman Mashak <hidden> Date: 2017-09-08 21:52:58
Kernel also reports vlans a port is member of, so print it. Since vlan
table can be quite large, dump it only when detailed information is
requested.
Signed-off-by: Roman Mashak <redacted>
---
bridge/link.c | 7 +++++++
1 file changed, 7 insertions(+)
vlan information is already available with `bridge vlan show`. any
specific reason why you want it in
the link dump output ?
The problem is this might just make the link dump larger and also add
too much clutter into the regular link dump output. iproute2 detailed
dump is already a bit hard to interpret. And without compression by
default, vlan info can just take over the link dump output. It will be
hard to look for other link attributes after that :). We deploy with
thousands of vlans and without compression even bridge vlan default
output is already hard to interpret.
Can you please paste a sample default detailed output with your patch
with a few hundred vlans ?
vlan information is already available with `bridge vlan show`. any
specific reason why you want it in
the link dump output ?
>
The problem is this might just make the link dump larger and also add
too much clutter into the regular link dump output. iproute2 detailed
dump is already a bit hard to interpret. And without compression by
default, vlan info can just take over the link dump output. It will be
hard to look for other link attributes after that :). We deploy with
thousands of vlans and without compression even bridge vlan default
output is already hard to interpret.
Agree we should be turning on this stuff by default. i.e default stays
compressed; otherwise it a huge dump.
Having said that there is a lot of mess with this stuff.
The bridge link events _already send this IFLA_AF_SPCE info_
so not much choice there but to print it.
At minimal we need that part because unfortunately there is no
vlanfilter event in existence which will send us summaries of just
vlans added to a port i.e both use XXXLINK.
In general, the XXXLINK interface with these master devices (bridge,
bond etc) continues to get messy. Recently started seeing events with
devices claiming to be of KIND_slave etc on the bridge and bond devices;
yet at the same time my wireless card events are also showing up on the
bridge link even though it is not enslaved there..
cheers,
jamal
Can you please paste a sample default detailed output with your patch
with a few hundred vlans ?
vlan information is already available with `bridge vlan show`. any
specific reason why you want it in
the link dump output ?
The problem is this might just make the link dump larger and also add
too much clutter into the regular link dump output. iproute2 detailed
dump is already a bit hard to interpret. And without compression by
default, vlan info can just take over the link dump output. It will be
hard to look for other link attributes after that :). We deploy with
thousands of vlans and without compression even bridge vlan default
output is already hard to interpret.
Agree we should be turning on this stuff by default. i.e default stays
compressed; otherwise it a huge dump.
I think this should be dumped with the getlink request only on some additional
flag. The getlink does not include these by default.
Having said that there is a lot of mess with this stuff.
The bridge link events _already send this IFLA_AF_SPCE info_
so not much choice there but to print it.
Right, on NEWLINK per port notification you'll get the compressed vlan info.
At minimal we need that part because unfortunately there is no
vlanfilter event in existence which will send us summaries of just
vlans added to a port i.e both use XXXLINK.
But let's either add a new flag or use -compressvlans to print it when monitoring/showing
link otherwise people who are monitoring only the port flags will start getting lists
with vlans. Even compressed these can still be quite long and confusing, especially
when monitoring.
In general, the XXXLINK interface with these master devices (bridge,
bond etc) continues to get messy. Recently started seeing events with
devices claiming to be of KIND_slave etc on the bridge and bond devices;
yet at the same time my wireless card events are also showing up on the
bridge link even though it is not enslaved there..
cheers,
jamal
quoted
Can you please paste a sample default detailed output with your patch
with a few hundred vlans ?
vlan information is already available with `bridge vlan show`. any
specific reason why you want it in
the link dump output ?
The problem is this might just make the link dump larger and also add
too much clutter into the regular link dump output. iproute2 detailed
dump is already a bit hard to interpret. And without compression by
default, vlan info can just take over the link dump output. It will be
hard to look for other link attributes after that :). We deploy with
thousands of vlans and without compression even bridge vlan default
output is already hard to interpret.
Agree we should be turning on this stuff by default. i.e default stays
compressed; otherwise it a huge dump.
Having said that there is a lot of mess with this stuff.
The bridge link events _already send this IFLA_AF_SPCE info_
so not much choice there but to print it.
At minimal we need that part because unfortunately there is no
vlanfilter event in existence which will send us summaries of just
vlans added to a port i.e both use XXXLINK.
In general, the XXXLINK interface with these master devices (bridge,
bond etc) continues to get messy. Recently started seeing events with
devices claiming to be of KIND_slave etc on the bridge and bond devices;
yes, its a bit messy and redundant.
yet at the same time my wireless card events are also showing up on the
bridge link even though it is not enslaved there..
On Sat, Sep 9, 2017 at 11:15 AM, Nikolay Aleksandrov
[off-list ref] wrote:
On 09/09/17 20:23, Jamal Hadi Salim wrote:
quoted
On 17-09-09 12:24 PM, Roopa Prabhu wrote:
quoted
On Fri, Sep 8, 2017 at 2:52 PM, Roman Mashak [off-list ref] wrote:
quoted
Signed-off-by: Roman Mashak <redacted>
---
[snip]
quoted
quoted
vlan information is already available with `bridge vlan show`. any
specific reason why you want it in
the link dump output ?
The problem is this might just make the link dump larger and also add
too much clutter into the regular link dump output. iproute2 detailed
dump is already a bit hard to interpret. And without compression by
default, vlan info can just take over the link dump output. It will be
hard to look for other link attributes after that :). We deploy with
thousands of vlans and without compression even bridge vlan default
output is already hard to interpret.
Agree we should be turning on this stuff by default. i.e default stays
compressed; otherwise it a huge dump.
I think this should be dumped with the getlink request only on some additional
flag. The getlink does not include these by default.
quoted
Having said that there is a lot of mess with this stuff.
The bridge link events _already send this IFLA_AF_SPCE info_
so not much choice there but to print it.
Right, on NEWLINK per port notification you'll get the compressed vlan info.
quoted
At minimal we need that part because unfortunately there is no
vlanfilter event in existence which will send us summaries of just
vlans added to a port i.e both use XXXLINK.
But let's either add a new flag or use -compressvlans to print it when monitoring/showing
link otherwise people who are monitoring only the port flags will start getting lists
with vlans. Even compressed these can still be quite long and confusing, especially
when monitoring.
yes agree. It will add too much clutter to the monitor output too.
From: Nikolay Aleksandrov <hidden> Date: 2017-09-10 10:24:57
On 09/09/17 20:23, Jamal Hadi Salim wrote:
On 17-09-09 12:24 PM, Roopa Prabhu wrote:
quoted
On Fri, Sep 8, 2017 at 2:52 PM, Roman Mashak [off-list ref] wrote:
[snip]
Agree we should be turning on this stuff by default. i.e default stays
compressed; otherwise it a huge dump.
Having said that there is a lot of mess with this stuff.
The bridge link events _already send this IFLA_AF_SPCE info_
so not much choice there but to print it.
At minimal we need that part because unfortunately there is no
vlanfilter event in existence which will send us summaries of just
vlans added to a port i.e both use XXXLINK.
In general, the XXXLINK interface with these master devices (bridge,
bond etc) continues to get messy. Recently started seeing events with
devices claiming to be of KIND_slave etc on the bridge and bond devices;
yet at the same time my wireless card events are also showing up on the
bridge link even though it is not enslaved there..
Out of curiousity about this one, do you see the wifi card when doing bridge monitor ?
Or are you specifically watching AF_BRIDGE events, because bridge monitor link also can
include AF_UNSPEC ?
vlan information is already available with `bridge vlan show`. any
specific reason why you want it in
the link dump output ?
Since VLAN info is already in link messages, there is no other option but
dump it in monitor or "bridge link show". Yes, the output may be lengthy
and hard to digest for a human, that is why I put it under "show_details"
kludge - if one is requesting details, he/she should be prepared for
large volumes of data to be shown :)
As Nikolay suggested, it'll make sense to request compressed
output by default, this will be addresses in v2 patch.
[...]
vlan information is already available with `bridge vlan show`. any
specific reason why you want it in
the link dump output ?
Since VLAN info is already in link messages, there is no other option but
dump it in monitor or "bridge link show". Yes, the output may be lengthy
To make sure there's no misunderstanding - on GETLINK the vlan info is _not_
dumped by default (not compressed or otherwise).
It is only dumped compressed on port notifications, that is why I suggested to
use the already present flag (-compressvlans, -c) in order to include that info
when monitoring or dumping link info, so people watching for the port flags
(show_details) would not suddenly start getting a lot more and it makes sense
to dump it only on specific request.
and hard to digest for a human, that is why I put it under "show_details"
kludge - if one is requesting details, he/she should be prepared for
large volumes of data to be shown :)
As Nikolay suggested, it'll make sense to request compressed
output by default, this will be addresses in v2 patch.
[...]
From: Roman Mashak <hidden> Date: 2017-09-10 18:18:59
Nikolay Aleksandrov [off-list ref] writes:
On 10/09/17 16:38, Roman Mashak wrote:
[...]
quoted
Since VLAN info is already in link messages, there is no other option but
dump it in monitor or "bridge link show". Yes, the output may be lengthy
To make sure there's no misunderstanding - on GETLINK the vlan info is _not_
dumped by default (not compressed or otherwise).
Yes, I understand it, I was referring to link events in the previous
comment. However, why not to report compressed vlans for GETLINK by
default if show_details is true, this would be consistent with events monitor.
It seems to be more clear and intuitive from the user's perspective, the
same set of command line options for \monitor' or 'show' commands.
It is only dumped compressed on port notifications, that is why I suggested to
use the already present flag (-compressvlans, -c) in order to include that info
when monitoring or dumping link info, so people watching for the port flags
(show_details) would not suddenly start getting a lot more and it makes sense
to dump it only on specific request.
quoted
and hard to digest for a human, that is why I put it under "show_details"
kludge - if one is requesting details, he/she should be prepared for
large volumes of data to be shown :)
As Nikolay suggested, it'll make sense to request compressed
output by default, this will be addresses in v2 patch.
[...]
From: Nikolay Aleksandrov <hidden> Date: 2017-09-10 18:36:26
On 10/09/17 21:18, Roman Mashak wrote:
Nikolay Aleksandrov [off-list ref] writes:
quoted
On 10/09/17 16:38, Roman Mashak wrote:
[...]
quoted
quoted
Since VLAN info is already in link messages, there is no other option but
dump it in monitor or "bridge link show". Yes, the output may be lengthy
To make sure there's no misunderstanding - on GETLINK the vlan info is _not_
dumped by default (not compressed or otherwise).
Yes, I understand it, I was referring to link events in the previous
comment. However, why not to report compressed vlans for GETLINK by
default if show_details is true, this would be consistent with events monitor.
So my point is to only print the compressed vlans when the -c flag is present on
both occasions. I don't have any strong feeling about this, my only concern is that
people using -d with monitor will start suddenly seeing a lot more than they expect.
The -c (which already exists) will give them the option to skip it. Also the getlink
with lots of vlans and ports will grow by default if there's no way to remove the
vlan dumps (be it compressed or not).
In general I'd prefer to have only one way to do things, e.g. in this particular
case I'd advise people to use bridge vlan show, but I get it that monitor doesn't
show them anywhere. Maybe all of this should go under bridge monitor vlan or
bridge -compressvlans monitor link. Anyway, if other people are fine with extending
the 'show_details' only, then I won't stay in the way.
It seems to be more clear and intuitive from the user's perspective, the
same set of command line options for \monitor' or 'show' commands.
That I completely agree with. :-)
quoted
It is only dumped compressed on port notifications, that is why I suggested to
use the already present flag (-compressvlans, -c) in order to include that info
when monitoring or dumping link info, so people watching for the port flags
(show_details) would not suddenly start getting a lot more and it makes sense
to dump it only on specific request.
quoted
and hard to digest for a human, that is why I put it under "show_details"
kludge - if one is requesting details, he/she should be prepared for
large volumes of data to be shown :)
As Nikolay suggested, it'll make sense to request compressed
output by default, this will be addresses in v2 patch.
[...]