Re: [PATCH RFC 1/3] xdp: Infrastructure to generalize XDP

2016-09-25 Thread Jamal Hadi Salim
On 16-09-23 10:14 AM, Tom Herbert wrote: On Fri, Sep 23, 2016 at 4:13 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: On 16-09-20 06:00 PM, Tom Herbert wrote: Tom, perused the thread and it seems you are serious ;-> Are we heading towards Frankenstein Avenue? I'm surprised. I thou

Re: [PATCH RFC 1/3] xdp: Infrastructure to generalize XDP

2016-09-25 Thread Jamal Hadi Salim
On 16-09-23 09:00 AM, Jesper Dangaard Brouer wrote: On Fri, 23 Sep 2016 07:13:30 -0400 Jamal Hadi Salim <j...@mojatatu.com> wrote: [..] Tom, perused the thread and it seems you are serious ;-> Are we heading towards Frankenstein Avenue? The whole point behind letting in

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-23 Thread Jamal Hadi Salim
On 16-09-23 01:11 AM, Shmulik Ladkani wrote: Hi, On Thu, 22 Sep 2016 19:40:15 -0400 Jamal Hadi Salim <j...@mojatatu.com> wrote: On 16-09-22 09:21 AM, Shmulik Ladkani wrote: From: Shmulik Ladkani <shmulik.ladk...@gmail.com> Up until now, 'action mirred' supported only egress act

Re: [PATCH RFC 1/3] xdp: Infrastructure to generalize XDP

2016-09-23 Thread Jamal Hadi Salim
mit was touted as the check and bound. eBPF sounded fine. This sounds like a huge contradiction. cheers, jamal

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-22 Thread Jamal Hadi Salim
i.e SET_TC_NCLS() cheers, jamal

Re: [Patch net] sch_sfb: keep backlog updated with qlen

2016-09-22 Thread Jamal Hadi Salim
On 16-09-18 07:22 PM, Cong Wang wrote: Fixes: 2f5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [Patch net] sch_qfq: keep backlog updated with qlen

2016-09-22 Thread Jamal Hadi Salim
On 16-09-18 07:22 PM, Cong Wang wrote: Reported-by: Stas Nichiporovich <stas...@gmail.com> Fixes: 2f5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> A

Re: [Patch net-next] net_sched: check NULL on error path in route4_change()

2016-09-22 Thread Jamal Hadi Salim
intel.com> Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [PATCH net 1/2] act_ife: Fix external mac header on encode

2016-09-22 Thread Jamal Hadi Salim
prio of 0x33 (unfortunately #skbedit is not very consistent 33 means 0x33) sudo $TC filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action skbedit prio 33 \ action ife encode \ type 0xDEAD \ use mark 12 \ allow prio \ dst 02:15:15:15:15:15 cheers, jamal

Re: [PATCH net] act_ife: Add support for machines with hard_header_len != mac_len

2016-09-22 Thread Jamal Hadi Salim
push(skb, hdrm); + __skb_push(skb, total_push); memcpy(skb->data, iethh, skb->mac_len); skb_reset_mac_header(skb); + skboff += skb->mac_len; Above looks dangerous. Did the compiler not warn? Maybe init skboff to skb->mac_len at the top. Otherwise the ingr

[PATCH v5 net-next 1/1] net sched actions: fix GETing actions

2016-09-19 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> With the batch changes that translated transient actions into a temporary list lost in the translation was the fact that tcf_action_destroy() will eventually delete the action from the permanent location if the refcount is zero. Example of what

Re: [PATCH net-next 2/2] net/sched: act_vlan: Introduce TCA_VLAN_ACT_MODIFY vlan action

2016-09-18 Thread Jamal Hadi Salim
nla_put_be16(skb, TCA_VLAN_PUSH_VLAN_PROTOCOL, v->tcfv_push_proto) || Nice. If you didnt do it I would have ;-> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [PATCH v2 net-next 2/2] net sched ife action: Introduce skb tcindex metadata encap decap

2016-09-18 Thread Jamal Hadi Salim
On 16-09-18 09:45 AM, kbuild test robot wrote: Hi Jamal, [auto build test ERROR on net-next/master] Hi monsieur/madame Bot, fixed in v3. cheers, jamal

[PATCH net-next 1/1] net sched: stylistic cleanups

2016-09-18 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- net/sched/act_api.c | 16 ++-- net/sched/act_csum.c| 36 ++-- net/sched/act_gact.c| 3 ++- net/sched/act_mirred.c | 3 ++

[PATCH net-next 1/1] net sched actions police: peg drop stats for conforming traffic

2016-09-18 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> setting conforming action to drop is a valid policy. When it is set we need to at least see the stats indicating it for debugging. Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com&

[PATCH v3 net-next 1/2] net sched ife action: add 16 bit helpers

2016-09-18 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> encoder and checker for 16 bits metadata Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/net/tc_act/tc_ife.h | 2 ++ net/sched/act_ife.c | 26 ++ 2 files changed, 28 insertions(+) diff --g

[PATCH v3 net-next 2/2] net sched ife action: Introduce skb tcindex metadata encap decap

2016-09-18 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Sample use case of how this is encoded: user space via tuntap (or a connected VM/Machine/container) encodes the tcindex TLV. Sample use case of decoding: IFE action decodes it and the skb->tc_index is then used to classify. So somet

Re: [PATCH v2 net-next 1/2] net sched ife action: add 16 bit helpers

2016-09-18 Thread Jamal Hadi Salim
Sorry something missing - will send v3. cheers, jamal On 16-09-18 07:21 AM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> encoder and checker for 16 bits metadata

[PATCH v2 net-next 2/2] net sched ife action: Introduce skb tcindex metadata encap decap

2016-09-18 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Sample use case of how this is encoded: user space via tuntap (or a connected VM/Machine/container) encodes the tcindex TLV. Sample use case of decoding: IFE action decodes it and the skb->tc_index is then used to classify. So somet

[PATCH v2 net-next 1/2] net sched ife action: add 16 bit helpers

2016-09-18 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> encoder and checker for 16 bits metadata Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/net/tc_act/tc_ife.h | 2 ++ net/sched/act_ife.c | 26 ++ 2 files changed, 28 insertions(+) diff --g

[PATCH v4 net 1/1] net sched actions: fix GETing actions

2016-09-16 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> With the batch changes that translated transient actions into a temporary list lost in the translation was the fact that tcf_action_destroy() will eventually delete the action from the permanent location if the refcount is zero. Example of what

[PATCH net-next 2/2] net sched ife action: Introduce skb tcindex metadata encap decap

2016-09-15 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Sample use case of how this is encoded: user space via tuntap (or a connected VM/Machine/container) encodes the tcindex TLV. Sample use case of decoding: IFE action decodes it and the skb->tc_index is then used to classify. So somet

[PATCH net-next 1/2] net sched ife action: add 16 bit helpers

2016-09-15 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> encoder and checker for 16 bits metadata Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/net/tc_act/tc_ife.h | 2 ++ net/sched/act_ife.c | 26 ++ 2 files changed, 28 insertions(+) diff --g

Re: [PATCH v3 net 1/1] net sched actions: fix GETing actions

2016-09-14 Thread Jamal Hadi Salim
On 16-09-13 03:47 PM, Jamal Hadi Salim wrote: On 16-09-13 12:20 PM, Cong Wang wrote: On Mon, Sep 12, 2016 at 4:07 PM, Jamal Hadi Salim <j...@mojatatu.com> wrote: [..] I am still trying to understand this piece, so here you hold the refcnt for the same action used by the later ite

Re: [PATCH v3 net 1/1] net sched actions: fix GETing actions

2016-09-13 Thread Jamal Hadi Salim
On 16-09-13 12:20 PM, Cong Wang wrote: On Mon, Sep 12, 2016 at 4:07 PM, Jamal Hadi Salim <j...@mojatatu.com> wrote: From: Jamal Hadi Salim <j...@mojatatu.com> With the batch changes that translated transient actions into a temporary list lost in the translation

[PATCH v6 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

Re: [PATCH v5 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
Ok, screwup. I used version 5 again ;-< I will resend and incorporate Florian's comment. cheers, jamal

[PATCH v5 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

Re: [PATCH v5 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
On 16-09-12 07:40 PM, Eric Dumazet wrote: On Mon, 2016-09-12 at 19:30 -0400, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> + +static struct tc_action_ops act_skbmod_ops = { + .kind = "skbmod", + .type =

Re: [PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
peat every x seconds). If there is something you want me to try - I could do sometimes this week. Your patch above may be useful! cheers, jamal

[PATCH v5 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

Re: [PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
On 16-09-12 07:02 PM, Jamal Hadi Salim wrote: Looks like typical starvation caused by aggressive softirq. Well, then it is strange that in one case a tc dump of the rule was immediate and in the other case it was consistent for 5-15 seconds. I may be going nuts because i cant reproduce

[PATCH v3 net 1/1] net sched actions: fix GETing actions

2016-09-12 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> With the batch changes that translated transient actions into a temporary list lost in the translation was the fact that tcf_action_destroy() will eventually delete the action from the permanent location if the refcount is zero. Example of what

Re: [PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
On 16-09-12 06:26 PM, Eric Dumazet wrote: On Mon, 2016-09-12 at 18:14 -0400, Jamal Hadi Salim wrote: I noticed some very weird issues when I took that out. Running sufficiently large amount of traffic (ping -f is sufficient) I saw that when i did a dump it took anywhere between 6-15 seconds

Re: [PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
On 16-09-12 06:01 PM, Eric Dumazet wrote: On Mon, 2016-09-12 at 16:46 -0400, Jamal Hadi Salim wrote: + +static int tcf_skbmod_dump(struct sk_buff *skb, struct tc_action *a, + int bind, int ref) +{ + struct tcf_skbmod *d = to_skbmod(a); + unsigned char *b

Re: [PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
On 16-09-12 05:58 PM, Eric Dumazet wrote: On Mon, 2016-09-12 at 16:46 -0400, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> + + /* XXX: if you are going to edit more fields beyond ethernet header +* (example when you add IP header replacement or vla

Re: [PATCH v2 net 1/1] net sched actions: fix GETing actions

2016-09-12 Thread Jamal Hadi Salim
On 16-09-12 01:18 PM, Cong Wang wrote: On Mon, Sep 12, 2016 at 3:21 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: + if (ovr) + a->tcfa_refcnt-=1; How about tcfa_bindcnt? We dont touch it when mucking around only with actions (as is in

[PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

2016-09-12 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

[PATCH v2 net 1/1] net sched actions: fix GETing actions

2016-09-12 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> With the batch changes that translated transient actions into a temporary list we lost in the translation the fact that tcf_action_destroy() will eventually delete the action from the permanent location if the refcount is zero. Example of what

Re: [PATCH net 1/1] net sched actions: fix GETing actions

2016-09-11 Thread Jamal Hadi Salim
since it is temporary. When i get the chance i will fix it up, test and resubmit. What do you want the commit message to say? It shows an example because the functionality broke. cheers, jamal

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-09-09 Thread Jamal Hadi Salim
On 16-09-08 12:11 PM, Eric Dumazet wrote: On Thu, 2016-09-08 at 09:02 -0700, Eric Dumazet wrote: On Thu, 2016-09-08 at 06:38 -0400, Jamal Hadi Salim wrote: On 16-09-06 10:25 AM, Eric Dumazet wrote: This simply works for me. But maybe you read the stats at the wrong place ? Pleas give us

[PATCH net 1/1] net sched actions: fix GETing actions

2016-09-08 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Example of what broke: ...add a gact action to drop sudo $TC actions add action drop index 10 ...now retrieve it, looks good sudo $TC actions get action gact index 10 ...retrieve it again and find it is gone! sudo $TC actions get action gact in

Re: [PATCH RFC 08/11] net/mlx5e: XDP fast RX drop bpf programs support

2016-09-08 Thread Jamal Hadi Salim
-IP processing time (and you can see difference with XDP compiled in). Slightly tangent question: Would it be fair to assume that this hardware can drop at wire rate if you instead used an offloaded tc rule? cheers, jamal

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-09-08 Thread Jamal Hadi Salim
ent with: bstats_update(>tcf_bstats, skb); but not: bstats_cpu_update(this_cpu_ptr(d->common.cpu_bstats), skb); Note, test is on a VM. cheers, jamal

Re: [PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

2016-09-06 Thread Jamal Hadi Salim
On 16-09-06 09:37 AM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: Dave, I will have to send some new version of this action - so

[PATCH v4 net-next 1/1] net_sched: Introduce skbmod action

2016-09-06 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

Re: Centralizing support for TCAM?

2016-09-06 Thread Jamal Hadi Salim
. At the moment, firewalling in such devices is done by the CPU. If we can offload some of the firewall rules to the TCAM, we would be happy. As with all discussions on netdev, that was a distraction;-> Use tc as mentioned by Jiri. Please please no ethtool. cheers, jamal

Re: [RFC Patch net-next 2/6] net_sched: introduce tcf_hash_replace()

2016-09-06 Thread Jamal Hadi Salim
On 16-09-02 01:57 AM, Cong Wang wrote: Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- include/net/act_api.h | 2 ++ net/sched/act_api.c | 20 2 files changed, 22 insertions(+) diff --git a/include/net

Re: [RFC Patch net-next 1/6] net_sched: use RCU for action hash table

2016-09-06 Thread Jamal Hadi Salim
On 16-09-02 01:57 AM, Cong Wang wrote: We already free tc actions in a RCU callback, so here we just need to convert the hash table operations to RCU API's. Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> This one stands on its own m

Re: [PATCH net-next V5 4/4] net/sched: Introduce act_tunnel_key

2016-09-06 Thread Jamal Hadi Salim
On 16-09-06 07:03 AM, Hadar Hen Zion wrote: On Tue, Sep 6, 2016 at 1:49 PM, Jamal Hadi Salim <j...@mojatatu.com> wrote: Please verify by running a test and send a packet or two and verify that stats are incremented (I know it may sound silly to ask but it is important). Already

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-09-06 Thread Jamal Hadi Salim
ng On 16-08-30 08:44 AM, Eric Dumazet wrote: On Tue, 2016-08-30 at 07:57 -0400, Jamal Hadi Salim wrote: if (flags & SKBMOD_F_SWAPMAC) { u8 tmpaddr[ETH_ALEN]; /*XXX: I am sure we can come up with something more efficient */ ether_addr_

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-09-06 Thread Jamal Hadi Salim
) Then : if (ovr) spin_unlock_bh(>tcf_lock); kfree_rcu(p_old, rcu); Ok, working on this variant. Will post today or tommorow. cheers, jamal

Re: Centralizing support for TCAM?

2016-09-06 Thread Jamal Hadi Salim
lpm' as possible, so I cannot see what tcam as actual tcam can be good for. Agreed on tcams. cheers, jamal

Re: [PATCH net-next V5 4/4] net/sched: Introduce act_tunnel_key

2016-09-06 Thread Jamal Hadi Salim
print the value as well. Other than that looks good. Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [net-next PATCH] e1000: add initial XDP support

2016-08-30 Thread Jamal Hadi Salim
col ip u32 \ match ip protocol 17 0xff \ match ip dport 1900 0x \ flowid 1:1 \ action drop Note, this will be more cycles than drop all. cheers, jamal

Re: [PATCH net-next V3 4/4] net/sched: Introduce act_tunnel_key

2016-08-30 Thread Jamal Hadi Salim
, new); if (ovr) { spin_unlock_bh(>tcf_lock); synchronize_rcu(); } kfree(old); at act(): rcu_read_lock(); struct tcf_tunnel_key_p *p = rcu_dereference(mykey->p); ... use p here ... rcu_read_unlock(); Cong was looking to do something more generic for all actions. cheers, jamal

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-08-30 Thread Jamal Hadi Salim
On 16-08-30 07:12 AM, Jamal Hadi Salim wrote: Thanks Eric. This is the approach i thought Cong was going to take but in a way that it applies to all actions. It requires I do this extra allocation per update/create - I am not sure how much of a big deal that is (we take pride in our update

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-08-30 Thread Jamal Hadi Salim
in mind for the general approach. cheers, jamal

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-08-29 Thread Jamal Hadi Salim
On 16-08-29 07:40 AM, Jamal Hadi Salim wrote: On 16-08-29 07:00 AM, Daniel Borkmann wrote: Sorry missed that. Let me give it an attempt. I think challenge is going to be what length to use. For now it is ethernet; but i had a change which swapped VLANs that i took out. something like

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-08-29 Thread Jamal Hadi Salim
On 16-08-29 06:38 AM, Jamal Hadi Salim wrote: Let me see if i can try something. Trickery with RCU is not one of my virtues - so i may get it wrong but hope you can comment. Something like attached? Compile tested. I tried to emulate gact - but greping around I havent seen sample code which

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-08-29 Thread Jamal Hadi Salim
already is that you would also need f.e. skb_ensure_writable() before mangling. Sorry missed that. Let me give it an attempt. I think challenge is going to be what length to use. For now it is ethernet; but i had a change which swapped VLANs that i took out. cheers, jamal

Re: [net-next PATCH] e1000: add initial XDP support

2016-08-29 Thread Jamal Hadi Salim
On 16-08-29 04:30 AM, Jesper Dangaard Brouer wrote: Hi Jamal, Can you please provide a simple "tc" command that implements "tc drop"? Then, I'll add this to the series of tests I'm using for (what I call) "zoom-in" benchmarking. Thanks Jesper. Somet

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-08-29 Thread Jamal Hadi Salim
if i can try something. Trickery with RCU is not one of my virtues - so i may get it wrong but hope you can comment. cheers, jamal

Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-08-29 Thread Jamal Hadi Salim
On 16-08-28 10:48 AM, Alexei Starovoitov wrote: On Sun, Aug 28, 2016 at 08:19:16AM -0400, Jamal Hadi Salim wrote: the address is incorrect. That's why it's recommended to skip this section in all headers. First paragraph in the above 'This program is ... GPL' would have been enough. I am

[iproute2 3/3] police: bug fix man page

2016-08-28 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/tc-police.8 | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/man/man8/tc-police.8 b/man/man8

[iproute2 2/3] police: improve usage message

2016-08-28 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_police.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tc/m_police.c b/tc/m_police.c index d7fa8

[iproute2 1/3] police: add extra space to improve police result printing

2016-08-28 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_police.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_police.c b/tc/m_police.c index f0b179f..d7fa8

Re: [net-next PATCH] e1000: add initial XDP support

2016-08-28 Thread Jamal Hadi Salim
. cheers, jamal

[PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

2016-08-28 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

Re: [PATCH v2 net-next 1/1] net_sched: Introduce skbmod action

2016-08-28 Thread Jamal Hadi Salim
On 16-08-28 08:13 AM, Jamal Hadi Salim wrote: +#if 0 + if (lflags & SKBMOD_F_SWAPMAC) + if ((lflags & SKBMOD_F_DMAC) || (lflags & SKBMOD_F_SMAC)) + return -EINVAL; +#endif Sorry - left over from earlier. Will send v3 shortly. cheers, jamal

[PATCH v2 net-next 1/1] net_sched: Introduce skbmod action

2016-08-28 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

Re: [PATCH net-next 3/3] net/sched: Introduce act_iptunnel

2016-08-23 Thread Jamal Hadi Salim
ough i still think this wouldve scaled better if you didnt depend on presence of vxlan dev). cheers, jamal

Re: [Patch net-next] net_sched: properly handle failure case of tcf_exts_init()

2016-08-22 Thread Jamal Hadi Salim
On 16-08-22 01:40 PM, Cong Wang wrote: On Mon, Aug 22, 2016 at 5:11 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: Answered my own question by looking at implementation of kfree(); ignores NULL (unlike free()) Seriously? Here is what C standard says about free(): I may be con

Re: [Patch net-next] net_sched: properly handle failure case of tcf_exts_init()

2016-08-22 Thread Jamal Hadi Salim
On 16-08-19 03:36 PM, Cong Wang wrote: After commit 22dc13c837c3 ("net_sched: convert tcf_exts from list to pointer array") we do dynamic allocation in tcf_exts_init(), therefore we need to handle the ENOMEM case properly. Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-o

Re: [Patch net-next] net_sched: properly handle failure case of tcf_exts_init()

2016-08-22 Thread Jamal Hadi Salim
ng actions in tcindex_free_perfect_hash() via tcf_exts_destroy require checking if exts->actions require a check? Otherwise, looks good. Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

[PATCH v2 iproute2 1/1] tc classifiers: Modernize tcindex classifier

2016-08-22 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/f_tcindex.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tc/f_tcindex.c b/tc/f_tcindex.c index 280d1d4..32bccb0 100644 --- a/tc/f_tcinde

Re: [PATCH iproute2 1/1] tc classifiers: Modernize tcindex classifier

2016-08-22 Thread Jamal Hadi Salim
On 16-08-18 05:57 PM, Stephen Hemminger wrote: The is ok for the parsing of config, but you are still using print_police for display. Thanks for catching that. I will send a v2. cheers, jamal

[PATCH v2 net 1/1] net sched: fix encoding to use real length

2016-08-22 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Encoding of the metadata was using the padded length as opposed to the real length of the data which is a bug per specification. This has not been an issue todate because all metadatum specified so far has been 32 bit where aligned and data

Re: [PATCH net 1/1] net sched ife action: fix encoding to use real length

2016-08-22 Thread Jamal Hadi Salim
On 16-08-19 09:22 AM, Sergei Shtylyov wrote: Hello. On 8/19/2016 1:17 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> Encoding of the metadata was using the padded length as opposed to the real length of the data which is a bug per specification. This has no

[PATCH net 1/1] net sched ife action: fix encoding to use real length

2016-08-19 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Encoding of the metadata was using the padded length as opposed to the real length of the data which is a bug per specification. This has not been an issue todate because all metadatum specified so far has been 32 bit where aligned and data

[PATCH iproute2 1/1] tc classifiers: Modernize tcindex classifier

2016-08-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/f_tcindex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/f_tcindex.c b/tc/f_tcindex.c index 280d1d4..0a73784 100644 --- a/tc/f_tcindex.c +++ b/tc/f_tcinde

Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC

2016-08-15 Thread Jamal Hadi Salim
? I am assuming you will hit a nasty lock somewhere(qdisc?) if you use only one. cheers, jamal

Re: [RFC net-next 0/2] net/sched: cls_flower, act_mirred: VXLAN redirect using TC

2016-08-15 Thread Jamal Hadi Salim
ion mirred egress redirect dev $ETH And a decap would be of the form: tc filter add dev $ETH protocol ip parent : prio 10 .. action vxlan decap i.e there is no redirect needed here, no? cheers, jamal

Re: [Patch net v4 6/7] net_sched: unify the init logic for act_police

2016-08-14 Thread Jamal Hadi Salim
On 16-08-14 01:35 AM, Cong Wang wrote: Jamal reported a crash when we create a police action with a specific index, this is because the init logic is not correct, we should always create one for this case. Just unify the logic with other tc actions. Fixes: a03e6fe56971 ("act_police: fix a

Re: [Patch net v4 7/7] net_sched: allow flushing tc police actions

2016-08-14 Thread Jamal Hadi Salim
Roman and Cong.) Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [Patch net v4 1/7] net_sched: remove the leftover cleanup_a()

2016-08-14 Thread Jamal Hadi Salim
On 16-08-14 01:34 AM, Cong Wang wrote: After refactoring tc_action into tcf_common, we no longer need to cleanup temporary "actions" in list, they are permanently stored in the hashtable. Fixes: a85a970af265 ("net_sched: move tc_action into tcf_common") Reported-by:

Re: [Patch net v4 2/7] net_sched: remove an unnecessary list_del()

2016-08-14 Thread Jamal Hadi Salim
On 16-08-14 01:34 AM, Cong Wang wrote: This list_del() for tc action is not needed actually, because we only use this list to chain bulk operations, therefore should not be carried for latter operations. Fixes: ec0595cc4495 ("net_sched: get rid of struct tcf_common") Cc: Jamal Had

Re: [Patch net v4 4/7] net_sched: move tc offload macros to pkt_cls.h

2016-08-14 Thread Jamal Hadi Salim
On 16-08-14 01:34 AM, Cong Wang wrote: struct tcf_exts belongs to filters, should not be visible to plain tc actions. Cc: Ido Schimmel <ido...@mellanox.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [Patch net v4 3/7] net_sched: fix a typo in tc_for_each_action()

2016-08-14 Thread Jamal Hadi Salim
On 16-08-14 01:34 AM, Cong Wang wrote: It is harmless because all users pass 'a' to this macro. Fixes: 00175aec941e ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") Cc: Amir Vadai <a...@vadai.me> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Acked-b

Re: [Patch net v4 5/7] net_sched: convert tcf_exts from list to pointer array

2016-08-14 Thread Jamal Hadi Salim
On 16-08-14 01:35 AM, Cong Wang wrote: As pointed out by Jamal, an action could be shared by multiple filters, so we can't use list to chain them any more after we get rid of the original tc_action. Instead, we could just save pointers to these actions in tcf_exts, since they are refcount'ed, so

Re: [Patch net v3 5/5] net_sched: convert tcf_exts from list to pointer array

2016-08-14 Thread Jamal Hadi Salim
On 16-08-14 01:03 AM, Cong Wang wrote: On Sat, Aug 13, 2016 at 4:33 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: Just minor comment below: On 16-08-11 08:41 PM, Cong Wang wrote: +static inline void +tcf_exts_to_list(const struct tcf_exts *exts, struct list_head *a

Re: [Patch net v3 5/5] net_sched: convert tcf_exts from list to pointer array

2016-08-13 Thread Jamal Hadi Salim
*actions) cheers, jamal

Re: [Patch net 0/5] net_sched: tc action fixes and updates

2016-08-13 Thread Jamal Hadi Salim
On 16-08-11 08:08 PM, Cong Wang wrote: On Thu, Aug 11, 2016 at 9:20 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: On 16-08-10 04:06 PM, Cong Wang wrote: On Wed, Aug 10, 2016 at 7:34 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: On 16-08-08 04:46 PM, Cong Wang wrote: t

Re: [Patch net 0/5] net_sched: tc action fixes and updates

2016-08-12 Thread Jamal Hadi Salim
On 16-08-11 08:08 PM, Cong Wang wrote: On Thu, Aug 11, 2016 at 9:20 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: On 16-08-10 04:06 PM, Cong Wang wrote: Ok, I did a quick look at your patch - I still see you converting from array to list. I mean get tcf_exts_exec() to take an

Re: [Patch net 0/5] net_sched: tc action fixes and updates

2016-08-11 Thread Jamal Hadi Salim
On 16-08-10 04:06 PM, Cong Wang wrote: On Wed, Aug 10, 2016 at 7:34 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: On 16-08-08 04:46 PM, Cong Wang wrote: tcf_exts_exec() is the culprit - and conversion to from flexarray to linked list in the fast problem to be specific. Ah, this r

Re: [Patch net 0/5] net_sched: tc action fixes and updates

2016-08-10 Thread Jamal Hadi Salim
On 16-08-08 04:46 PM, Cong Wang wrote: This patchset fixes several regressions caused by the previous code refactor. Thanks to Jamal for catching them! Note, patch 3/5 and 4/5 are not strictly necessary, I just want to carry them together. Cong - there's good news and bad news. The good news

Re: [Patch net 0/5] net_sched: tc action fixes and updates

2016-08-10 Thread Jamal Hadi Salim
On 16-08-08 04:46 PM, Cong Wang wrote: This patchset fixes several regressions caused by the previous code refactor. Thanks to Jamal for catching them! Cong, Good news: oops gone. I havent done more testing than I did before; but looks good so far. Bad news: You have introduced

Re: [Patch net 0/5] net_sched: tc action fixes and updates

2016-08-10 Thread Jamal Hadi Salim
Sorry I have a really bad (expensive) connection and the SMTP server seems to reject the first message and i retyped it and sent again - and now notice both were sent. Message didnt change ;-> cheers, jamal

Re: [Patch net 1/5] net_sched: remove the leftover cleanup_a()

2016-08-09 Thread Jamal Hadi Salim
On 16-08-08 04:46 PM, Cong Wang wrote: After refactoring tc_action into tcf_common, we no longer need to cleanup temporary "actions" in list, they are permanently stored in the hashtable. Fixes: a85a970af265 ("net_sched: move tc_action into tcf_common") Reported-by:

Re: [Patch net-next] net_sched: remove the leftover cleanup_a()

2016-08-04 Thread Jamal Hadi Salim
On 16-08-03 11:20 AM, Cong Wang wrote: On Wed, Aug 3, 2016 at 4:36 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: Cong, Improvement on the basic test as it no longer oopses, but: here's a test that will oops: Make sure you test this together with the other patch I sent (sorry I

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