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

2016-02-25 Thread Jamal Hadi Salim
On 16-02-24 12:58 PM, Daniel Borkmann wrote: On 02/24/2016 01:49 PM, Jamal Hadi Salim wrote: Yes, a bit of that ++. I am between two worlds: There are people who do user space packet processing that claim they do so because they can quickly prototype without compiling the kernel. My goal

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

2016-02-25 Thread Jamal Hadi Salim
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 cavium processor. This thing strips off the TLV and uses the hash to select the host MSI. Only thing we

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

2016-02-25 Thread Jamal Hadi Salim
On 16-02-24 12:37 PM, Daniel Borkmann wrote: On 02/23/2016 01:49 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> [...] +static const struct nla_policy ife_policy[TCA_IFE_MAX + 1] = { +[TCA_IFE_PARMS] = {.len = sizeof(struct tc_ife)}, +[TCA_IFE_DMAC] =

Re: [Patch net-next v2 2/2] net_sched: add network namespace support for tc actions

2016-02-25 Thread Jamal Hadi Salim
On 16-02-24 12:21 PM, Cong Wang wrote: On Wed, Feb 24, 2016 at 5:19 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: [..] Did you mean something else or am i missing the obvious? I am looking at the call sites for tcf_action_destroy(): -tc_dump_tfilter() has access to *net -tcf_exts_

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

2016-02-24 Thread Jamal Hadi Salim
On 16-02-23 02:03 PM, John Fastabend wrote: In the initial implementation the only way to stop a rule from being inserted into the hardware table was via the device feature flag. However this doesn't work well when working on an end host system where packets are expect to hit both the hardware

Re: [net-next PATCH 2/4] net: cls_u32: move TC offload feature bit into cls_u32 offload logic

2016-02-24 Thread Jamal Hadi Salim
into the core code and removes it from the driver specific case. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [net-next PATCH 1/4] net: sched: consolidate offload decision in cls_u32

2016-02-24 Thread Jamal Hadi Salim
in one function lift the current check into a helper routine tc_should_offload(). Signed-off-by: John Fastabend <john.r.fastab...@intel.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [Patch net-next v2 2/2] net_sched: add network namespace support for tc actions

2016-02-24 Thread Jamal Hadi Salim
On 16-02-23 05:23 PM, Cong Wang wrote: On Tue, Feb 23, 2016 at 5:14 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: It doesnt seem neccessary to have hinfo in tc_action. Quick scan: __tcf_hash_release() seems to be the only other place that uses it. And the callers to that appear c

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

2016-02-24 Thread Jamal Hadi Salim
On 16-02-23 04:44 PM, Cong Wang wrote: On Tue, Feb 23, 2016 at 4:49 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: +#define MODULE_ALIAS_IFE_META(metan) MODULE_ALIAS("ifemeta" __stringify_1(metan)) + +int get_meta_u32(struct sk_buff *skb, struct tcf_meta_info *mi); +

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

2016-02-24 Thread Jamal Hadi Salim
On 16-02-23 11:12 AM, Daniel Borkmann wrote: On 02/23/2016 03:39 PM, Jamal Hadi Salim wrote: My question was rather: should the kernel enforce the IDs and only allow what the kernel dictates (and not in/out of tree modules)? If yes, then there would be no need for a module parameter

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

2016-02-24 Thread Jamal Hadi Salim
On 16-02-23 10:34 AM, Daniel Borkmann wrote: On 02/23/2016 03:28 PM, Jamal Hadi Salim wrote: [..] These are basic metadata. The question to ask is what could one use skb->hash for. Today it is used to select a cpu to balance to. Right, but that happens before you decode that informat

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

2016-02-24 Thread Jamal Hadi Salim
On 16-02-24 12:46 AM, Simon Horman wrote: On Tue, Feb 23, 2016 at 05:12:34PM +0100, Daniel Borkmann wrote: From my point of view the test should be weather the encapsulation might reasonably be expected to be used outside of the context of tc. If so then it makes sense to use a netdev to

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

2016-02-23 Thread Jamal Hadi Salim
On 16-02-23 08:32 AM, Daniel Borkmann wrote: On 02/23/2016 01:49 PM, Jamal Hadi Salim wrote: 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 encodin

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

2016-02-23 Thread Jamal Hadi Salim
On 16-02-23 08:20 AM, Daniel Borkmann wrote: On 02/23/2016 01:09 PM, Jamal Hadi Salim wrote: On 16-02-22 11:47 AM, Daniel Borkmann wrote: [...] So, basically this is a L2 encap with TLVs, right? And as TLVs you have skb->mark, skb->priority, skb->hash, skb->queue_mapping that

Re: [Patch net-next v2 2/2] net_sched: add network namespace support for tc actions

2016-02-23 Thread Jamal Hadi Salim
On 16-02-22 06:57 PM, Cong Wang wrote: [..] diff --git a/include/net/act_api.h b/include/net/act_api.h index 8c4e3ff..342be6c 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -7,6 +7,8 @@ #include #include +#include +#include struct tcf_common { struct

Re: [Patch net-next v2 1/2] net_sched: prepare tcf_hashinfo_destroy() for netns support

2016-02-23 Thread Jamal Hadi Salim
netns in the latter patch. 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

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

2016-02-23 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 PATCH v2 2/5] Support to encoding decoding skb mark on IFE action

2016-02-23 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 PATCH v2 1/5] introduce IFE action

2016-02-23 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 v2 5/5] Support to encoding decoding skb queue map on IFE action

2016-02-23 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> hard code static value of 10 for qmap mark of 12 prio of 13 and hashid of 11 sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action ife encode \ type 0xDEAD \ use mark 12 \ use prio 13 \ use

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

2016-02-23 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). Described in netdev01 paper: "Distributing Linux Traffic Control Classifier-Action Subsystem" Authors: Jamal Hadi Sal

[net-next PATCH v2 4/5] Support to encoding decoding skb hashid on IFE action

2016-02-23 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Example usage: allow skb hash to be encoded as metadata 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

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

2016-02-23 Thread Jamal Hadi Salim
On 16-02-23 02:00 AM, Cong Wang wrote: On Mon, Feb 22, 2016 at 5:21 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: 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). Described in ne

Re: [net-next PATCH 5/5] Support to encoding decoding skb queue map on IFE action

2016-02-23 Thread Jamal Hadi Salim
On 16-02-22 04:03 PM, John Fastabend wrote: On 16-02-22 05:21 AM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> hard code static value of 10 for qmap mark of 12 prio of 13 and hashid of 11 sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip prot

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

2016-02-23 Thread Jamal Hadi Salim
Hi Daniel, On 16-02-22 11:47 AM, Daniel Borkmann wrote: Hi Jamal, On 02/22/2016 02:21 PM, Jamal Hadi Salim wrote: 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). Described in netdev01

Re: [Patch net-next] net_sched: add network namespace support for tc actions

2016-02-22 Thread Jamal Hadi Salim
On 16-02-20 07:46 PM, Cong Wang wrote: On Sat, Feb 20, 2016 at 10:36 AM, Daniel Borkmann wrote: Do you see a way to reduce the code duplication needed across all the action modules? I.e. that each of them now needs to register a new per netns subsystem, etc. In other

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

2016-02-22 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 PATCH 5/5] Support to encoding decoding skb queue map on IFE action

2016-02-22 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> hard code static value of 10 for qmap mark of 12 prio of 13 and hashid of 11 sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action ife encode \ type 0xDEAD \ use mark 12 \ use prio 13 \ use

[net-next PATCH 4/5] Support to encoding decoding skb hashid on IFE action

2016-02-22 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Example usage: allow skb hash to be encoded as metadata 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 PATCH 3/5] Support to encoding decoding skb prio on IFE action

2016-02-22 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 PATCH 1/5] introduce IFE action

2016-02-22 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 0/5] net_sched: Add support for IFE action

2016-02-22 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). Described in netdev01 paper: "Distributing Linux Traffic Control Classifier-Action Subsystem" Authors: Jamal Hadi Sal

Re: [net-next PATCH v3 3/8] net: sched: add cls_u32 offload hooks for netdevs

2016-02-19 Thread Jamal Hadi Salim
On 16-02-18 10:24 AM, John Fastabend wrote: On 16-02-18 04:14 AM, Jamal Hadi Salim wrote: On 16-02-17 06:07 PM, John Fastabend wrote: [...] IMO, it would be better at this early stage to enforce the correct behavior for future generations. To follow the netlink semantics which a lot

[net-next PATCH 1/1] net_sched: Improve readability of filter processing

2016-02-18 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- net/sched/sch_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index af1acf0..de1e176 100644 --- a/net/sched/sch_api

[net PATCH v3 1/1] net_sched fix: reclassification needs to consider ether protocol changes

2016-02-18 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, will ask for the packet to be reclassified. We then need to restart the classification with the new proto

[net PATCH v3 0/1] tc reclassification needs to consider ether protocol changes

2016-02-18 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> v3: Cong says this needs to go to -net. And to put back the removed new line v2: Use Daniel's suggestion on when to set the skb proto v1: fix compile error found by build bot when CONFIG_NET_CLS_ACT was off Jamal Hadi Salim (1): net_sch

Re: [net-next PATCH v2 1/1] net_sched fix: reclassification needs to consider ether protocol changes

2016-02-18 Thread Jamal Hadi Salim
On 16-02-18 06:53 AM, Daniel Borkmann wrote: On 02/17/2016 06:27 PM, Cong Wang wrote: const struct tcf_proto *old_tp = tp; int limit = 0; - Why remove this empty line? I think it is still useful. :) Also your patch should be targeted to -net instead of -net-next, since it

Re: [net-next PATCH v3 3/8] net: sched: add cls_u32 offload hooks for netdevs

2016-02-18 Thread Jamal Hadi Salim
On 16-02-17 06:07 PM, John Fastabend wrote: [...] Actually thinking about this a bit more I wrote this thinking that there existed some hardware that actually cared if it was a new rule or an existing rule. For me it doesn't matter I do the same thing in the new/replace cases I just write

Re: [net-next PATCH v2 1/1] net_sched fix: reclassification needs to consider ether protocol changes

2016-02-17 Thread Jamal Hadi Salim
On 16-02-17 06:19 AM, Jamal Hadi Salim wrote: Thats how the original code was (and what i tested). I dont have time to test right now but i will send an update with your suggestion. My setup was still running so I managed to test it with IFE cheers, jamal

Re: [net-next PATCH v3 7/8] net: ixgbe: add support for tc_u32 offload

2016-02-17 Thread Jamal Hadi Salim
x that NEW with REPLACE in patch 3. For this patch: Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

[net-next PATCH v2 0/1] tc reclassification needs to consider ether protocol changes

2016-02-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> v2: Use Daniel's suggestion on when to set the skb proto v1: fix compile error found by build bot when CONFIG_NET_CLS_ACT was off Jamal Hadi Salim (1): net_sched fix: reclassification needs to consider ether protocol changes net/sched/sch

[net-next PATCH v2 1/1] net_sched fix: reclassification needs to consider ether protocol changes

2016-02-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, will ask for the packet to be reclassified. We then need to restart the classification with the new proto

Re: [net-next PATCH v2 1/1] net_sched fix: reclassification needs to consider ether protocol changes

2016-02-17 Thread Jamal Hadi Salim
On 16-02-16 10:20 AM, Daniel Borkmann wrote: On 02/16/2016 01:37 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, wi

Re: [net-next PATCH v3 7/8] net: ixgbe: add support for tc_u32 offload

2016-02-17 Thread Jamal Hadi Salim
On 16-02-17 12:18 AM, John Fastabend wrote: This adds initial support for offloading the u32 tc classifier. This initial implementation only implements a few base matches and actions to illustrate the use of the infrastructure patches. However it is an interesting subset because it handles the

Re: [net-next PATCH v3 6/8] net: ixgbe: add minimal parser details for ixgbe

2016-02-17 Thread Jamal Hadi Salim
u32. I think most of unsigned ints should be u32. Acked-by: Jamal Hadi Salim <j...@mojatatu.com>

Re: [net-next PATCH v3 4/8] net: add tc offload feature flag

2016-02-17 Thread Jamal Hadi Salim
tab...@intel.com> Acked-by: Jiri Pirko <j...@mellanox.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com>

Re: [net-next PATCH v3 5/8] net: tc: helper functions to query action types

2016-02-17 Thread Jamal Hadi Salim
On 16-02-17 12:18 AM, John Fastabend wrote: This is a helper function drivers can use to learn if the action type is a drop action. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [net-next PATCH v3 3/8] net: sched: add cls_u32 offload hooks for netdevs

2016-02-17 Thread Jamal Hadi Salim
On 16-02-17 12:17 AM, John Fastabend wrote: This patch allows netdev drivers to consume cls_u32 offloads via the ndo_setup_tc ndo op. This works aligns with how network drivers have been doing qdisc offloads for mqprio. This one i have comments on. Signed-off-by: John Fastabend

Re: [net-next PATCH v3 2/8] net: rework setup_tc ndo op to consume general tc operand

2016-02-17 Thread Jamal Hadi Salim
ndo ops or grow the signature of the callback. Signed-off-by: John Fastabend <john.r.fastab...@intel.com> Acked-by: Jiri Pirko <j...@mellanox.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com>

Re: [net-next PATCH v3 1/8] net: rework ndo tc op to consume additional qdisc handle parameter

2016-02-17 Thread Jamal Hadi Salim
com> CC: Jeff Kirsher <jeffrey.t.kirs...@intel.com> CC: Bruce Allan <bruce.w.al...@intel.com> CC: Jesse Brandeburg <jesse.brandeb...@intel.com> CC: Don Skidmore <donald.c.skidm...@intel.com> Signed-off-by: John Fastabend <john.r.fastab...@intel.com> Acked-by: Jiri Pir

[net-next PATCH v2 1/1] net_sched fix: reclassification needs to consider ether protocol changes

2016-02-16 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, will ask for the packet to be reclassified. We then need to restart the classification with the new proto

Re: [net-next PATCH 1/1] net_sched fix: reclassification needs to consider ether protocol changes

2016-02-16 Thread Jamal Hadi Salim
On 16-02-15 03:59 PM, Daniel Borkmann wrote: On 02/15/2016 08:49 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, wi

[net-next PATCH 1/1] net_sched fix: reclassification needs to consider ether protocol changes

2016-02-15 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> actions could change the etherproto in particular with ethernet tunnelled data. Typically such actions, after peeling the outer header, will ask for the packet to be reclassified. We then need to restart the classification with the new proto

Re: [PATCH net v3 2/4] net: add rx_nohandler stat counter

2016-02-09 Thread Jamal Hadi Salim
On 16-02-09 03:40 AM, David Miller wrote: From: Eric Dumazet Date: Mon, 08 Feb 2016 14:57:40 -0800 Whole point of TLV is that it allows us to add new fields at the end of the structures. ... Look at iproute2, you were the one adding in 2004 code to cope with

Re: [net-next PATCH 0/7] tc offload for cls_u32 on ixgbe

2016-02-09 Thread Jamal Hadi Salim
On 16-02-09 06:24 AM, Fastabend, John R wrote: On 2/4/2016 5:12 AM, Jamal Hadi Salim wrote: On 16-02-03 01:48 PM, Fastabend, John R wrote: Basically most hardware (or i should say driver implementations of mostly TCAMS) allow you to add exactly the same filter as many times as you want

Re: [net-next PATCH 0/7] tc offload for cls_u32 on ixgbe

2016-02-04 Thread Jamal Hadi Salim
On 16-02-03 01:48 PM, Fastabend, John R wrote: BTW: For the record John, I empathize with you that we need to move. Please have patience - we are close; lets just get this resolved in Seville. I like your patches a lot and would love to just have your patches pushed in, but the challenges with

Re: [net-next PATCH 7/7] net: ixgbe: add support for tc_u32 offload

2016-02-03 Thread Jamal Hadi Salim
On 16-02-03 05:26 AM, John Fastabend wrote: On 16-02-03 02:07 AM, Amir Vadai" wrote: On Wed, Feb 03, 2016 at 01:29:59AM -0800, John Fastabend wrote: This adds initial support for offloading the u32 tc classifier. This initial implementation only implements a few base matches and actions to

Re: [net-next PATCH 0/7] tc offload for cls_u32 on ixgbe

2016-02-03 Thread Jamal Hadi Salim
On 16-02-03 05:31 AM, Or Gerlitz wrote: On 2/3/2016 12:21 PM, John Fastabend wrote: Thanks, we will need at least a v2 to fixup some build errors with various compile flags caught by build_bot and missed by me. Hi John, You didn't mark that as RFC... but we said this direction/approach yet to

Re: [RFC PATCH 00/12] drop the qdisc lock for pfifo_fast/mq

2016-01-06 Thread Jamal Hadi Salim
Sorry for not being as responsive as i would like to be (theman calls and i have to go). This looks like a good (tc workshop) candidate discussion, if still active by netdev11 time. On 15-12-30 12:50 PM, John Fastabend wrote: Hi, This is a first take at removing the qdisc lock on the xmit

Re: [PATCH v7 0/4] Support administratively closing application sockets

2015-12-16 Thread Jamal Hadi Salim
On 15-12-16 10:50 AM, Eric Dumazet wrote: On Wed, 2015-12-16 at 07:43 -0800, Stephen Hemminger wrote: I see no security checks in the diag infrastructure. Up until now diag has been read-only access and therefore has been allowed for all users. It is still allowed to all users. Only the

Re: [PATCH ]net: sched/cls_flow.c : allow nfct-* keys work on ingress interfaces

2015-12-13 Thread Jamal Hadi Salim
Hi Igor, On 15-12-11 04:55 AM, Igor Gavrilov wrote: Improved CTTUPLE macro with code from sched/act_connmark.c, so it be able to get unNATed addresses from nf_conntrack. 1) Question: Have you tested the patch or you just cutnpasted from connmark.c? By inspection the patch looks ok

Re: [PATCH v1 1/6] net: Generalize udp based tunnel offload

2015-12-08 Thread Jamal Hadi Salim
On 15-12-08 02:33 AM, John Fastabend wrote: On 15-12-02 04:15 PM, Tom Herbert wrote: Just keying off the last statement there... I think BPF programs are going to be hard to translate into hardware for most devices. The problem is the BPF programs in general lack structure. A parse graph

Re: [PATCH v1 1/6] net: Generalize udp based tunnel offload

2015-12-08 Thread Jamal Hadi Salim
On 15-12-08 09:23 AM, Jamal Hadi Salim wrote: On 15-12-08 02:33 AM, John Fastabend wrote: ;-> I feel a little vindicated with this discussion. Of course you can implement hardware using BPF! BTW - Just to be clear; I am not arguing for what that paper preaches. What the paper preac

Re: [Patch net-next 2/4] net_sched: update hierarchical backlog too

2015-10-16 Thread Jamal Hadi Salim
On 10/15/15 00:32, Cong Wang wrote: On Wed, Oct 14, 2015 at 5:11 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: On 10/12/15 14:38, Cong Wang wrote: When the bottom qdisc decides to, for example, drop some packet, it calls qdisc_tree_decrease_qlen() to update the queue length for a

Re: [Patch net-next 1/4] net_sched: introduce qdisc_replace() helper

2015-10-16 Thread Jamal Hadi Salim
On 10/15/15 00:15, Cong Wang wrote: On Wed, Oct 14, 2015 at 4:56 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: On 10/12/15 14:38, Cong Wang wrote: Remove nearly duplicated code and prepare for the following patch. Cong - like Dave, I dont see equivalence in some of these c

Re: [Patch net-next 3/4] sch_htb: update backlog as well

2015-10-16 Thread Jamal Hadi Salim
On 10/15/15 00:21, Cong Wang wrote: On Wed, Oct 14, 2015 at 5:25 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: On 10/12/15 14:38, Cong Wang wrote: It is odd to see qlen!=0 but backlog==0, for a real example: Backlog is a transient stat so a lot of times it should be 0. Only when t

Re: [Patch net-next 1/4] net_sched: introduce qdisc_replace() helper

2015-10-14 Thread Jamal Hadi Salim
On 10/12/15 14:38, Cong Wang wrote: Remove nearly duplicated code and prepare for the following patch. Cong - like Dave, I dont see equivalence in some of these changes. Example not sure how the qfq grafting invocation of qfq_purge_queue fits in. There are a few others. cheers, jamal --

Re: [Patch net-next 2/4] net_sched: update hierarchical backlog too

2015-10-14 Thread Jamal Hadi Salim
On 10/12/15 14:38, Cong Wang wrote: When the bottom qdisc decides to, for example, drop some packet, it calls qdisc_tree_decrease_qlen() to update the queue length for all its ancestors, we need to update the backlog too to keep the stats on root qdisc accurate. There is more than one change

Re: [Patch net-next 3/4] sch_htb: update backlog as well

2015-10-14 Thread Jamal Hadi Salim
, overlimits 123575834 requeues 0) backlog 0b 72p requeues 0 So we need to update backlog too when we update qlen. Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <cw...@twopensource.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> --- -- To unsubscribe fr

Re: [Patch net] act_mirred: fix a race condition on mirred_list

2015-10-05 Thread Jamal Hadi Salim
Never mind. Mirred is speacial because it points to other netdevs. So: Acked-by: Jamal Hadi Salim <j...@mojatatu.com> Thanks Cong. cheers, jamal On 10/05/15 07:58, Jamal Hadi Salim wrote: Hi Cong, I am wondering if making the bindcount or refcount atomic would help? How does this b

Re: [Patch net] act_mirred: fix a race condition on mirred_list

2015-10-05 Thread Jamal Hadi Salim
Hi Cong, I am wondering if making the bindcount or refcount atomic would help? How does this bug get created? i.e the RTNL is still around. Why is this specific to mirred only? cheers, jamal On 10/01/15 14:37, Cong Wang wrote: After commit 1ce87720d456 ("net: sched: make cls_u32 lockless")

Re: [Patch net] act_mirred: always release tcf hash

2015-10-05 Thread Jamal Hadi Salim
On 10/01/15 14:37, Cong Wang wrote: Align with other tc actions. Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <cw...@twopensource.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jama

Re: [Patch net] net: revert "net_sched: move tp->root allocation into fw_init()"

2015-09-23 Thread Jamal Hadi Salim
tp->root allocation into fw_init()") Reported-by: Akshat Kakkar <akshat.1...@gmail.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> -- To unsubscribe from this

Re: [PATCH v2 net-next 1/2] cls_bpf: introduce integrated actions

2015-09-18 Thread Jamal Hadi Salim
Hi Daniel, On 09/17/15 09:13, Daniel Borkmann wrote: Hmm, I don't really agree. With cls_bpf you have non-linear classifications as opposed to walking a chain of classifiers: A chain of classifiers is a better description today (non-linear would be an appropriate description before cls_bpf

Re: [PATCH v2 net-next 1/2] cls_bpf: introduce integrated actions

2015-09-18 Thread Jamal Hadi Salim
On 09/17/15 11:19, Alexei Starovoitov wrote: misread as bpf program now executes the actions and bypasses tcf_exts_exec() ? Well, that may be interesting idea for the future, And above is precisely why i raised the concern. You are already bypassing tcf_exts_exec with that patch. It is a big

Re: [fw filter]: Broken! fw mark based tc class selection not working

2015-09-17 Thread Jamal Hadi Salim
On 09/14/15 18:04, Cong Wang wrote: That is exactly the original code. But it is not readable at all, at least I still missed it when I touched the tp->init() part. :( Having a boolean doesn't harm anything. The default should really be no head alloced (given that is the main use case). The

Re: [PATCH v2 net-next 1/2] cls_bpf: introduce integrated actions

2015-09-17 Thread Jamal Hadi Salim
On 09/16/15 02:05, Alexei Starovoitov wrote: From: Daniel Borkmann Often cls_bpf classifier is used with single action drop attached. Optimize this use case and let cls_bpf return both classid and action. For backwards compatibility reasons enable this feature under

Re: [fw filter]: Broken! fw mark based tc class selection not working

2015-09-14 Thread Jamal Hadi Salim
On 09/11/15 20:00, Cong Wang wrote: On Fri, Sep 11, 2015 at 3:24 PM, Akshat Kakkar wrote: Hmm, I didn't know that before either. Looks like my tp->init change breaks it. Could you try the following patch? I would just make init() empty for this classifier (return

Re: [PATCH net-next 1/4] net: qdisc: add op to run filters/actions before enqueue

2015-09-02 Thread Jamal Hadi Salim
On 09/02/15 02:22, Cong Wang wrote: (Why not Cc'ing Jamal for net_sched pathes?) On Tue, Sep 1, 2015 at 9:34 AM, Daniel Borkmann wrote: From: John Fastabend Add a new ->preclassify() op to allow multiqueue queuing disciplines to call

Re: [Patch net-next 4/5] net_sched: forbid setting default qdisc to inappropriate ones

2015-08-30 Thread Jamal Hadi Salim
On 08/28/15 19:20, David Miller wrote: But HTB definitely should be allowed. Problem with most non-work conserving schedulers is what the meaning of default resources means; example, for HTB: What is the default bandwidth you allocate to a class of users? cheers, jamal -- To unsubscribe

Re: [Patch net-next 4/5] net_sched: forbid setting default qdisc to inappropriate ones

2015-08-28 Thread Jamal Hadi Salim
On 08/28/15 00:23, David Miller wrote: If a default qdisc like HTB is choosen, we invoke the -init() function and we change the HTB -init() function to do something reasonable if a NULL set of configuration attributes is given. ie. make HTB use some defaults. That may work. Or to reduce

Re: [PATCH net] net: sctp: stop spamming klog with rfc6458, 5.3.2. deprecation warnings

2015-07-22 Thread Jamal Hadi Salim
] http://thread.gmane.org/gmane.linux.network/321960/ Reported-by: Jamal Hadi Salim j...@mojatatu.com Signed-off-by: Daniel Borkmann dan...@iogearbox.net Cc: Michael Tuexen tue...@fh-muenster.de Acked-by: Jamal Hadi Salim j...@mojatatu.com cheers, jamal -- To unsubscribe from this list: send

Re: [PATCH,v2 net] net: sched: validate that class is found in qdisc_tree_decrease_qlen

2015-07-21 Thread Jamal Hadi Salim
On 07/20/15 15:40, Alex Gartrell wrote: We have an application that invokes tc to delete the root every time the config changes. As a result we stress the cleanup code and were seeing the following panic: crash bt PID: 630839 TASK: 8823c990d280 CPU: 14 COMMAND: tc [... snip

Re: [PATCH net-next] tc: fix tc actions in case of shared skb

2015-07-14 Thread Jamal Hadi Salim
On 07/14/15 06:29, Daniel Borkmann wrote: On 07/14/2015 12:26 AM, Alexei Starovoitov wrote: On 7/13/15 1:55 PM, Daniel Borkmann wrote: On 07/13/2015 10:17 PM, Alexei Starovoitov wrote: ... We cannot check tc actions from pktgen, since they can be added dynamically. So I see three options: 1

Re: [PATCH net-next] tc: fix tc actions in case of shared skb

2015-07-13 Thread Jamal Hadi Salim
On 07/10/15 20:10, Alexei Starovoitov wrote: TC actions need to check for very unlikely event skb-users != 1, otherwise subsequent pskb_may_pull/pskb_expand_head will crash. When skb_shared() just drop the packet, since in the middle of actions it's too late to call skb_share_check(), since

[RFC net-next 1/1] : sctp: denoise deprecation log on SCTP_EVENTS

2015-07-09 Thread Jamal Hadi Salim
In the newer kernels this message is extremely noisy. After a quick discussion with Daniel it seems to me it will be very hard to get existing apps that nobody is going to update to continue to work (i.e no forward compat). And newer apps that desire to play in both older kernels and new

Re: [PATCH net-next] ifb: add multiqueue operation

2015-07-08 Thread Jamal Hadi Salim
before/after the change? Acked-by: Jamal Hadi Salim j...@mojatatu.com cheers, jamal -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 net-next 0/7] net_sched: act: lockless operation

2015-07-06 Thread Jamal Hadi Salim
On 07/06/15 02:41, Eric Dumazet wrote: As mentioned by Alexei last week in Budapest, it is a bit weird to take a spinlock in order to drop a packet in a tc filter... Lets add percpu infra for tc actions and use it for gact mirred. Before changes, my host with 8 RX queues was handling 5 Mpps

Re: [PATCH v3 net-next 7/7] net_sched: act_mirred: remove spinlock in fast path

2015-07-06 Thread Jamal Hadi Salim
queue capability to ifb device Signed-off-by: Eric Dumazet eduma...@google.com Looks good to me ;- Acked-by: Jamal Hadi Salim j...@mojatatu.com cant wait for the multi queue ifb. cheers, jamal -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord

Re: [PATCH net-next 1/6] net: sched: extend percpu stats helpers

2015-07-03 Thread Jamal Hadi Salim
() is renamed to qdisc_qstats_cpu_drop() Signed-off-by: Eric Dumazet eduma...@google.com Cc: Alexei Starovoitov a...@plumgrid.com Cc: Jamal Hadi Salim j...@mojatatu.com Cc: John Fastabend john.fastab...@gmail.com Acked-by: Jamal Hadi Salim j...@mojatatu.com cheers, jamal -- To unsubscribe from

Re: [PATCH net-next 3/6] net_sched: act: make tcfg_pval non zero

2015-07-03 Thread Jamal Hadi Salim
On 07/02/15 09:07, Eric Dumazet wrote: First step for gact RCU operation : Instead of testing if tcfg_pval is zero or not, just make it 1. No change in behavior, but slightly faster code. Signed-off-by: Eric Dumazet eduma...@google.com Acked-by: Jamal Hadi Salim j...@mojatatu.com cheers

Re: [PATCH net-next 2/6] net: sched: add percpu stats to actions

2015-07-03 Thread Jamal Hadi Salim
-by: Eric Dumazet eduma...@google.com Acked-by: Jamal Hadi Salim j...@mojatatu.com cheers, jamal -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next 5/6] net_sched: act: read tcfg_ptype once

2015-07-03 Thread Jamal Hadi Salim
On 07/02/15 09:07, Eric Dumazet wrote: Third step for gact RCU operation : Following patch will get rid of spinlock protection, so we need to read tcfg_ptype once. Signed-off-by: Eric Dumazet eduma...@google.com Acked-by: Jamal Hadi Salim j...@mojatatu.com cheers, jamal -- To unsubscribe

Re: [PATCH net-next 6/6] net_sched: act: remove spinlock in fast path

2015-07-03 Thread Jamal Hadi Salim
, vlan and skbedit. CCing the respective authors. Signed-off-by: Eric Dumazet eduma...@google.com Cc: Alexei Starovoitov a...@plumgrid.com Cc: Jamal Hadi Salim j...@mojatatu.com Acked-by: Jamal Hadi Salim j...@mojatatu.com cheers, jamal -- To unsubscribe from this list: send the line

Re: [PATCH net-next 6/6] net_sched: act: remove spinlock in fast path

2015-07-03 Thread Jamal Hadi Salim
On 07/02/15 16:59, Eric Dumazet wrote: On Thu, 2015-07-02 at 09:35 -0700, John Fastabend wrote: Point is to not dirty cache line for every packet ? Doing the test means we attempt dirtying only ~HZ times per second, which really matters to handle millions of packets per second. My tests

Re: [PATCH net-next 4/6] net_sched: act: use a separate packet counters for gact_determ()

2015-07-03 Thread Jamal Hadi Salim
-by: Eric Dumazet eduma...@google.com Acked-by: Jamal Hadi Salim j...@mojatatu.com cheers, jamal -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

netdev broken?

2015-06-25 Thread Jamal Hadi Salim
Trying to catchup with email and i am noticing my last received email was on the 21st. Anyone else having problems (feel like i am asking the question if you cant hear me please raise your hand ;-). cheers, jamal -- To unsubscribe from this list: send the line unsubscribe netdev in the body of

[net-next PATCH 1/1] net: sched: flower fix typo

2015-06-25 Thread Jamal Hadi Salim
From: Jamal Hadi Salim h...@mojatatu.com Fix typo in the validation rules for flower's attributes Signed-off-by: Jamal Hadi Salim j...@mojatatu.com --- net/sched/cls_flower.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/cls_flower.c b/net/sched

Re: netdev broken?

2015-06-25 Thread Jamal Hadi Salim
On 06/25/15 08:03, David Miller wrote: I'm pretty sure you're just not subscribed to the list. I never unsubscribed. Ive resubscribed. cheers, jamal -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [RFC PATCH net-next 0/4] switchdev: avoid duplicate packet forwarding

2015-06-17 Thread Jamal Hadi Salim
On 06/16/15 17:11, Jiri Pirko wrote: Tue, Jun 16, 2015 at 06:47:47PM CEST, sfel...@gmail.com wrote: On Mon, Jun 15, 2015 at 11:04 PM, Jiri Pirko j...@resnulli.us wrote: So what we need is a unique mark for device ports within a fwding group, such as a bridge. Yep, have a group of netdevs,

<    5   6   7   8   9   10   11   >