[net-next RFC 1/1] net sched actions: introduce timestamp for first time used

2016-05-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Useful to know when the action was first used for accounting (and debugging) Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/net/act_api.h| 2 ++ include/uapi/linux/pkt_cls.h | 1 + net/sched/act_api.c | 1

[net-next PATCH 1/2] net sched: indentation and other stylistic fixes

2016-05-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/net/act_api.h | 14 -- include/net/tc_act/tc_defact.h | 4 ++-- include/uapi/linux/pkt_cls.h | 6 +++--- net/sched/act_api.c

[net-next PATCH 2/2] net sched: actions use tcf_lastuse_update

2016-05-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- net/sched/act_connmark.c | 2 +- net/sched/act_csum.c | 2 +- net/sched/act_ife.c | 6 +++--- net/sched/act_ipt.c | 2 +- net/sched/act_mirred.c | 1 - net/sched/act_na

[net-next PATCH 0/2] net sched small OCD cleanups

2016-05-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> I have been staring at these small OCD cleanups for a while. Got cycles to do them as prep for another patch i am working on. Indentation/stylistic and consistency updates Jamal Hadi Salim (2): net sched: indentation and other OCD stylistic

Re: [Patch net] net_sched: close another race condition in tcf_mirred_release()

2016-05-17 Thread Jamal Hadi Salim
nlock in fast path") Fixes: 6bd00b850635 ("act_mirred: fix a race condition on mirred_list") Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> LGTM. Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [PATCH iproute2 -next] ingress, clsact: don't add TCA_OPTIONS to nl msg

2016-05-17 Thread Jamal Hadi Salim
# second one RTNETLINK answers: Invalid argument After: # tc qdisc replace dev foo clsact # tc qdisc replace dev foo clsact # tc qdisc replace dev foo clsact Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> I see need for

Re: [PATCH net-next] net: also make sch_handle_egress() drop monitor ready

2016-05-17 Thread Jamal Hadi Salim
es to drop monitors such as 'perf record -e skb:kfree_skb ...'. Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

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

2016-05-11 Thread Jamal Hadi Salim
On 16-05-10 12:25 PM, Roopa Prabhu wrote: On 5/9/16, 5:38 AM, Jamal Hadi Salim wrote: Is it not possible to convert to 64b - and IFLA_STAT becomes available just store it still in 64b? i.e 32b will fit in 64b space. The only problem is again if the last saved history file had 32 bit

Re: [net-next PATCH v2 1/6] net sched: vlan action fix late binding

2016-05-10 Thread Jamal Hadi Salim
On 16-05-08 11:08 PM, Cong Wang wrote: + if (aexists) + tcf_hash_release(a, bind); Introduce a goto to reduce duplicated cleanup code? I addressed all your comments except for above goto. There are different return codes for all failures - and the

[net PATCH v2 5/6] net sched: skbedit action fix late binding

2016-05-10 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add a skbedit action and give it an instance id of 1 sudo tc actions add action skbedit mark 10 index 1 //create a filter which binds to skbedit action id 1 sudo tc filter add dev $DEV

[net PATCH v2 2/6] net sched: ipt action fix late binding

2016-05-10 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This was broken and is fixed with this patch. //add an ipt action and give it an instance id of 1 sudo tc actions add action ipt -j mark --set-mark 2 index 1 //create a filter which binds to ipt action id 1 sudo tc filter add dev $DEV paren

[net PATCH v2 6/6] net sched: ife action fix late binding

2016-05-10 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add an ife action and give it an instance id of 1 sudo tc actions add action ife encode \ type 0xDEAD allow mark dst 02:15:15:15:15:15 index 1 //create a filter which binds to ife actio

[net PATCH v2 4/6] net sched: simple action fix late binding

2016-05-10 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add a simple action and give it an instance id of 1 sudo tc actions add action simple sdata "foobar" index 1 //create a filter which binds to simple action id 1 sudo tc fil

[net PATCH v2 0/6] net sched: Fix broken late binding of actions

2016-05-10 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Some actions were broken in allowing for late binding of actions. Late binding workflow is as follows: a) create an action and provide all necessary parameters for it Optionally provide an index or let the kernel give you one. Example: sudo tc a

[net PATCH v2 1/6] net sched: vlan action fix late binding

2016-05-10 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Late vlan action binding was broken and is fixed with this patch. //add a vlan action to pop and give it an instance id of 1 sudo tc actions add action vlan pop index 1 //create filter which binds to vlan action id 1 sudo tc filter add dev $DEV

[net PATCH v2 3/6] net sched: mirred action fix late binding

2016-05-10 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add an mirred action and give it an instance id of 1 sudo tc actions add action mirred egress mirror dev $MDEV index 1 //create a filter which binds to mirred action id 1 sudo tc filt

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

2016-05-09 Thread Jamal Hadi Salim
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. Indeed it does. And to preserve backward compatibility, new ifstat should work with old

[net PATCH v2 1/1] export tc ife uapi header

2016-05-09 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/uapi/linux/tc_act/Kbuild | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/tc_act/Kbuild b/include/uapi/linux/tc_act/Kbuild index 242cf0c..e3969bd 100644 -

Re: [net-next PATCH v2 0/6] net sched: Fix broken late binding of actions

2016-05-09 Thread Jamal Hadi Salim
On 16-05-09 12:30 AM, David Miller wrote: Dave, these deserve to go into -stable as well. Then don't target them at 'net-next'. If it's good enough for -stable it's by definition good enough for 'net'. will resend after processing comments. cheers, jamal

Re: [net-next PATCH v2 5/6] net sched: skbedit action fix late binding

2016-05-09 Thread Jamal Hadi Salim
On 16-05-08 11:28 PM, Cong Wang wrote: + /* if action exists and this is a late filter bind, no need +* to continue processing + */ This comment looks useless, at least for me, because the code is already clear. I will get rid of it. Note: I added it to one patch only

Re: [net-next PATCH v2 6/6] net sched: ife action fix late binding

2016-05-09 Thread Jamal Hadi Salim
On 16-05-08 11:32 PM, Cong Wang wrote: On Sun, May 8, 2016 at 10:26 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: @@ -689,7 +695,7 @@ static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a, /* OUTERHDR:TOTMETALEN:{TLVHDR:Metadatum:TLVHDR..}:OR

Re: [net-next PATCH v2 3/6] net sched: mirred action fix late binding

2016-05-09 Thread Jamal Hadi Salim
On 16-05-08 11:19 PM, Cong Wang wrote: On Sun, May 8, 2016 at 10:26 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: -static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) +static int tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a, in

Re: [net-next PATCH v2 1/6] net sched: vlan action fix late binding

2016-05-09 Thread Jamal Hadi Salim
On 16-05-08 11:08 PM, Cong Wang wrote: On Sun, May 8, 2016 at 10:26 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: [..] + aexists = tcf_hash_check(tn, parm->index, a, bind); I think 'exists' is a better name than 'aexists', shorter and clear. aexists is more specific (doe

Re: [net-next PATCH v2 0/6] net sched: Fix broken late binding of actions

2016-05-08 Thread Jamal Hadi Salim
On 16-05-08 01:26 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> Some actions were broken in allowing for late binding of actions. Dave, these deserve to go into -stable as well. cheers, jamal

[net-next PATCH v2 2/6] net sched: ipt action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This was broken and is fixed with this patch. //add an ipt action and give it an instance id of 1 sudo tc actions add action ipt -j mark --set-mark 2 index 1 //create a filter which binds to ipt action id 1 sudo tc filter add dev $DEV paren

[net-next PATCH v2 3/6] net sched: mirred action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add an mirred action and give it an instance id of 1 sudo tc actions add action mirred egress mirror dev $MDEV index 1 //create a filter which binds to mirred action id 1 sudo tc filt

[net-next PATCH v2 4/6] net sched: simple action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add a simple action and give it an instance id of 1 sudo tc actions add action simple sdata "foobar" index 1 //create a filter which binds to simple action id 1 sudo tc fil

[net-next PATCH v2 6/6] net sched: ife action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add an ife action and give it an instance id of 1 sudo tc actions add action ife encode \ type 0xDEAD allow mark dst 02:15:15:15:15:15 index 1 //create a filter which binds to skbedit

[net-next PATCH v2 5/6] net sched: skbedit action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add a skbedit action and give it an instance id of 1 sudo tc actions add action skbedit mark 10 index 1 //create a filter which binds to skbedit action id 1 sudo tc filter add dev $DEV

[net-next PATCH v2 1/6] net sched: vlan action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Late binding was broken and is fixed with this patch. //add a vlan action to pop and give it an instance id of 1 sudo tc actions add action vlan pop index 1 //create filter which binds to vlan action id 1 sudo tc filter add dev $DEV paren

[net-next PATCH v2 0/6] net sched: Fix broken late binding of actions

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Some actions were broken in allowing for late binding of actions. Late binding workflow is as follows: a) create an action and provide all necessary parameters for it Optionally provide an index or let the kernel give you one. Example: sudo tc a

Re: [net-next PATCH 0/6] Fix broken late binding of actions

2016-05-08 Thread Jamal Hadi Salim
On 16-05-08 01:16 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> Some actions were broken in allowing for late binding of actions. Late binding workflow is as follows: a) create an action and provide all necessary parameters for it Optionally provide an index

[net-next PATCH 6/6] tc ife action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add an ife action and give it an instance id of 1 sudo tc actions add action ife encode \ type 0xDEAD allow mark dst 02:15:15:15:15:15 index 1 //create a filter which binds to skbedit

[net-next PATCH 2/6] tc ipt action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This was broken and is fixed with this patch. //add an ipt action and give it an instance id of 1 sudo tc actions add action ipt -j mark --set-mark 2 index 1 //create a filter which binds to ipt action id 1 sudo tc filter add dev $DEV paren

[net-next PATCH 5/6] tc skbedit action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add a skbedit action and give it an instance id of 1 sudo tc actions add action skbedit mark 10 index 1 //create a filter which binds to skbedit action id 1 sudo tc filter add dev $DEV

[net-next PATCH 4/6] tc simple action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add a simple action and give it an instance id of 1 sudo tc actions add action simple sdata "foobar" index 1 //create a filter which binds to simple action id 1 sudo tc fil

[net-next PATCH 3/6] tc mirred action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> The process below was broken and is fixed with this patch. //add an mirred action and give it an instance id of 1 sudo tc actions add action mirred egress mirror dev $MDEV index 1 //create a filter which binds to mirred action id 1 sudo tc filt

[net-next PATCH 1/6] tc vlan action fix late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Late binding was broken and is fixed with this patch. //add a vlan action to pop and give it an instance id of 1 sudo tc actions add action vlan pop index 1 //create filter which binds to vlan action id 1 sudo tc filter add dev $DEV paren

[net-next PATCH 0/6] Fix broken late binding of actions

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Some actions were broken in allowing for late binding of actions. Late binding workflow is as follows: a) create an action and provide all necessary parameters for it Optionally provide an index or let the kernel give you one. Example: sudo tc a

[iproute2 PATCH 1/1] tc fix ife late binding

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> following late action binding didn't work: sudo tc actions add action ife encode \ type 0xDEAD allow mark dst 02:15:15:15:15:15 index 1 sudo tc filter add dev lo parent : protocol ip prio 2 u32\ match ip src 127.0.0.2/32 flowid 1:2 action ife

[iproute2 PATCH v2 1/1] tc simple action update and breakage

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Brings it closer to more serious actions (adding branching and allowing for late binding) Unfortunately this breaks old syntax of the simple action. But because simple is a pedagogical example unlikely to be used in production environments (i.e it

Re: [iproute2 PATCH 1/1] tc simple action update and breakage

2016-05-08 Thread Jamal Hadi Salim
On 16-05-08 10:44 AM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> Brings it closer to more serious actions (adding branching and allowing for late binding) Unfortunately this breaks old syntax of the simple action. But because simple is a pedagogical example un

[iproute2 PATCH 1/1] tc simple action update and breakage

2016-05-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Brings it closer to more serious actions (adding branching and allowing for late binding) Unfortunately this breaks old syntax of the simple action. But because simple is a pedagogical example unlikely to be used in production environments (i.e it

[iproute2 PATCH 1/1] tc: don't ignore ok as an action branch

2016-05-07 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This is what used to happen before: tc filter add dev tap1 parent : protocol 0xfefe prio 10 \ u32 match u32 0 0 flowid 1:16 \ action ife decode allow mark ok tc -s filter ls dev tap1 parent : filter protocol [65278] pref 10 u32

[iproute2 PATCH v4 1/1] tc: introduce IFE action

2016-05-07 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action allows for a sending side to encapsulate arbitrary metadata which is decapsulated by the receiving end. The sender runs in encoding mode and the receiver in decode mode. Both sender and receiver must specify the same ethertype. At some

[net-next PATCH 1/1] export tc ife uapi header

2016-05-07 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/uapi/linux/tc_act/Kbuild | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/tc_act/Kbuild b/include/uapi/linux/tc_act/Kbuild index 242cf0c..e3969bd 100644 -

Re: [iproute2 PATCH v3 1/1] tc: introduce IFE action

2016-05-07 Thread Jamal Hadi Salim
On 16-04-25 08:28 AM, Jamal Hadi Salim wrote: On 16-04-22 01:00 PM, Stephen Hemminger wrote: On Thu, 21 Apr 2016 17:40:14 -0400 All header files for iproute2 (in include/linux) should come from santized kernel headers. I do not see the file tc_ife.h in include/uapi/linux in current net-next

Re: [PATCH net-next] net: make sch_handle_ingress() drop monitor ready

2016-05-07 Thread Jamal Hadi Salim
<eduma...@google.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [iproute2 1/1] man: tc-ife.8: man page for ife action

2016-05-02 Thread Jamal Hadi Salim
On 16-05-02 06:10 PM, Stephen Hemminger wrote: On Sat, 30 Apr 2016 06:58:04 -0400 Jamal Hadi Salim <j...@mojatatu.com> wrote: From: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com>

[iproute2 1/1] man: tc-ife.8: man page for ife action

2016-04-30 Thread Jamal Hadi Salim
From: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/tc-ife.8 | 118 ++ 1 file changed, 118 insertions(+) create mode 100644

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

2016-04-30 Thread Jamal Hadi Salim
On 16-04-30 02:41 AM, Roopa Prabhu wrote: From: Roopa Prabhu 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. Breaks old kernels? May need to keep backward compat

Re: [iproute2 PATCH v3 1/1] tc: introduce IFE action

2016-04-25 Thread Jamal Hadi Salim
On 16-04-22 01:00 PM, Stephen Hemminger wrote: On Thu, 21 Apr 2016 17:40:14 -0400 All header files for iproute2 (in include/linux) should come from santized kernel headers. I do not see the file tc_ife.h in include/uapi/linux in current net-next kernel source tree. I am assuming based

Re: [net-next PATCH iproute2 v2 1/1] tc: introduce IFE action

2016-04-21 Thread Jamal Hadi Salim
On 16-04-21 05:41 PM, Jamal Hadi Salim wrote: On 16-04-21 05:36 PM, Stephen Hemminger wrote: On Thu, 21 Apr 2016 21:27:39 + Jamal Hadi Salim <j...@mojatatu.com> wrote: I use checkpatch from kernel source to check iproute code now. ah. It was wrong in this specific case. In any

Re: [net-next PATCH iproute2 v2 1/1] tc: introduce IFE action

2016-04-21 Thread Jamal Hadi Salim
On 16-04-21 05:36 PM, Stephen Hemminger wrote: On Thu, 21 Apr 2016 21:27:39 + Jamal Hadi Salim <j...@mojatatu.com> wrote: I use checkpatch from kernel source to check iproute code now. ah. It was wrong in this specific case. In any case I just resent the patch with the fixes.

[iproute2 PATCH v3 1/1] tc: introduce IFE action

2016-04-21 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action allows for a sending side to encapsulate arbitrary metadata which is decapsulated by the receiving end. The sender runs in encoding mode and the receiver in decode mode. Both sender and receiver must specify the same ethertype. At some

Re: [net-next PATCH iproute2 v2 1/1] tc: introduce IFE action

2016-04-21 Thread Jamal Hadi Salim
Sorry dropped the ball on this.. On 16-03-14 02:26 AM, Stephen Hemminger wrote: On Wed, 9 Mar 2016 07:04:36 -0500 Jamal Hadi Salim <j...@mojatatu.com> wrote: This code has diverged way from the general rule that ip utilities display format should match the command format. For e

Re: Deleting child qdisc doesn't reset parent to default qdisc?

2016-04-15 Thread Jamal Hadi Salim
On 16-04-14 01:49 PM, Eric Dumazet wrote: And what would be the chosen behavior ? TBF is probably a bad example because it started life as a classless qdisc. There was only one built-in fifo queue that was shaped. Then someone made it classful and changed this behavior. To me it sounds

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

2016-04-13 Thread Jamal Hadi Salim
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 stats belonging to a netdev to make it easier to recognize the netdev stats (example):

Re: [RFC PATCH v2 5/5] Add sample for adding simple drop program to link

2016-04-13 Thread Jamal Hadi Salim
On 16-04-10 02:38 PM, Brenden Blanco wrote: I always go for the lowest hanging fruit. Which to me is the 60% time spent above the driver level as shown above. [..] It seemed it was the driver path in your case. When we removed the driver overhead (as demoed at the tc workshop in netdev11) we

Re: [RFC PATCH v2 1/5] bpf: add PHYS_DEV prog type for early driver filter

2016-04-10 Thread Jamal Hadi Salim
On 16-04-10 12:53 PM, Tom Herbert wrote: We started discussions about this in IOvisor. The Huawei project is called ceth (Common Ethernet). It is essentially a layer called directly from drivers intended for fast path forwarding and network virtualization. They have put quite a bit of effort

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

2016-04-10 Thread Jamal Hadi Salim
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 it becomes more necessary that we provide all stats closer to the other netdev stats. So far

Re: [RFC PATCH v2 1/5] bpf: add PHYS_DEV prog type for early driver filter

2016-04-10 Thread Jamal Hadi Salim
On 16-04-09 01:26 PM, Alexei Starovoitov wrote: yeah, no stack, no queues in bpf. Thanks. If this is _forwarding only_ it maybe useful to look at Alexey's old code in particular the DMA bits; he built his own lookup algorithm but sounds like bpf is a much better fit today. a link to

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-10 Thread Jamal Hadi Salim
On 16-04-09 01:21 PM, Eric Dumazet wrote: Well, once a hole is there, nothing we can do really, because of compatibility with old kernels / old binaries. But when a _new_ structure is defined, this is the time where we can ask for doing sensible things ;) This one is fixable. sizeof()

Re: [RFC PATCH v2 5/5] Add sample for adding simple drop program to link

2016-04-09 Thread Jamal Hadi Salim
On 16-04-09 12:43 PM, Brenden Blanco wrote: On Sat, Apr 09, 2016 at 10:48:05AM -0400, Jamal Hadi Salim wrote: Ok, sorry - should have looked this far before sending earlier email. So when you run concurently you see about 5Mpps per core but if you shoot all traffic at a single core you see

Re: [RFC PATCH v2 1/5] bpf: add PHYS_DEV prog type for early driver filter

2016-04-09 Thread Jamal Hadi Salim
On 16-04-09 07:29 AM, Tom Herbert wrote: +1. Forwarding which will be a common application almost always requires modification (decrement TTL), and header data split has always been a weak feature since the device has to have some arbitrary rules about what headers needs to be split out (either

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Jamal Hadi Salim
On 16-04-09 01:16 AM, Eric Dumazet wrote: Lots of holes in this structure... I may have mentioned to you that there is 8 bit hole in tcp_info too ;-> (above tcpi_rto). Adding an 8 bit explicit pad seems useful since it is already in the wild. I was going to send the patch after netdev11

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Jamal Hadi Salim
Appreciate these patches. Finally some love for sctp. Small comment below: On 16-04-09 12:53 AM, Xin Long wrote: sctp_diag will dump some important details of sctp's assoc or ep, we use sctp_info to describe them, sctp_get_sctp_info to get them, and export it to sctp_diag.ko. Signed-off-by:

Re: [RFC PATCH v2 5/5] Add sample for adding simple drop program to link

2016-04-09 Thread Jamal Hadi Salim
On 16-04-08 12:48 AM, Brenden Blanco wrote: Add a sample program that only drops packets at the BPF_PROG_TYPE_PHYS_DEV hook of a link. With the drop-only program, observed single core rate is ~19.5Mpps. Other tests were run, for instance without the dropcnt increment or without reading from the

Re: [RFC PATCH v2 0/5] Add driver bpf hook for early packet drop

2016-04-09 Thread Jamal Hadi Salim
On 16-04-08 12:47 AM, Brenden Blanco wrote: This patch set introduces new infrastructure for programmatically processing packets in the earliest stages of rx, as part of an effort others are calling Express Data Path (XDP) [1]. Start this effort by introducing a new bpf program type for early

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

2016-04-09 Thread Jamal Hadi Salim
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 This patch also allows for af family stats (an example af stats for IPV6 is available with the second patch in the series).

Re: [net-next PATCH iproute2 v2 1/1] tc: introduce IFE action

2016-03-10 Thread Jamal Hadi Salim
On 16-03-09 08:12 AM, Phil Sutter wrote: On Wed, Mar 09, 2016 at 07:04:36AM -0500, Jamal Hadi Salim wrote: +static void ife_explain(void) +{ + fprintf(stderr, + "Usage:... ife {decode|encode} {ALLOW|USE} [dst DMAC] [src SMAC] [type TYPE] [CONTROL] [index INDEX]\n&quo

[net-next PATCH iproute2 v2 0/1] tc ife action

2016-03-09 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> v2 changes: Incorporate help guide and other suggestions from Phil Sutter Jamal Hadi Salim (1): tc: introduce IFE action tc/Makefile | 1 + tc/m_ife.c | 340 2 files change

[net-next PATCH iproute2 v2 1/1] tc: introduce IFE action

2016-03-09 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action allows for a sending side to encapsulate arbitrary metadata which is decapsulated by the receiving end. The sender runs in encoding mode and the receiver in decode mode. Both sender and receiver must specify the same ethertype. At some

[net-next PATCH iproute2 1/1] tc: introduce IFE action

2016-03-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <h...@mojatatu.com> This action allows for a sending side to encapsulate arbitrary metadata which is decapsulated by the receiving end. The sender runs in encoding mode and the receiver in decode mode. Both sender and receiver must specify the same ethertype. At some

Re: [iproute PATCH 06/12] man: Add a man page for the police action

2016-03-07 Thread Jamal Hadi Salim
On 16-03-04 07:11 AM, Phil Sutter wrote: Cc: Alexey Kuznetsov Signed-off-by: Phil Sutter --- man/man8/tc-police.8 | 127 +++ 1 file changed, 127 insertions(+) create mode 100644 man/man8/tc-police.8 diff

Re: [iproute PATCH 03/12] man: Add a man page for the mirred action

2016-03-07 Thread Jamal Hadi Salim
BTW, thanks for putting in this effort. On 16-03-04 07:11 AM, Phil Sutter wrote: Signed-off-by: Phil Sutter --- man/man8/tc-mirred.8 | 89 1 file changed, 89 insertions(+) create mode 100644 man/man8/tc-mirred.8 diff

Re: [iproute PATCH 02/12] man: Add a man page for the csum action.

2016-03-07 Thread Jamal Hadi Salim
On 16-03-04 07:11 AM, Phil Sutter wrote: Cc: Gregoire Baron Signed-off-by: Phil Sutter --- man/man8/tc-csum.8 | 54 ++ 1 file changed, 54 insertions(+) create mode 100644 man/man8/tc-csum.8 diff --git

Re: [iproute PATCH 01/12] man: Add a man page for the connmark action

2016-03-07 Thread Jamal Hadi Salim
Phil, Not sure how your mailer works - I am assuming these are the same patches i got CCed on. On 16-03-04 07:11 AM, Phil Sutter wrote: Cc: Felix Fietkau Signed-off-by: Phil Sutter --- man/man8/tc-connmark.8 | 55

Re: [iproute PATCH v2 06/20] iproute: TYPE keyword is not optional, fix help text accordingly

2016-03-07 Thread Jamal Hadi Salim
On 16-03-03 10:05 AM, Phil Sutter wrote: On Thu, Mar 03, 2016 at 09:21:55AM -0500, Jamal Hadi Salim wrote: On 16-03-02 01:19 PM, Phil Sutter wrote: + fprintf(stderr, " unreachable | prohibit | blackhole | nat }\n"); Dont think nat exists anymore... But ipro

Re: [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments

2016-03-07 Thread Jamal Hadi Salim
On 16-03-03 09:32 AM, Phil Sutter wrote: Hi, The patches look good to me. Phil, maybe get rid of that comment at the top which was worrying about endianness. I think you fixed it. I'm not so sure. The kernel explicitly takes care to get the bit ordering right: [..] act_pedit though

Re: [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments

2016-03-03 Thread Jamal Hadi Salim
Phil, there is one thing i noticed in your patch - dont think it is a big deal but you are doing htons on an int (instead of u16). cheers, jamal On 16-03-03 09:21 AM, Jamal Hadi Salim wrote: On 16-03-02 12:54 PM, Stephen Hemminger wrote: On Wed, 2 Mar 2016 11:20:31 + Phil Sutter &l

Re: [net PATCH] net: sched: fix act_ipt for LOG target

2016-03-03 Thread Jamal Hadi Salim
On 16-03-03 08:34 AM, Phil Sutter wrote: From: Phil Sutter <p...@nwl.cc> Before calling the destroy() or target() callbacks, the family parameter field has to be initialized. Otherwise at least the LOG target will refuse to work and upon removal oops the kernel. Cc: Jamal Hadi Sa

Re: [Patch net-next] act_ife: fix a typo in kmemdup() parameters

2016-03-03 Thread Jamal Hadi Salim
On 16-03-02 02:20 PM, Cong Wang wrote: Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Thanks Cong. Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [iproute PATCH 3/3] tc: pedit: Fix retain value for ihl adjustments

2016-03-03 Thread Jamal Hadi Salim
would be nice to fix given the cleanup opportunity. The patches look good to me. Phil, maybe get rid of that comment at the top which was worrying about endianness. I think you fixed it. Acked-by: Jamal Hadi Salim <j...@mojatatu.com> Your tests in patch 0 are nice and could go in tests/ dire

Re: [iproute PATCH v2 06/20] iproute: TYPE keyword is not optional, fix help text accordingly

2016-03-03 Thread Jamal Hadi Salim
On 16-03-02 01:19 PM, Phil Sutter wrote: + fprintf(stderr, " unreachable | prohibit | blackhole | nat }\n"); Dont think nat exists anymore... cheers, jamal

[net-next-2.6 v4 0/3] net_sched: Add support for IFE action

2016-02-27 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> As agreed at netconf in Seville, here's the patch finally (1 year was just too long to wait for an ethertype. Now we are just going have the user configure one). Described in netdev01 paper: "Distributing Linux Traffic Control

[net-next-2.6 PATCH v4 2/3] Support to encoding decoding skb mark on IFE action

2016-02-27 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Example usage: Set the skb using skbedit then allow it to be encoded sudo tc qdisc add dev $ETH root handle 1: prio sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action skbedit mark 17 \ acti

[net-next-2.6 PATCH v4 3/3] Support to encoding decoding skb prio on IFE action

2016-02-27 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Example usage: Set the skb priority using skbedit then allow it to be encoded sudo tc qdisc add dev $ETH root handle 1: prio sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flow

[net-next-2.6 PATCH v4 1/3] introduce IFE action

2016-02-27 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action allows for a sending side to encapsulate arbitrary metadata which is decapsulated by the receiving end. The sender runs in encoding mode and the receiver in decode mode. Both sender and receiver must specify the same ethertype. At some

Re: [net-next-2.6 v3 1/3] introduce IFE action

2016-02-27 Thread Jamal Hadi Salim
On 16-02-26 06:49 PM, Cong Wang wrote: On Fri, Feb 26, 2016 at 2:43 PM, Jamal Hadi Salim <j...@mojatatu.com> wrote: [...] Just some quick reviews... ;) ;-> Ok, update in a little while after some basic testing... cheers, jamal

[net-next-2.6 v3 3/3] Support to encoding decoding skb prio on IFE action

2016-02-26 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Example usage: xxx: Set the skb priority using skbedit then allow it to be encoded sudo tc qdisc add dev $ETH root handle 1: prio sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action skbedit p

[net-next-2.6 v3 0/3] net_sched: Add support for IFE action

2016-02-26 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> As agreed at netconf in Seville, here's the patch finally (1 year was just too long to wait for an ethertype. Now we are just going have the user configure one). Described in netdev01 paper: "Distributing Linux Traffic Control

[net-next-2.6 v3 1/3] introduce IFE action

2016-02-26 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Described in netdev01 paper: "Distributing Linux Traffic Control Classifier-Action Subsystem" Authors: Jamal Hadi Salim and Damascene M. Joachimpillai This action allows for a sending side to encapsulate arbitrar

[net-next-2.6 v3 2/3] Support to encoding decoding skb mark on IFE action

2016-02-26 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Example usage: Set the skb using skbedit then allow it to be encoded sudo tc qdisc add dev $ETH root handle 1: prio sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action skbedit mark 17 \ acti

Re: [net-next PATCH 3/4] net: sched: cls_u32 add bit to specify software only rules

2016-02-25 Thread Jamal Hadi Salim
On 16-02-25 04:56 PM, John Fastabend wrote: On 16-02-25 04:56 AM, Jamal Hadi Salim wrote: decoding that is not a problem. The ixgbe driver code already applied can decode that without much trouble. The thing I want to avoid is requiring my driver to do the inverse translation because

Re: [net-next PATCH v2 1/5] introduce IFE action

2016-02-25 Thread Jamal Hadi Salim
On 16-02-25 04:46 PM, Daniel Borkmann wrote: On 02/25/2016 01:20 PM, Jamal Hadi Salim wrote: Let me think about it. Likely it will be subsequent patches - I just want to get this set out first. Yes, I mean one of the key motivation was "[...] to horizontally scale packet processing at

Re: [net-next PATCH 0/5] net_sched: Add support for IFE action

2016-02-25 Thread Jamal Hadi Salim
On 16-02-25 04:34 PM, Daniel Borkmann wrote: On 02/25/2016 01:23 PM, Jamal Hadi Salim wrote: On 16-02-24 12:48 PM, Daniel Borkmann wrote: On 02/24/2016 01:49 PM, Jamal Hadi Salim wrote: [...] Drivers do set the hash. My use case is slightly different. I have a NIC which has an embedded

Re: [net-next PATCH 3/4] net: sched: cls_u32 add bit to specify software only rules

2016-02-25 Thread Jamal Hadi Salim
On 16-02-24 11:09 PM, John Fastabend wrote: On 16-02-24 01:29 AM, Jiri Benc wrote: On Wed, 24 Feb 2016 00:55:55 -0800, John Fastabend wrote: The flags however likely stays with with TCA_U32_FLAGS until there is some better way to group common attributes in 'tc' framework. That's pretty bad,

Re: [net-next PATCH 4/4] net: sched: create hardware only classifier filter

2016-02-25 Thread Jamal Hadi Salim
On 16-02-24 03:47 AM, Jiri Pirko wrote: Tue, Feb 23, 2016 at 08:03:56PM CET, john.fastab...@gmail.com wrote: If users want to run filters specifically in hardware without software running the classifiers we need to use a special handler for this. By using a new classifier list we are able to

Re: [net-next PATCH 3/4] net: sched: cls_u32 add bit to specify software only rules

2016-02-25 Thread Jamal Hadi Salim
On 16-02-24 11:04 PM, John Fastabend wrote: On 16-02-24 05:31 AM, Jamal Hadi Salim wrote: I think this is absolutely necessary not only for performance of reporting the rules back to software but if we don't do it generically the driver will have to do it anyways because doing the inverse

<    4   5   6   7   8   9   10   11   >