Re: [patch net-next v5 0/4] return offloaded stats as default and expose original sw stats

2016-06-23 Thread Roopa Prabhu
On 6/22/16, 10:40 PM, Jiri Pirko wrote: > Wed, Jun 22, 2016 at 09:32:25PM CEST, ro...@cumulusnetworks.com wrote: >> On Tue, Jun 21, 2016 at 8:15 AM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> The problem we try to handle is about offloaded forwarded

Re: [PATCH iproute2 net-next v4 0/5] bridge: json support for fdb and vlan show

2016-06-23 Thread Roopa Prabhu
50PM CEST, ro...@cumulusnetworks.com wrote: >>> >From: Roopa Prabhu <ro...@cumulusnetworks.com> >>> > >>> >This patch series adds json support for a few bridge show commands. >>> >We plan to follow up with json support for additional commands

Re: [patch net-next v5 0/4] return offloaded stats as default and expose original sw stats

2016-06-22 Thread Roopa Prabhu
On Tue, Jun 21, 2016 at 8:15 AM, Jiri Pirko wrote: > From: Jiri Pirko > > The problem we try to handle is about offloaded forwarded packets > which are not seen by kernel. Let me try to draw it: > > port1 port2 (HW stats are counted

Re: [PATCH iproute2 net-next v4 0/5] bridge: json support for fdb and vlan show

2016-06-22 Thread Roopa Prabhu
On Wed, Jun 22, 2016 at 11:10 AM, Stephen Hemminger <step...@networkplumber.org> wrote: > On Wed, 22 Jun 2016 16:53:44 +0200 > Jiri Pirko <j...@resnulli.us> wrote: > >> Wed, Jun 22, 2016 at 03:45:50PM CEST, ro...@cumulusnetworks.com wrote: >> >From: Roo

Re: [PATCH iproute2 net-next v4 0/5] bridge: json support for fdb and vlan show

2016-06-22 Thread Roopa Prabhu
On Wed, Jun 22, 2016 at 7:53 AM, Jiri Pirko <j...@resnulli.us> wrote: > Wed, Jun 22, 2016 at 03:45:50PM CEST, ro...@cumulusnetworks.com wrote: >>From: Roopa Prabhu <ro...@cumulusnetworks.com> >> >>This patch series adds json support for a few bridge show commands.

[PATCH iproute2 net-next v4 3/5] bridge: add json support for bridge fdb show

2016-06-22 Thread Roopa Prabhu
ot; },{ "mac": "44:38:39:00:69:89", "dev": "swp2s1", "vlan": 2, "master": "br0", "state": "permanent" },{ "mac": "44:38:39:00:69:88",

Re: [patch net-next v4 0/4] return offloaded stats as default and expose original sw stats

2016-06-22 Thread Roopa Prabhu
On Mon, Jun 20, 2016 at 5:28 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: > On 16-06-19 11:14 PM, Roopa Prabhu wrote: >> >> On Fri, Jun 17, 2016 at 10:12 AM, Florian Fainelli <f.faine...@gmail.com> >> wrote: > > > >> >> I have al

[PATCH iproute2 net-next v4 5/5] bridge: update man page

2016-06-22 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> Signed-off-by: Roopa Prabhu <ro...@cumulusnetworks.com> --- man/man8/bridge.8 | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 index 08e8a5b..abaee63 100644 --- a/man/m

[PATCH iproute2 net-next v4 4/5] bridge: add json schema for bridge fdb show

2016-06-22 Thread Roopa Prabhu
From: Anuradha Karuppiah Storing the schema file for the json format will be useful for doc purposes as optional paramaters are typically suppressed in the json sample outputs. Signed-off-by: Anuradha Karuppiah ---

[PATCH iproute2 net-next v4 1/5] json_writer: Removed automatic json-object type from the constructor

2016-06-22 Thread Roopa Prabhu
From: Anuradha Karuppiah Top level can be any json type and can be created using jsonw_start_object/jsonw_end_object etc. Signed-off-by: Anuradha Karuppiah --- lib/json_writer.c | 8 misc/ifstat.c | 7 +++

[PATCH iproute2 net-next v4 0/5] bridge: json support for fdb and vlan show

2016-06-22 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch series adds json support for a few bridge show commands. We plan to follow up with json support for additional commands soon. Anuradha Karuppiah (3): json_writer: Removed automatic json-object type from the constructor bridg

[PATCH iproute2 net-next v4 2/5] bridge: add json support for bridge vlan show

2016-06-22 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> $bridge -c vlan show portvlan ids swp1 1 PVID Egress Untagged 10-13 swp2 1 PVID Egress Untagged 10-13 br0 1 PVID Egress Untagged $bridge -json vlan show { "swp1": [{ "vlan&qu

[PATCH iproute2 net-next v3 2/5] bridge: add json support for bridge vlan show

2016-06-21 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> $bridge -c vlan show portvlan ids swp1 1 PVID Egress Untagged 10-13 swp2 1 PVID Egress Untagged 10-13 br0 1 PVID Egress Untagged $bridge -json vlan show { "swp1": [{ "vlan&qu

[PATCH iproute2 net-next v3 1/5] json_writer: allow base json data type to be array or object

2016-06-21 Thread Roopa Prabhu
From: Anuradha Karuppiah This patch adds a type qualifier to json_writer. Type can be a json object or array. This can be extended to other types like json-string, json-number etc in the future. Signed-off-by: Anuradha Karuppiah ---

[PATCH iproute2 net-next v3 3/5] bridge: add json support for bridge fdb show

2016-06-21 Thread Roopa Prabhu
},{ "mac": "44:38:39:00:69:89", "dev": "swp2s1", "vlan": 2, "master": "br0", "state": "permanent" },{ "mac": "44:38:39:00:69:88",

[PATCH iproute2 net-next v3 4/5] bridge: add json schema for bridge fdb show

2016-06-21 Thread Roopa Prabhu
From: Anuradha Karuppiah we think storing the schema file for the json format will be useful. Signed-off-by: Anuradha Karuppiah --- schema/bridge_fdb_schema.json | 62 +++ 1 file changed, 62

[PATCH iproute2 net-next v3 5/5] bridge: update man page

2016-06-21 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> Signed-off-by: Roopa Prabhu <ro...@cumulusnetworks.com> --- man/man8/bridge.8 | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 index 08e8a5b..abaee63 100644 --- a/man/m

[PATCH iproute2 net-next v3 0/5] bridge: json support for fdb and vlan show

2016-06-21 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch series adds json support for a few bridge show commands. We plan to follow up with json support for additional commands soon. Anuradha Karuppiah (3): json_writer: allow base json data type to be array or object bridge: ad

Re: rcu locking issue in mpls output code?

2016-06-20 Thread Roopa Prabhu
>> to protect the neigh state with rcu_read_lock() from softirq and we're >> already running under rcu_read_lock() when we get to neigh_xmit()) to >> eat the useless overhead of an extra rcu_read_{,un}lock_bh() pair, but >> sure, functionally that's correct, I think, and in my wo

Re: [patch net-next v4 0/4] return offloaded stats as default and expose original sw stats

2016-06-19 Thread Roopa Prabhu
On Fri, Jun 17, 2016 at 10:12 AM, Florian Fainelli wrote: > On 06/17/2016 08:42 AM, Jiri Pirko wrote: >> Fri, Jun 17, 2016 at 05:35:53PM CEST, d...@cumulusnetworks.com wrote: >>> On 6/17/16 8:54 AM, Jamal Hadi Salim wrote: On 16-06-17 10:05 AM, Jiri Pirko wrote: >

Re: [patch net-next v4 0/4] return offloaded stats as default and expose original sw stats

2016-06-19 Thread Roopa Prabhu
On Fri, Jun 17, 2016 at 7:54 AM, Jamal Hadi Salim wrote: > On 16-06-17 10:05 AM, Jiri Pirko wrote: >> >> Fri, Jun 17, 2016 at 03:48:35PM CEST, d...@cumulusnetworks.com wrote: >>> >>> On 6/17/16 2:24 AM, Jiri Pirko wrote: > >> >> That is problematic. Existing apps

Re: [patch net-next v4 0/4] return offloaded stats as default and expose original sw stats

2016-06-19 Thread Roopa Prabhu
On Fri, Jun 17, 2016 at 7:05 AM, Jiri Pirko wrote: > Fri, Jun 17, 2016 at 03:48:35PM CEST, d...@cumulusnetworks.com wrote: >>On 6/17/16 2:24 AM, Jiri Pirko wrote: >>> >>>The problem we try to handle is different, it's about offloaded >>>forwarded packets which are not seen by

[PATCH iproute2 net-next v2 3/5] bridge: add json support for bridge fdb show

2016-05-30 Thread Roopa Prabhu
},{ "mac": "44:38:39:00:69:89", "dev": "swp2s1", "vlan": 2, "master": "br0", "state": "permanent" },{ "mac": "44:38:39:00:69:88",

[PATCH iproute2 net-next v2 1/5] json_writer: allow base json data type to be array or object

2016-05-30 Thread Roopa Prabhu
From: Anuradha Karuppiah This patch adds a type qualifier to json_writer. Type can be a json object or array. This can be extended to other types like json-string, json-number etc in the future. Signed-off-by: Anuradha Karuppiah ---

[PATCH iproute2 net-next v2 4/5] bridge: add json schema for bridge fdb show

2016-05-30 Thread Roopa Prabhu
From: Anuradha Karuppiah we think storing the schema file for the json format will be useful. Signed-off-by: Anuradha Karuppiah --- schema/bridge_fdb_schema.json | 62 +++ 1 file changed, 62

[PATCH iproute2 net-next v2 0/5] bridge: json support for fdb and vlan show

2016-05-30 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch series adds json support for a few bridge show commands. We plan to follow up with json support for additional commands soon. Anuradha Karuppiah (3): json_writer: allow base json data type to be array or object bridge: ad

[PATCH iproute2 net-next v2 2/5] bridge: add json support for bridge vlan show

2016-05-30 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> $bridge -c vlan show portvlan ids swp1 1 PVID Egress Untagged 10-13 swp2 1 PVID Egress Untagged 10-13 br0 1 PVID Egress Untagged $bridge -json vlan show { "swp1": [{ "vlan&qu

[PATCH iproute2 net-next v2 5/5] bridge: update man page

2016-05-30 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> Signed-off-by: Roopa Prabhu <ro...@cumulusnetworks.com> --- man/man8/bridge.8 | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 index 08e8a5b..abaee63 100644 --- a/man/m

Re: [PATCH iproute2 net-next 2/5] bridge: add json support for bridge vlan show

2016-05-30 Thread Roopa Prabhu
On 5/29/16, 5:43 PM, Toshiaki Makita wrote: > On 2016/05/28 13:37, Roopa Prabhu wrote: >> From: Roopa Prabhu <ro...@cumulusnetworks.com> >> >> $bridge -c vlan show >> port vlan ids >> swp1 1 PVID Egress Untagged >> 10-13 >> >> swp2

[PATCH iproute2 net-next 0/5] bridge: json support for fdb and vlan show

2016-05-27 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch series adds json support for a few bridge show commands. We plan to follow up with json support for additional commands soon. Anuradha Karuppiah (3): json_writer: allow base json data type to be array or object bridge: ad

[PATCH iproute2 net-next 2/5] bridge: add json support for bridge vlan show

2016-05-27 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> $bridge -c vlan show portvlan ids swp1 1 PVID Egress Untagged 10-13 swp2 1 PVID Egress Untagged 10-13 br0 1 PVID Egress Untagged $bridge -j vlan show { "swp1": [{ "vlan&qu

[PATCH iproute2 net-next 5/5] bridge: update man page

2016-05-27 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> Signed-off-by: Roopa Prabhu <ro...@cumulusnetworks.com> --- man/man8/bridge.8 | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/man/man8/bridge.8 b/man/man8/bridge.8 index 08e8a5b..abaee63 100644 --- a/man/m

[PATCH iproute2 net-next 3/5] bridge: add json support for bridge fdb show

2016-05-27 Thread Roopa Prabhu
},{ "mac": "44:38:39:00:69:89", "dev": "swp2s1", "vlan": 2, "master": "br0", "state": "permanent" },{ "mac": "44:38:39:00:69:88",

[PATCH iproute2 net-next 4/5] bridge: add json schema for bridge fdb show

2016-05-27 Thread Roopa Prabhu
From: Anuradha Karuppiah we think storing the schema file for the json format will be useful. Signed-off-by: Anuradha Karuppiah --- schema/bridge_fdb_schema.json | 62 +++ 1 file changed, 62

[PATCH iproute2 net-next 1/5] json_writer: allow base json data type to be array or object

2016-05-27 Thread Roopa Prabhu
From: Anuradha Karuppiah This patch adds a type qualifier to json_writer. Type can be a json object or array. This can be extended to other types like json-string, json-number etc in the future. Signed-off-by: Anuradha Karuppiah ---

Re: [patch net-next 1/4] netdevice: add SW statistics ndo

2016-05-17 Thread Roopa Prabhu
On 5/17/16, 1:41 AM, Jiri Pirko wrote: > Tue, May 17, 2016 at 10:39:08AM CEST, tg...@suug.ch wrote: >> On 05/12/16 at 01:48pm, Jiri Pirko wrote: >>> diff --git a/net/core/dev.c b/net/core/dev.c >>> index 12436d1..a69e418 100644 >>> --- a/net/core/dev.c >>> +++ b/net/core/dev.c >>> @@ -7376,6

Re: [patch net-next 1/4] netdevice: add SW statistics ndo

2016-05-14 Thread Roopa Prabhu
>> slow-path aka SW stats. >>>> hmm...ok. But i am not sure how many will use this new attribute. >>>> When you do 'ip -s link show' you really want all counters on that port >>>> hardware or software does not matter at that point. >>>> >>&

Re: [patch net-next 1/4] netdevice: add SW statistics ndo

2016-05-14 Thread Roopa Prabhu
On 5/14/16, 5:49 AM, Jiri Pirko wrote: > Fri, May 13, 2016 at 08:47:48PM CEST, ro...@cumulusnetworks.com wrote: >> On 5/12/16, 11:03 PM, Jiri Pirko wrote: >>> Thu, May 12, 2016 at 11:10:08PM CEST, ro...@cumulusnetworks.com wrote: On 5/12/16, 4:48 AM, Jiri Pirko wrote: > From: Nogah

Re: [patch net-next 1/4] netdevice: add SW statistics ndo

2016-05-13 Thread Roopa Prabhu
se this new attribute. When you do 'ip -s link show' you really want all counters on that port hardware or software does not matter at that point. My suggestion to move this to ethtool like attribute is because that is an existing way to break down your stats which ever way you want. And the best part is it can be customized (say rx_pkts_cpu_saw) Thanks, Roopa

Re: [patch net-next 1/4] netdevice: add SW statistics ndo

2016-05-12 Thread Roopa Prabhu
On 5/12/16, 4:48 AM, Jiri Pirko wrote: > From: Nogah Frankel > > Till now we had a ndo statistics function that returned SW statistics. > We want to change the "basic" statistics to return HW statistics if > available. > In this case we need to expose a new ndo to return the

Re: [PATCH iproute2 net-next] ifstat: move to new RTM_GETSTATS api

2016-05-10 Thread Roopa Prabhu
On 5/9/16, 5:38 AM, Jamal Hadi Salim wrote: > On 16-05-09 12:49 AM, Roopa Prabhu wrote: >> On 4/30/16, 8:15 AM, Roopa Prabhu wrote: >>> On 4/30/16, 3:21 AM, Jamal Hadi Salim wrote: > >> AFAICS ifstat history file handling today assumes all 32 bit stats. > > Ind

Re: [PATCH iproute2 net-next] ifstat: move to new RTM_GETSTATS api

2016-05-08 Thread Roopa Prabhu
On 4/30/16, 8:15 AM, Roopa Prabhu wrote: > On 4/30/16, 3:21 AM, Jamal Hadi Salim wrote: >> On 16-04-30 02:41 AM, Roopa Prabhu wrote: >>> From: Roopa Prabhu <ro...@cumulusnetworks.com> >>> >>> This patch modifies ifstat to use the new RTM_GETST

Re: [PATCH iproute2 net-next] ifstat: move to new RTM_GETSTATS api

2016-04-30 Thread Roopa Prabhu
On 4/30/16, 3:21 AM, Jamal Hadi Salim wrote: > On 16-04-30 02:41 AM, Roopa Prabhu wrote: >> From: Roopa Prabhu <ro...@cumulusnetworks.com> >> >> This patch modifies ifstat to use the new RTM_GETSTATS api >> to query stats from the kernel. In the process this a

[PATCH iproute2 net-next] ifstat: move to new RTM_GETSTATS api

2016-04-30 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch modifies ifstat to use the new RTM_GETSTATS api to query stats from the kernel. In the process this also moves ifstat to use 64 bit stats. Signed-off-by: Roopa Prabhu <ro...@cumulusnetworks.com> --- include/libnetlink

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

2016-04-27 Thread Roopa Prabhu
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 at a time. Later when the filter_mask's 32 bits > are over we can switch to a

Re: [PATCH] net: ipv6: Delete host routes on an ifdown

2016-04-25 Thread Roopa Prabhu
s during re-implementing bits of it based on feedback. And one of our new recent tests under stress caught it and we rushed the fix out. thanks, Roopa

Re: switchdev fib offload issues

2016-04-21 Thread Roopa Prabhu
On 4/18/16, 10:17 AM, Hannes Frederic Sowa wrote: > Hi Jiri, > > On 18.04.2016 17:47, Jiri Pirko wrote: >> Proposed solutions (ideas): >> 1) per-netns. Add a procfs file: >> /proc/sys/net/ipv4/route/fib_offload_error_policy >> with values: "evict" - default, current behaviour >>

Re: [PATCH net-next v6] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-20 Thread Roopa Prabhu
On 4/20/16, 1:08 PM, David Miller wrote: > From: Roopa Prabhu <ro...@cumulusnetworks.com> > Date: Wed, 20 Apr 2016 08:43:43 -0700 > >> This patch adds a new RTM_GETSTATS message to query link stats via netlink >> from the kernel. RTM_NEWLINK also dumps stats today, but R

Re: [PATCH iproute2 WIP] ifstat: use new RTM_GETSTATS api

2016-04-20 Thread Roopa Prabhu
On 4/20/16, 11:53 AM, Stephen Hemminger wrote: > On Wed, 20 Apr 2016 09:16:15 -0700 > Roopa Prabhu <ro...@cumulusnetworks.com> wrote: > >> +int rtnl_wilddump_stats_req_filter(struct rtnl_handle *rth, int family, int >> type, >> + __u3

[PATCH iproute2 WIP] ifstat: use new RTM_GETSTATS api

2016-04-20 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> sample hacked up patch currently used for testing. needs re-work if ifstat will move to RTM_GETSTATS. Signed-off-by: Roopa Prabhu <ro...@cumulusnetworks.com> --- include/libnetlink.h | 6 ++ include/linux/if_l

[PATCH net-next v6] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-20 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-19 Thread Roopa Prabhu
> >>> nla_align_64bit(skb, attribute) or something. >> Yes, with the corresponding nla_total_size_64bit() > Good, idea, committed the following: > > Roopa, please use these helpers in your RTM_GETSTATS patch. will do. > > Thank you. > > >

Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-19 Thread Roopa Prabhu
On 4/19/16, 3:49 PM, David Miller wrote: > From: Roopa Prabhu <ro...@cumulusnetworks.com> > Date: Tue, 19 Apr 2016 12:05:00 -0700 > >> ok, will do. one thing though, for GETSTATS, if I need a pad >> attribute like IFLA_PAD, I will need to add a new stats attribute >&

Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-19 Thread Roopa Prabhu
On 4/19/16, 12:55 PM, Paul Moore wrote: > On Tue, Apr 19, 2016 at 4:26 AM, Nicolas Dichtel > <nicolas.dich...@6wind.com> wrote: >> + selinux maintainers >> >> Le 18/04/2016 23:10, Roopa Prabhu a écrit : >> [snip] >>> diff --git a/security/selinux/nlmsg

Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-19 Thread Roopa Prabhu
On 4/19/16, 11:31 AM, David Miller wrote: [snip] > > Here is the final patch I'm about to push out, thanks a lot Eric. > > Roopa, please adjust your GETSTATS patch as needed (I think you need > to adjust the SELinux table entry as well) and we can integrate that > too. ok,

Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-18 Thread Roopa Prabhu
On 4/18/16, 8:41 PM, David Miller wrote: > From: Roopa Prabhu <ro...@cumulusnetworks.com> > Date: Mon, 18 Apr 2016 14:10:19 -0700 > >> This patch adds a new RTM_GETSTATS message to query link stats via >> netlink from the kernel. RTM_NEWLINK also dumps stats today, but &

Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-18 Thread Roopa Prabhu
TPC[7d6c20] >> loopback_get_stats64+0x80/0xa0 >> [3391066.717858] Kernel unaligned access at TPC[8609dc] >> dev_get_stats+0x3c/0xe0 > Yes, rtnl_fill_stats() probably has the same mistake. > > commit 550bce59baf3f3059cd4ae1e268f08f2d2cb1d5c > Author: Roopa Prabhu <ro.

Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-18 Thread roopa
On 4/18/16, 5:57 PM, David Miller wrote: > From: Eric Dumazet <eric.duma...@gmail.com> > Date: Mon, 18 Apr 2016 14:35:56 -0700 > >> On Mon, 2016-04-18 at 14:10 -0700, Roopa Prabhu wrote: >> >>> + if (filter_mask & IFLA_STATS_FILTER_BIT(IFLA_

Re: [PATCH net-next v4] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-18 Thread roopa
On 4/18/16, 9:28 AM, David Miller wrote: > From: Roopa Prabhu <ro...@cumulusnetworks.com> > Date: Sun, 17 Apr 2016 22:35:35 -0700 > >> This patch adds a new RTM_GETSTATS message to query link stats via netlink >> from the kernel. RTM_NEWLINK also dumps stats today, but R

[PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-18 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

[PATCH net-next v4] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-17 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

Re: [PATCH net-next v3 1/2] rtnetlink: add new RTM_GETSTATS message to query stats

2016-04-16 Thread roopa
On 4/16/16, 12:49 AM, Thomas Graf wrote: > On 04/15/16 at 08:28pm, Roopa Prabhu wrote: >> +static u16 rtnl_stats_calcit(struct sk_buff *skb, struct nlmsghdr *nlh) >> +{ >> +struct net *net = sock_net(skb->sk); >> +struct net_device *dev; >> +u16 min_

[PATCH net-next] rtnetlink: rtnl_fill_stats: avoid an unnecssary stats copy

2016-04-15 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch passes netlink attr data ptr directly to dev_get_stats thus elimiating a stats copy. Suggested-by: David Miller <da...@davemloft.net> Signed-off-by: Roopa Prabhu <ro...@cumulusnetworks.com> --- net/cor

[PATCH net-next v3 1/2] rtnetlink: add new RTM_GETSTATS message to query stats

2016-04-15 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query stats via netlink from the kernel. RTM_NEWLINK also dumps link stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

[PATCH net-next v3 RFC 2/2] ipv6: add support for stats via RTM_GETSTATS

2016-04-15 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch is an example of adding af stats in RTM_GETSTATS. It adds a new nested IFLA_STATS_LINK_INET6 attribute for ipv6 af stats. stats attributes inside IFLA_STATS_LINK_INET6 nested attribute use the existing ipv6 stats attributes fro

[PATCH net-next v3 0/2] rtnetlink: new message for stats

2016-04-15 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query stats via netlink from the kernel. RTM_NEWLINK also dumps links stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

Re: [PATCH net-next v2 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-14 Thread roopa
On 4/13/16, 5:11 AM, Jamal Hadi Salim wrote: > On 16-04-12 09:21 AM, Thomas Graf wrote: >> On 04/11/16 at 08:53pm, roopa wrote: >>> Top level stats attributes can be netdev or global attributes: We can >>> include string "LINK" in >>> the names of all

Re: [PATCH net-next v2 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-14 Thread roopa
On 4/13/16, 9:19 PM, David Miller wrote: > From: Roopa Prabhu <ro...@cumulusnetworks.com> > Date: Fri, 8 Apr 2016 23:38:11 -0700 > >> This patch adds a new RTM_GETSTATS message to query link stats via netlink >> from the kernel. RTM_NEWLINK also dumps stats today, but R

Re: [PATCH net-next v2 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-11 Thread roopa
On 4/10/16, 11:28 AM, roopa wrote: > On 4/10/16, 1:16 AM, Thomas Graf wrote: [snip] >> >> This currently ties everything to a net_device with a selector to >> include certain bits of that net_device. How about we take it half a >> step further and allow for non net_d

[PATCH net-next WIP] ethtool: generic netlink policy

2016-04-10 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> netlink for ethtool came up at netconf/netdev and we had promised to send some of the ethtool netlink code we have. We use a generic netlink channel for ethtool between our kernel and user space driver. This ethtool channel nicely wraps most e

Re: [PATCH net-next v2 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-10 Thread roopa
On 4/10/16, 6:48 AM, Jamal Hadi Salim wrote: > On 16-04-09 02:00 PM, roopa wrote: > >> This EXTENDED_HW_STATS is for ethtool like extended hw stats. This is >> keeping in >> mind that we want to also move ethtool to netlink in the future and with >> switchdev >&g

Re: [PATCH net-next v2 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-10 Thread roopa
On 4/10/16, 1:16 AM, Thomas Graf wrote: > On 04/08/16 at 11:38pm, Roopa Prabhu wrote: >> From: Roopa Prabhu <ro...@cumulusnetworks.com> >> >> This patch adds a new RTM_GETSTATS message to query link stats via netlink >> from the kernel. RTM_NEWLINK also d

Re: [PATCH net-next v2 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-09 Thread roopa
On 4/9/16, 7:30 AM, Jamal Hadi Salim wrote: > > Thanks for doing the work Roopa and I apologize for late comments > below: > > On 16-04-09 02:38 AM, Roopa Prabhu wrote: >> From: Roopa Prabhu <ro...@cumulusnetworks.com> >> > >> This patch also allow

[PATCH net-next v2 0/2] rtnetlink: new message for stats

2016-04-09 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

[PATCH net-next v2 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-04-09 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

[PATCH net-next RFC v2 2/2] ipv6: add support for stats via RTM_GETSTATS

2016-04-09 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch is an example of adding af stats in RTM_GETSTATS. It adds a new nested IFLA_STATS_INET6 attribute for ipv6 af stats. stats attributes inside IFLA_STATS_INET6 nested attribute use the existing ipv6 stats attributes from ipv6 IFLA_PR

[PATCH net] mpls: find_outdev: check for err ptr in addition to NULL check

2016-04-07 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> find_outdev calls inet{,6}_fib_lookup_dev() or dev_get_by_index() to find the output device. In case of an error, inet{,6}_fib_lookup_dev() returns error pointer and dev_get_by_index() returns NULL. But the function only checks for NULL and th

Re: mpls's find_outdev()

2016-04-07 Thread roopa
On 4/7/16, 6:41 PM, David Miller wrote: > While auditing something unrelated, I noticed that this function seems > to potentially dev_put() on an error pointer. > > I guess the problem comes from the fact that there are two methods > by which the device pointer is obtained. > > First,

Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-16 Thread roopa
On 3/15/16, 1:20 AM, Nicolas Dichtel wrote: > Le 15/03/2016 07:30, roopa a écrit : >> On 3/14/16, 8:00 AM, Nicolas Dichtel wrote: >>> Le 13/03/2016 02:56, Roopa Prabhu a écrit : > [snip] >>>> diff --git a/include/uapi/linux/rtnetlink.h >>>> b/incl

Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-15 Thread roopa
On 3/15/16, 12:52 AM, Jiri Pirko wrote: > Tue, Mar 15, 2016 at 08:38:51AM CET, ro...@cumulusnetworks.com wrote: >> [snip] >> how does it matter if we have reached an agreement that the struct is >> required ?. >> unlike other messages, a filter_mask is an important and must attribute for >>

Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-15 Thread roopa
wrote: >>>>> Sun, Mar 13, 2016 at 02:56:25AM CET, ro...@cumulusnetworks.com wrote: >>>>>> From: Roopa Prabhu <ro...@cumulusnetworks.com> >>>>>> >>>>>> This patch adds a new RTM_GETSTATS message to query link stats via >&g

Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-15 Thread roopa
th libnl a lot and it is based on this assumption). so, RTM_NEWSTATS seems more appropriate here. But, if you have stronger reasons for RTM_GETSTATS, sure, pls let me know. Thanks, Roopa

Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-15 Thread roopa
On 3/14/16, 8:11 AM, Elad Raz wrote: > >> -Original Message- >> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] >> On Behalf Of Roopa Prabhu >> Sent: Sunday, March 13, 2016 3:56 AM >> To: netdev@vger.kernel.org >> Cc:

Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-15 Thread roopa
On 3/14/16, 8:00 AM, Nicolas Dichtel wrote: > Le 13/03/2016 02:56, Roopa Prabhu a écrit : >> From: Roopa Prabhu <ro...@cumulusnetworks.com> >> >> This patch adds a new RTM_GETSTATS message to query link stats via netlink >> from the kernel. RTM_NEWLINK also d

Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-15 Thread roopa
On 3/14/16, 12:04 PM, Jiri Pirko wrote: > Mon, Mar 14, 2016 at 07:45:23PM CET, ro...@cumulusnetworks.com wrote: >> On 3/14/16, 7:51 AM, Jiri Pirko wrote: >>> Sun, Mar 13, 2016 at 02:56:25AM CET, ro...@cumulusnetworks.com wrote: >>>> From: Roopa Pra

Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-14 Thread roopa
On 3/14/16, 7:51 AM, Jiri Pirko wrote: > Sun, Mar 13, 2016 at 02:56:25AM CET, ro...@cumulusnetworks.com wrote: >> From: Roopa Prabhu <ro...@cumulusnetworks.com> >> >> This patch adds a new RTM_GETSTATS message to query link stats via netlink > >from the kernel. R

[PATCH net-next 2/2] ipv6: add support for stats via RTM_GETSTATS

2016-03-12 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch is an example of adding af stats in RTM_GETSTATS. It adds a new nested IFLA_STATS_INET6 attribute for ipv6 af stats. stats attributes inside IFLA_STATS_INET6 nested attribute use the existing ipv6 stats attributes from ipv6 IFLA_PR

[PATCH net-next 0/2] rtnetlink: new message for stats

2016-03-12 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

[PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats

2016-03-12 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

Re: [PATCH net-next RFC] rtnetlink: add new RTM_GETSTATS to dump link stats

2016-02-25 Thread roopa
On 2/25/16, 8:26 AM, David Miller wrote: > From: roopa <ro...@cumulusnetworks.com> > Date: Wed, 24 Feb 2016 21:25:50 -0800 > >> I did go back and forth on the attribute vs mask. >> cosmetic but, i guess i did not feel good about having to redefine every >> attribu

Re: [PATCH net-next RFC] rtnetlink: add new RTM_GETSTATS to dump link stats

2016-02-24 Thread roopa
On 2/24/16, 1:40 PM, David Miller wrote: > From: Roopa Prabhu <ro...@cumulusnetworks.com> > Date: Mon, 22 Feb 2016 22:01:33 -0800 > >> From: Roopa Prabhu <ro...@cumulusnetworks.com> >> >> This patch adds a new RTM_GETSTATS message to query link stats via

Re: [PATCH net-next RFC] rtnetlink: add new RTM_GETSTATS to dump link stats

2016-02-24 Thread roopa
On 2/23/16, 1:26 AM, Rosen, Rami wrote: > Hi, > > + if (!dev) > + return -ENODEV; > + > + nskb = nlmsg_new(if_nlmsg_stats_size(dev), GFP_KERNEL); > + if (!nskb) > + return -ENOBUFS; > + > + err = rtnl_fill_statsinfo(nskb, dev, RTM_NEWSTATS, > +

[PATCH net-next RFC] rtnetlink: add new RTM_GETSTATS to dump link stats

2016-02-22 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds a new RTM_GETSTATS message to query link stats via netlink from the kernel. RTM_NEWLINK also dumps stats today, but RTM_NEWLINK returns a lot more than just stats and is expensive in some cases when frequent polling for stat

Re: [patch net-next 1/9] Introduce devlink infrastructure

2016-02-22 Thread roopa
tchdev drivers that expose netdevs would benefit from a native 'ip link' way to configure port splitting. This will be useful for nic drivers too. thanks, Roopa

[PATCH iproute2] bridge: add support for dynamic fdb entries

2016-02-19 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch is a follow up to the recently added 'static' fdb option. It introduces a new option 'dynamic' which adds dynamic fdb entries with NUD_REACHABLE. $bridge fdb add 00:01:02:03:04:06 dev eth0 master dynamic $bridge fdb show 00:01:02

Re: [PATCH net-next 1/2] mpls: packet stats

2016-02-16 Thread roopa
ER_SKIP_STATS). So, extending that interface for mpls is not the right thing to do either. There is work being done for a separate netlink infrastructure for stats. I would wait for that infrastructure to be ready to add mpls stats. It should be available soon. thanks, Roopa

Re: [patch net-next RFC 0/6] Introduce devlink interface and first drivers to use it

2016-02-07 Thread roopa
ps/api layer. ip link set dev swp1 swport_type eth swport_desired_type Taking this one step further, the port splitter management can be done in user-space: And, users/switch port management infra can use 'ip link add type swport ...' to create required switch ports. Thanks, Roopa

[PATCH iproute2] ip route: add mpls multipath support

2016-02-07 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> This patch adds support to add mpls multipath routes. example: ip -f mpls route add 100 \ nexthop as 200 via inet 10.1.1.2 dev swp1 \ nexthop as 700 via inet 10.1.1.6 dev swp2 Signed-off-by: Roopa Prabhu <ro...@cumulusnet

[PATCH iproute2] ipmonitor: match user option 'all' before 'all-nsid'

2016-02-02 Thread Roopa Prabhu
From: Roopa Prabhu <ro...@cumulusnetworks.com> 'ip monitor all' is broken on older kernels. This patch fixes 'ip monitor all' to match 'all' and not 'all-nsid'. It moves parsing arg 'all-nsid' to after parsing 'all'. Before: $ip monitor all NETLINK_LISTEN_ALL_NSID: Protocol not available

Re: [ovs-dev] [PATCH net 1/2] vxlan: Relax the MTU constraint on vxlan devices

2016-01-27 Thread roopa
On 1/10/16, 2:28 AM, Thomas Graf wrote: > On 01/09/16 at 10:39am, roopa wrote: >> On 1/6/16, 5:33 AM, David Wragg wrote: >>> Allow the MTU of vxlan devices without an underlying device to be set to >>> larger values (up to a maximum based on IP packet li

<    1   2   3   4   5   6   7   8   9   >