[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
- and the cleverness of a goto seems unecessary. cheers, jamal

[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
incase the feature of late binding was foreign to some people. + if (aexists && bind) + return 0; One extra tab? thanks for catching it. cheers, jamal

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
compat of RTM_NEWLINK and even new main struct for GETSTATS. cheers, jamal

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

2016-04-25 Thread Jamal Hadi Salim
on your other email this is taken care of? Let me know if you want me to do something from my side. I have other patches which build on top of this. If you have this one i will send the others. cheers, jamal

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
death sentence after 1 week of deliberation. You cant take it back after execution. cheers, jamal

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

2016-04-13 Thread Jamal Hadi Salim
f you nest it and have a top level attribute which is a list of requests. That may be borderline to overengineering though so I'm fine this as well. Well - using a subheader which has ifindex on it for non-netdev stats seems wrong then. cheers, jamal

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

2016-04-13 Thread Jamal Hadi Salim
had seen those numbers. If you please also add that to your commit numbers. cheers, jamal

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

2016-04-10 Thread Jamal Hadi Salim
use of Linux control APIs I hope. cheers, jamal

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

2016-04-10 Thread Jamal Hadi Salim
resolve other things with further discussions. And this patchset only adds a handler for RTM_NEWSTATS dump and get stats. Your stats events request should be part of the RTM_NEWSTATS handler and can include other attributes (like timeout) in the future. Ok. cheers, jamal Thanks, Roopa

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

2016-04-10 Thread Jamal Hadi Salim
end all the code together and pick what's the best. Sounds very interesting. cheers, jamal

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

2016-04-10 Thread Jamal Hadi Salim
tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; + __u8pad;/*reuse this space if you need 8bits for something*/ __u32 tcpi_rto; __u32 tcpi_ato; __u32 tcpi_snd_mss; cheers, jamal

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
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. cheers, jamal

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

2016-04-09 Thread Jamal Hadi Salim
v11 but forgot. cheers, jamal

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

2016-04-09 Thread Jamal Hadi Salim
double check to make sure this is 32 bit aligned (no holes) maybe in your case 64 bit aligned? Sticking + __u16 sctpi_p_error in there seems to kill it. Also, any plans to do the netlink events and destroy features? cheers, jamal

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

2016-04-09 Thread Jamal Hadi Salim
advocate question: If the bottleneck is the driver - is there an advantage in adding the bpf code at all in the driver? I am curious than before to see the comparison for the same bpf code running at tc level vs in the driver.. cheers, jamal

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

2016-04-09 Thread Jamal Hadi Salim
numbers if you did it at the driver... Note back in the day Alexey(not Alexei;->) had a built-in driver level forwarder; however the advantage there was derived out of packets being DMAed from ingress to egress port after some simple lookup. cheers, jamal

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

2016-04-09 Thread Jamal Hadi Salim
period and i just get STATS events ;-> The filter struct would have to be more sophisticated - user would need to pass a list of ifindices and filter_mask as well as timeout. cheers, jamal

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
1:1 \ action police $AVRATE conform-exceed drop/pipe Essentially this says to use a sampling frequency of 1sec with a smoothing frequency of 2secs and an average rate of 1Mbps. cheers, jamal

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

2016-03-07 Thread Jamal Hadi Salim
udo $TC filter add dev $SRCPORT parent : protocol ip \ u32 match ip protocol 1 0xff \ action mirred egress mirror dev dummy0 \ For redirect, one use case is to redirect packets to a remote machine based on policy intent. A sample policy is to add a default rule to redirect packets that dont mat

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

2016-03-07 Thread Jamal Hadi Salim
# In order to alter destination address of IPv6 TCP packets from fc00::1 # and correct the TCP checksum (nothing happened? except maybe for # checksums in the TCP payload ...). tc filter add eth0 prio 1 protocol ipv6 parent : \ u32 match ip6 src fc00::1/128 match ip6 protocol 0x06 0xff flowid :1 \ action pedit munge offset 24 u32 set 0x12345678 \ pipe csum tcp - cheers, jamal

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

2016-03-07 Thread Jamal Hadi Salim
-j CONNMARK --set-mark 0x10 ..add on ingress of $ETH an extractor for connmark... tc filter add dev $ETH parent : prio 4 protocol ip \ u32 match ip protocol 1 0xff \ flowid 1:1 \ action connmark continue ...if the connmark was 0x11, we police to a ridic rate of 10Kbps tc filter add dev $ETH parent : prio 5 protocol ip \ handle 0x11 fw flowid 1:1 \ action police rate 10kbit burst 10k cheers, jamal

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
uch sense to deliberately write code for that. Your test is still useful and i think should go into the tests dir. cheers, jamal Thanks for the review, Phil

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
we get into the TCA_#CLASSIFIER#_* set of attributes. Could we not steal a couple of bits off netlink flags? Then it applies to all subssystems. cheers, jamal

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

2016-02-25 Thread Jamal Hadi Salim
- the mellanox people and qualcom both complained about this (low speed) issue. I believe someone was recommending a "EINPROGRESS" netlink msg or even lying for the set case to say "success" when in fact it wasnt. EINPROGRESS may still be a useful idea but a different discussion. cheers, jamal

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   12   13   >