Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Jamal Hadi Salim
On 2019-05-22 11:08 a.m., Vlad Buslov wrote: On Tue 21 May 2019 at 16:23, Vlad Buslov wrote: It seems that culprit in this case is tc_action->order field. It is used as nla attrtype when dumping actions. Initially it is set according to ordering of actions of filter that creates them. Howev

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Jamal Hadi Salim
On 2019-05-22 1:49 p.m., Vlad Buslov wrote: On Wed 22 May 2019 at 20:24, Jamal Hadi Salim wrote: Ok, thanks for chasing this. A test case i had in mind is to maybe have 3 actions. Add the drop in the middle for one and at the begging for another and see if they are visible with the patch

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-22 Thread Jamal Hadi Salim
On 2019-05-22 2:23 p.m., Jamal Hadi Salim wrote: On 2019-05-22 1:49 p.m., Vlad Buslov wrote: On Wed 22 May 2019 at 20:24, Jamal Hadi Salim wrote: Ok, thanks for chasing this. A test case i had in mind is to maybe have 3 actions. Add the drop in the middle for one and at the begging for

Re: [PATCH v3 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-23 Thread Jamal Hadi Salim
On 2019-05-22 6:20 p.m., Jakub Kicinski wrote: On Wed, 22 May 2019 22:37:16 +0100, Edward Cree wrote: * removed RFC tags Why? There is still no upstream user for this (my previous objections of this being only partially correct aside). IIRC your point was to get the dumping to work with RT

Re: [PATCH v3 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-24 Thread Jamal Hadi Salim
On 2019-05-24 9:57 a.m., Edward Cree wrote: On 24/05/2019 14:09, Edward Cree wrote: I'll put together an RFC patch, anyway Argh, there's a problem: an action doesn't have a (directly) associated  block, and all the TC offload machinery nowadays is built around blocks. Since this action might h

Re: [PATCH v3 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-24 Thread Jamal Hadi Salim
On 2019-05-24 11:09 a.m., Edward Cree wrote: Oh, a push rather than pull model? Right. I thought the switchdev (or what used to be called switchdev) did a push of some of the tables periodically. That could work, but I worry about the overhead in the case of very large  numbers of rules (the

Re: [RFC net-next 1/1] net: sched: protect against loops in TC filter hooks

2019-05-26 Thread Jamal Hadi Salim
On 2019-05-24 2:32 p.m., Daniel Borkmann wrote: On 05/24/2019 06:05 PM, John Hurley wrote: TC hooks allow the application of filters and actions to packets at both ingress and egress of the network stack. It is possible, with poor configuration, that this can produce loops whereby an ingress hoo

Re: [PATCH net 0/2] Fix batched event generation for vlan action

2019-08-06 Thread Jamal Hadi Salim
n_ops of vlan action, which calculates the action size, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant vlan test cases. For the series: Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net-next v1 1/2] net: core: count drops from GRO

2021-01-14 Thread Jamal Hadi Salim
On 2021-01-08 2:21 p.m., Shannon Nelson wrote: On 1/8/21 10:26 AM, Jesse Brandeburg wrote: Shannon Nelson wrote: On 1/6/21 1:55 PM, Jesse Brandeburg wrote: When drivers call the various receive upcalls to receive an skb to the stack, sometimes that stack can drop the packet. The good news is

Re: [Patch net-next] net_sched: fix RTNL deadlock again caused by request_module()

2021-01-17 Thread Jamal Hadi Salim
is patch has been tested by syzbot and tested with tdc.py by me. LGTM. Initially i was worried about performance impact but i found nothing observable. We need to add a tdc test for batch (I can share how i did batch testing at next meet). Tested-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim cheers, jamal

Re: tc: u32: Wrong sample hash calculation

2021-01-20 Thread Jamal Hadi Salim
Hi, On 2021-01-18 6:29 a.m., Phil Sutter wrote: Hi! Playing with u32 filter's hash table I noticed it is not possible to use 'sample' option with keys larger than 8bits to calculate the hash bucket. I have mostly used something like: ht 2:: sample ip protocol 1 0xff Hoping this is continuin

Re: tc: u32: Wrong sample hash calculation

2021-01-22 Thread Jamal Hadi Salim
Hi Phil, On 2021-01-20 10:23 a.m., Phil Sutter wrote: Hi Jamal, On Wed, Jan 20, 2021 at 08:55:11AM -0500, Jamal Hadi Salim wrote: On 2021-01-18 6:29 a.m., Phil Sutter wrote: Hi! Playing with u32 filter's hash table I noticed it is not possible to use 'sample' option with k

Re: [PATCH net-next v2 2/4] sch_htb: Hierarchical QoS hardware offload

2020-12-15 Thread Jamal Hadi Salim
On 2020-12-14 3:30 p.m., Maxim Mikityanskiy wrote: On 2020-12-14 21:35, Cong Wang wrote: On Mon, Dec 14, 2020 at 7:13 AM Maxim Mikityanskiy wrote: On 2020-12-11 21:16, Cong Wang wrote: On Fri, Dec 11, 2020 at 7:26 AM Maxim Mikityanskiy wrote: Interesting, please explain how your HTB

Re: [PATCH net-next v2 2/4] sch_htb: Hierarchical QoS hardware offload

2020-12-17 Thread Jamal Hadi Salim
On 2020-12-16 6:47 a.m., Maxim Mikityanskiy wrote: On 2020-12-15 18:37, Jamal Hadi Salim wrote: [..] Same question above: Is there a limit to the number of classes that can be created? Yes, the commit message of the mlx5 patch lists the limitations of our NICs. Basically, it's 256

Re: [PATCH v5 bpf-next 03/14] xdp: add xdp_shared_info data structure

2020-12-19 Thread Jamal Hadi Salim
On 2020-12-19 9:53 a.m., Shay Agroskin wrote: Lorenzo Bianconi writes: for the moment I do not know if this area is used for other purposes. Do you think there are other use-cases for it? Sorry to interject: Does it make sense to use it to store arbitrary metadata or a scratchpad in this

Re: [PATCH v5 bpf-next 03/14] xdp: add xdp_shared_info data structure

2020-12-21 Thread Jamal Hadi Salim
On 2020-12-21 4:01 a.m., Jesper Dangaard Brouer wrote: On Sat, 19 Dec 2020 10:30:57 -0500 Sorry to interject: Does it make sense to use it to store arbitrary metadata or a scratchpad in this space? Something equivalent to skb->cb which is lacking in XDP. Well, XDP have the data_meta area. B

Re: [RFC, net-next] net: qos: introduce a redundancy flow action

2020-11-18 Thread Jamal Hadi Salim
On 2020-11-17 2:00 p.m., Joergen Andreasen wrote: The 11/17/2020 14:30, Xiaoliang Yang wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe This patch introduce a redundancy flow action to implement frame replication and elimination for reliability,

Re: [EXT] Re: [RFC, net-next] net: qos: introduce a redundancy flow action

2020-11-21 Thread Jamal Hadi Salim
Hi, On 2020-11-20 2:32 a.m., Xiaoliang Yang wrote: Hi Jamal, On 2020-11-19 0:11, Jamal Hadi Salim wrote: The 11/17/2020 14:30, Xiaoliang Yang wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you [..] We already have mirroring + ability to add/pop tags. Would the

Re: [PATCH v3 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-21 Thread Jamal Hadi Salim
ort to fix the over mtu for defrag in act_ct. Overall it looks much better to me now, so: Acked-by: Cong Wang LGTM as well. Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net-next] net: sched: alias action flags with TCA_ACT_ prefix

2020-11-22 Thread Jamal Hadi Salim
slov LGTM, thanks for the effort . Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net-next] net: sched: alias action flags with TCA_ACT_ prefix

2020-11-24 Thread Jamal Hadi Salim
On 2020-11-24 4:28 a.m., Vlad Buslov wrote: On Mon 23 Nov 2020 at 23:22, Jakub Kicinski wrote: On Sat, 21 Nov 2020 18:09:02 +0200 Vlad Buslov wrote: Currently both filter and action flags use same "TCA_" prefix which makes them hard to distinguish to code and confusing for users. Create aliase

Re: [PATCH iproute2-next v2] tc flower: use right ethertype in icmp/arp parsing

2020-11-24 Thread Jamal Hadi Salim
On 2020-11-24 7:13 a.m., Roi Dayan wrote: On 2020-11-24 11:39 AM, Roi Dayan wrote: [..] Hi, I didn't debug yet but with this commit I am failing to add a tc rule I always could before. also the error msg doesn't make sense. Example: # tc filter add dev enp8s0f0 protocol 802.1Q parent f

Re: [PATCH v4 net-next 3/3] net/sched: sch_frag: add generic packet fragment support.

2020-11-26 Thread Jamal Hadi Salim
later. Acked-by: Cong Wang Same here. Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH v11 net-next 0/3] net/sched: fix over mtu packet of defrag in

2020-11-14 Thread Jamal Hadi Salim
FWIW, I see the pragmatic need for this and so; cant think of a better way to do this. Patch one could probably go in its own merit. Wenxu, please Cc maintainers in the future - makes it easier to get feedback. Acked-by: Jamal Hadi Salim cheers, jamal On 2020-11-12 4:43 a.m., we...@ucloud.cn

Re: [PATCH v10 net-next 3/3] net/sched: act_frag: add implict packet fragment support.

2020-11-15 Thread Jamal Hadi Salim
This nagged me: What happens if all the frags dont make it out? Should you at least return an error code(from tcf_fragment?) and get the action err counters incremented? cheers, jamal On 2020-11-15 8:05 a.m., wenxu wrote: 在 2020/11/15 2:05, Cong Wang 写道: On Wed, Nov 11, 2020 at 9:44 PM wrote

Announcing Netdev 0x15

2020-12-30 Thread Jamal Hadi Salim
While we bid goodbye to 2020, here's some good hopeful news for 2021. cheers, jamal Forwarded Message Subject: [NetDev-People] Announcing Netdev 0x15 Date: Sun, 27 Dec 2020 15:54:31 -0700 From: Tom Herbert via people Reply-To: Tom Herbert To: peo...@netdevconf.info Hello

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-19 Thread Jamal Hadi Salim
On 2020-10-18 8:16 a.m., Vlad Buslov wrote: On Sat 17 Oct 2020 at 14:20, Jamal Hadi Salim wrote: On 2020-10-16 12:42 p.m., Vlad Buslov wrote: Either one sounds appealing - the refactoring feels simpler as opposed to a->terse_print(). With such refactoring we action type will be prin

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-20 Thread Jamal Hadi Salim
On 2020-10-19 11:18 a.m., Vlad Buslov wrote: On Mon 19 Oct 2020 at 16:48, Jamal Hadi Salim wrote: On 2020-10-18 8:16 a.m., Vlad Buslov wrote: [..] That could be a good thing, no? you get to see the action name with the error. Its really not a big deal if you decide to do a->terse_pr

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-22 Thread Jamal Hadi Salim
On 2020-10-21 4:19 a.m., Vlad Buslov wrote: On Tue 20 Oct 2020 at 15:29, Jamal Hadi Salim wrote: On 2020-10-19 11:18 a.m., Vlad Buslov wrote: My worry is you have a very specific use case for your hardware or maybe it is ovs - where counters are uniquely tied to filters and there is no

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-24 Thread Jamal Hadi Salim
On 2020-10-23 8:48 a.m., Vlad Buslov wrote: On Thu 22 Oct 2020 at 17:05, Jamal Hadi Salim wrote: On 2020-10-21 4:19 a.m., Vlad Buslov wrote: On Tue 20 Oct 2020 at 15:29, Jamal Hadi Salim wrote: On 2020-10-19 11:18 a.m., Vlad Buslov wrote: My worry is you have a very specific use case for

Re: [PATCH iproute2-next v4 1/2] tc: skip actions that don't have options attribute when printing

2020-10-24 Thread Jamal Hadi Salim
ion kind before returning from action_until->print_aopt() callbacks. This is necessary to support terse dump mode in following patch in the series. Signed-off-by: Vlad Buslov Suggested-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-26 Thread Jamal Hadi Salim
On 2020-10-26 7:28 a.m., Vlad Buslov wrote: On Sat 24 Oct 2020 at 20:40, Jamal Hadi Salim wrote: [..] Yes, that makes sense. I guess introducing something like 'tc action -br ls ..' mode implemented by means of existing terse flag + new 'also output action index' fla

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-26 Thread Jamal Hadi Salim
On 2020-10-26 1:46 p.m., Vlad Buslov wrote: On Mon 26 Oct 2020 at 19:12, Jamal Hadi Salim wrote: On 2020-10-26 7:28 a.m., Vlad Buslov wrote: On Sat 24 Oct 2020 at 20:40, Jamal Hadi Salim wrote: [..] Yes, that makes sense. I guess introducing something like 'tc action -br ls ..&

Re: [PATCH iproute2-next v3 2/2] tc: implement support for terse dump

2020-10-26 Thread Jamal Hadi Salim
On 2020-10-26 2:03 p.m., Vlad Buslov wrote: On Mon 26 Oct 2020 at 20:01, Jamal Hadi Salim wrote: On 2020-10-26 1:46 p.m., Vlad Buslov wrote: yeah, something like TCA_ACT_FLAGS_TERSE. new tcf_action_dump_terse() takes one more field which says to include or not the cookies since that is

Re: [PATCH net-next] net: sched: implement action-specific terse dump

2020-11-02 Thread Jamal Hadi Salim
Thanks Vlad. Ive run the basic test and it looks good. One thing i discovered while testing is that if the cookie is set, we also want it in the dump. Your earlier comment that it only costs if it was set is on point. So please remove that check below: > + if (cookie && !from_act) { > +

Re: [PATCH iproute2-next] tc: implement support for action terse dump

2020-11-03 Thread Jamal Hadi Salim
CA_FLAG_LARGE_DUMP_ON in the uapi header will help. Of course that would be a separate patch which will require conversion code in both the kernel and user space. FWIW, the patch is good for what i tested. So even if you do send an update with a name change please add: Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net-next v2] net: sched: implement action-specific terse dump

2020-11-05 Thread Jamal Hadi Salim
the action). This is different from filter terse dump where index is excluded (filter can be identified by its own handle). Move tcf_action_dump_terse() function to the beginning of source file in order to call it from tcf_dump_walker(). Signed-off-by: Vlad Buslov Suggested-by: Jamal Hadi Salim

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-05 Thread Jamal Hadi Salim
On 2020-11-04 10:19 p.m., David Ahern wrote: [..] User experience keeps getting brought up, but I also keep reading the stance that BPF users can not expect a consistent experience unless they are constantly chasing latest greatest versions of *ALL* S/W related to BPF. That is not a realistic e

Re: [PATCHv3 iproute2-next 0/5] iproute2: add libbpf support

2020-11-06 Thread Jamal Hadi Salim
On 2020-11-05 4:01 p.m., Andrii Nakryiko wrote: On Thu, Nov 5, 2020 at 6:05 AM Jamal Hadi Salim wrote: On 2020-11-04 10:19 p.m., David Ahern wrote: [..] [..] 2cents feedback from a dabbler in ebpf on user experience: What David described above *has held me back*. Over time it seems

Re: [PATCH net-next 1/2] selftests: tc-testing: add action police selftest for packets per second

2021-03-27 Thread Jamal Hadi Salim
On 2021-03-26 9:09 a.m., Simon Horman wrote: From: Baowen Zheng Add selftest cases in action police for packets per second. These tests depend on corresponding iproute2 command support. Signed-off-by: Baowen Zheng Signed-off-by: Simon Horman Gracias. Reviewed-by: Jamal Hadi Salim

Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-08 Thread Jamal Hadi Salim
On 2021-04-07 7:50 p.m., Cong Wang wrote: On Wed, Apr 7, 2021 at 8:36 AM Vlad Buslov wrote: Action init code increments reference counter when it changes an action. This is the desired behavior for cls API which needs to obtain action reference for every classifier that points to action. Howev

Re: [PATCH net v2 2/3] net: sched: fix action overwrite reference counting

2021-04-08 Thread Jamal Hadi Salim
On 2021-04-08 3:50 a.m., Vlad Buslov wrote: On Thu 08 Apr 2021 at 02:50, Cong Wang wrote: Origins of setting ovr based on NLM_F_REPLACE are lost since this code goes back to Linus' Linux-2.6.12-rc2 commit. Jamal, do you know if this is the expected behavior or just something unintended? Se

Re: [PATCH net-next 1/7] net: sched: Add a trap-and-forward action

2021-04-08 Thread Jamal Hadi Salim
Hi Petr, On 2021-04-08 9:38 a.m., Petr Machata wrote: The TC action "trap" is used to instruct the HW datapath to drop the matched packet and transfer it for processing in the SW pipeline. If instead it is desirable to forward the packet and transferring a _copy_ to the SW pipeline, there is no

Re: [PATCH net-next 1/7] net: sched: Add a trap-and-forward action

2021-04-09 Thread Jamal Hadi Salim
On 2021-04-08 5:25 p.m., Jakub Kicinski wrote: On Thu, 8 Apr 2021 10:05:07 -0400 Jamal Hadi Salim wrote: On 2021-04-08 9:38 a.m., Petr Machata wrote: The TC action "trap" is used to instruct the HW datapath to drop the matched packet and transfer it for processing in the SW pi

Re: [PATCH net-next 1/7] net: sched: Add a trap-and-forward action

2021-04-09 Thread Jamal Hadi Salim
On 2021-04-09 7:03 a.m., Petr Machata wrote: Jamal Hadi Salim writes: I am concerned about adding new opcodes which only make sense if you offload (or make sense only if you are running in s/w). Those opcodes are intended to be generic abstractions so the dispatcher can decide what to do

Re: [PATCH net-next 1/7] net: sched: Add a trap-and-forward action

2021-04-11 Thread Jamal Hadi Salim
On 2021-04-09 9:43 a.m., Petr Machata wrote: Jamal Hadi Salim writes: Does the spectrum not support multiple actions? e.g with a policy like: match blah action trap action drop skip_sw Trap drops implicitly. We need a "trap, but don't drop". Expressed in terms of exis

Re: tc: u32: Wrong sample hash calculation

2021-01-24 Thread Jamal Hadi Salim
Hi Phil, On 2021-01-22 8:59 a.m., Phil Sutter wrote: Jamal, On Fri, Jan 22, 2021 at 06:25:22AM -0500, Jamal Hadi Salim wrote: [...] My gut feel is user space is the right/easier spot to fix this as long as it doesnt break the working setup of 8b. One last attempt at clarifying the situation

Re: [Patch bpf-next v5 1/3] bpf: introduce timeout hash map

2021-01-31 Thread Jamal Hadi Salim
On 2021-01-29 10:14 p.m., Alexei Starovoitov wrote: On Fri, Jan 29, 2021 at 6:14 AM Jamal Hadi Salim wrote: On 2021-01-29 9:06 a.m., Jamal Hadi Salim wrote: Which leads to: Why not extend the general feature so one can register for optional callbacks not just for expire but also add/del

Re: [PATCH net-next v2] net/sched: act_police: add support for packet-per-second policing

2021-02-02 Thread Jamal Hadi Salim
On 2021-02-01 7:33 a.m., Simon Horman wrote: On Fri, Jan 29, 2021 at 09:30:00AM -0500, Jamal Hadi Salim wrote: Ido's comment is important: Why not make packet rate vs byte rate mutually exclusive? If someone uses packet rate then you make sure they dont interleave with attributes for

Re: [iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-04 Thread Jamal Hadi Salim
Hi Phil, I couldnt tell by inspection if what used to work before continues to. In particular the kernel version does consider the divisor when folding. Two examples that currently work, if you can try them: Most used scheme: --- tc filter add dev $DEV parent 999:0 protocol ip prio 10 u32 \ ht

Re: [iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-04 Thread Jamal Hadi Salim
On 2021-02-04 9:04 a.m., Phil Sutter wrote: Jamal, On Thu, Feb 04, 2021 at 08:19:55AM -0500, Jamal Hadi Salim wrote: I couldnt tell by inspection if what used to work before continues to. In particular the kernel version does consider the divisor when folding. That's correct. And so do

Re: [iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-04 Thread Jamal Hadi Salim
sorry - meant to say, tdc is in kernel tree: tools/testing/selftests/tc-testing cheers, jamal

Re: [iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-04 Thread Jamal Hadi Salim
On 2021-02-04 9:50 a.m., Phil Sutter wrote: On Thu, Feb 04, 2021 at 09:34:01AM -0500, Jamal Hadi Salim wrote: On 2021-02-04 9:04 a.m., Phil Sutter wrote: Jamal, On Thu, Feb 04, 2021 at 08:19:55AM -0500, Jamal Hadi Salim wrote: I couldnt tell by inspection if what used to work before

Re: [iproute PATCH] tc: u32: Fix key folding in sample option

2021-02-04 Thread Jamal Hadi Salim
On 2021-02-04 11:50 a.m., Phil Sutter wrote: On Thu, Feb 04, 2021 at 10:28:26AM -0500, Jamal Hadi Salim wrote: On 2021-02-04 9:50 a.m., Phil Sutter wrote: On Thu, Feb 04, 2021 at 09:34:01AM -0500, Jamal Hadi Salim wrote: On 2021-02-04 9:04 a.m., Phil Sutter wrote: Jamal, On Thu, Feb 04

CFS for Netdev 0x15 open!

2021-03-16 Thread Jamal Hadi Salim
We are pleased to announce the opening of Call For Submissions(CFS) for Netdev 0x15. For overview of topics, submissions and requirements please visit: https://netdevconf.info/0x15/submit-proposal.html For all submitted sessions, we employ a double blind review process carried out by the Program

Re: [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing

2021-03-16 Thread Jamal Hadi Salim
rate and burst parameters. ... Sorry, I missed CCing a number of interested parties when posting this patch-set. I've added them to this email. Ref: https://lore.kernel.org/netdev/20210312140831.23346-1-simon.hor...@netronome.com/ For 2/3: Reviewed-by: Jamal Hadi Salim If you submit o

Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier

2020-08-09 Thread Jamal Hadi Salim
On 2020-08-09 2:15 p.m., Cong Wang wrote: On Fri, Aug 7, 2020 at 3:28 PM Jamal Hadi Salim wrote: From: Jamal Hadi Salim his classifier, in the same spirit as the tc skb mark classifier, provides a generic (fast lookup) approach to filter on the hash value and optional mask. like skb->m

Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier

2020-08-13 Thread Jamal Hadi Salim
On 2020-08-11 7:25 p.m., Cong Wang wrote: On Sun, Aug 9, 2020 at 4:41 PM Jamal Hadi Salim wrote: [..] Not sure if I get you correctly, but with a combined implementation you can do above too, right? Something like: (AND case) $TC filter add dev $DEV1 parent : protocol ip prio 3 handle

Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier

2020-08-17 Thread Jamal Hadi Salim
On 2020-08-16 2:59 p.m., Cong Wang wrote: On Thu, Aug 13, 2020 at 5:52 AM Jamal Hadi Salim wrote: [..] How do you know whether to use hash or mark or both for that specific key? Hmm, you can just unconditionally pass skb->hash and skb->mark, no? Something lik

Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier

2020-08-19 Thread Jamal Hadi Salim
On 2020-08-17 3:47 p.m., Cong Wang wrote: On Mon, Aug 17, 2020 at 4:19 AM Jamal Hadi Salim wrote: [..] There is no ambiguity of intent in the fw case, there is only one field. In the case of having multiple fields it is ambigious if you unconditionally look. Example: policy says to match

Re: Removing skb_orphan() from ip_rcv_core()

2019-06-24 Thread Jamal Hadi Salim
with tcp at the time; so left udp dependency on netfilter alone. cheers, jamal commit 4d130b0a883b4aebc36a88ca116746594e176c6a Author: Jamal Hadi Salim Date: Fri Nov 25 15:45:48 2016 -0400 transparent proxy workaround so we can get the tcaction to work diff --git a/net/ipv4/ip_input.c

Re: Removing skb_orphan() from ip_rcv_core()

2019-06-25 Thread Jamal Hadi Salim
On 2019-06-24 12:49 p.m., Eric Dumazet wrote: Well, I would simply remove the skb_orphan() call completely. My experience: You still need to call skb_orphan() from the lower level (and set the skb destructor etc). cheers, jamal

Re: Removing skb_orphan() from ip_rcv_core()

2019-06-25 Thread Jamal Hadi Salim
On 2019-06-24 11:26 p.m., Joe Stringer wrote: [..] I haven't got as far as UDP yet, but I didn't see any need for a dependency on netfilter. I'd be curious to see what you did. My experience, even for TCP is the socket(transparent/tproxy) lookup code (to set skb->sk either listening or establi

Re: [PATCH net-next 0/2] Track recursive calls in TC act_mirred

2019-06-25 Thread Jamal Hadi Salim
On 2019-06-24 6:13 p.m., John Hurley wrote: These patches aim to prevent act_mirred causing stack overflow events from recursively calling packet xmit or receive functions. Such events can occur with poor TC configuration that causes packets to travel in loops within the system. Florian Westphal

Re: [PATCH net-next 2/2] net: sched: protect against stack overflow in TC act_mirred

2019-06-25 Thread Jamal Hadi Salim
On 2019-06-25 5:06 a.m., John Hurley wrote: On Tue, Jun 25, 2019 at 9:30 AM Eyal Birger wrote: I'm not sure on the history of why a value of 4 was selected here but it seems to fall into line with my findings. Back then we could only loop in one direction (as opposed to two right now) - so

Re: [PATCH net-next 1/1] inet_diag: fetch cong algo info when socket is destroyed

2018-04-30 Thread Jamal Hadi Salim
On 29/04/18 08:31 PM, David Miller wrote: Well, two things: 1) The congestion control info is opt-in, meaning that the user gets it in the dump if they ask for it. This information is opt-in, because otherwise the dumps get really large. Therefore, emitting this stuff by defau

Re: [PATCH net-next] net:sched: add gkprio scheduler

2018-05-08 Thread Jamal Hadi Salim
On 08/05/18 08:59 AM, Michel Machado wrote: Overall it looks good to me, just one thing below: +struct Qdisc_ops gkprio_qdisc_ops __read_mostly = { +   .id =   "gkprio", +   .priv_size  =   sizeof(struct gkprio_sched_data), +   .enqueue    =   gkprio_

Re: [PATCH net-next] net:sched: add gkprio scheduler

2018-05-09 Thread Jamal Hadi Salim
On 08/05/18 10:27 PM, Cong Wang wrote: On Tue, May 8, 2018 at 6:29 AM, Jamal Hadi Salim wrote: Have you considered using skb->prio instead of peeking into the packet header. Also have you looked at the dsmark qdisc? dsmark modifies ds fields, while this one just maps ds fields i

Re: [PATCH net-next] net:sched: add gkprio scheduler

2018-05-12 Thread Jamal Hadi Salim
Sorry for the latency.. On 09/05/18 01:37 PM, Michel Machado wrote: On 05/09/2018 10:43 AM, Jamal Hadi Salim wrote: On 08/05/18 10:27 PM, Cong Wang wrote: On Tue, May 8, 2018 at 6:29 AM, Jamal Hadi Salim wrote: I like the suggestion of extending skbmod to mark skbprio based on ds. Given

Re: [PATCH net 1/3] net: sched: ife: signal not finding metaid

2018-04-19 Thread Jamal Hadi Salim
: Yotam Gigi Acked-by: Jamal Hadi Salim

Re: [PATCH net 2/3] net: sched: ife: handle malformed tlv length

2018-04-19 Thread Jamal Hadi Salim
that! Signed-off-by: Alexander Aring Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net 3/3] net: sched: ife: check on metadata length

2018-04-19 Thread Jamal Hadi Salim
-by: Alexander Aring Reviewed-by: Yotam Gigi Acked-by: Jamal Hadi Salim cheers, jamal

[PATCH net-next 1/1] inet_diag: fetch cong algo info when socket is destroyed

2018-04-26 Thread Jamal Hadi Salim
From: Jamal Hadi Salim When a user dumps an existing established tcp socket state via inet diag, it is possible to retrieve the congestion control details. When an the sock is destroyed, the generated event has all the details available in the dump sans congestion control info. This patch fixes

Re: [PATCH net 1/1] net sched actions: fix dumping which requires several messages to user space

2018-03-27 Thread Jamal Hadi Salim
Note that the action with index 27 is omitted from the report. Fixes: 4b3550ef530c ("[NET_SCHED]: Use nla_nest_start/nla_nest_end")" Signed-off-by: Craig Dillabaugh Good catch. Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net-next 0/2] Fix batched event generation for mirred action

2019-06-29 Thread Jamal Hadi Salim
ave an error talking to the kernel % patch 1 adds callback in tc_action_ops of mirred action, which calculates the action size, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant test cases. Acked-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net-next 0/2] tc-testing: Add plugin for simple traffic generation

2019-07-09 Thread Jamal Hadi Salim
example test case file to demonstrate how the scapy block works in the test cases. Shouldve said V3 in the subject line - but fwiw, ACKed-by: Jamal Hadi Salim cheers, jamal

Re: [PATCH net-next 1/3 v6] net: ether: Add support for multiplexing and aggregation type

2017-08-20 Thread Jamal Hadi Salim
On 17-08-19 01:35 AM, Subash Abhinov Kasiviswanathan wrote: Define the multiplexing and aggregation (MAP) ether type 0xDA1A. This is needed for receiving data in the MAP protocol like RMNET. This is not an officially registered ID. Signed-off-by: Subash Abhinov Kasiviswanathan --- include/uap

Re: [PATCH net-next 1/3 v6] net: ether: Add support for multiplexing and aggregation type

2017-08-21 Thread Jamal Hadi Salim
On 17-08-20 06:12 PM, David Miller wrote: +#define ETH_P_MAP 0xDA1A /* Multiplexing and Aggregation Protocol + * NOT AN OFFICIALLY REGISTERED ID ] You cant just arbitrarly assign yourself an ethertype. The IEEE may never issue you one - and if they do, it will likely not be the one you want i

Re: [PATCH net-next] net: sched: Add the invalid handle check in qdisc_class_find

2017-08-21 Thread Jamal Hadi Salim
On 17-08-21 03:58 PM, Cong Wang wrote: On Mon, Aug 21, 2017 at 10:47 AM, David Miller wrote: From: gfree.w...@vip.163.com Date: Fri, 18 Aug 2017 15:23:24 +0800 From: Gao Feng Add the invalid handle "0" check to avoid unnecessary search, because the qdisc uses the skb->priority as the handle

Re: [Patch net-next v2 1/4] net_sched: get rid of more forward declarations

2017-08-25 Thread Jamal Hadi Salim
On 17-08-24 07:51 PM, Cong Wang wrote: This is not needed if we move them up properly. Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim cheers, jamal

Re: [Patch net-next v2 2/4] net_sched: introduce tclass_del_notify()

2017-08-25 Thread Jamal Hadi Salim
On 17-08-24 07:51 PM, Cong Wang wrote: Like for TC actions, ->delete() is a special case, we have to prepare and fill the notification before delete otherwise would get use-after-free after we remove the reference count. Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim cheers, jamal

Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Jamal Hadi Salim
the last refcnt into ->delete(), right after releasing tree lock. This is fine because the class is already removed from hash when holding the lock. For those who also use ->put() as ->unbind(), just rename them to reflect this change. Cc: Jamal Hadi Salim Signed-off-by: Cong Wang I

Re: [Patch net-next v2 4/4] net_sched: kill u32_node pointer in Qdisc

2017-08-25 Thread Jamal Hadi Salim
n, we can just compare the pointers when collision. And this only affects slow paths, has no impact to fast path, thanks to the pointer ->tp_c. Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Nice work. should open the doors for Jiri now. Acked-by: Jamal Hadi Salim cheers, jamal

update on netdev 0x13 conference

2019-02-20 Thread Jamal Hadi Salim
This is a small update to the community on the Netdev 0x13 conference (March 20-22, in Prague, Czech Republic) https://www.netdevconf.org/0x13 Early registration fees end today at 23:59 EST. To Register: https://www.netdevconf.org/0x13/registration.html Our bursaries are also going to close toda

Re: [PATCH net-next v2 0/7] net: sched: pie: align PIE implementation with RFC 8033

2019-02-25 Thread Jamal Hadi Salim
On 2019-02-25 5:20 a.m., Leslie Monis wrote: The current implementation of the PIE queuing discipline is according to the IETF draft [http://tools.ietf.org/html/draft-pan-aqm-pie-00] and the paper [PIE: A Lightweight Control Scheme to Address the Bufferbloat Problem]. However, a lot of necessary

Re: [PATCH net-next v2 0/7] net: sched: pie: align PIE implementation with RFC 8033

2019-02-25 Thread Jamal Hadi Salim
On 2019-02-25 8:43 a.m., Jamal Hadi Salim wrote: On 2019-02-25 5:20 a.m., Leslie Monis wrote: The current implementation of the PIE queuing discipline is according to the IETF draft [http://tools.ietf.org/html/draft-pan-aqm-pie-00] and the paper [PIE: A Lightweight Control Scheme to Address

Re: [PATCH net-next v2 0/7] net: sched: pie: align PIE implementation with RFC 8033

2019-02-25 Thread Jamal Hadi Salim
On 2019-02-25 9:11 a.m., Dave Taht wrote: Jamal Hadi Salim writes: On 2019-02-25 8:43 a.m., Jamal Hadi Salim wrote: On 2019-02-25 5:20 a.m., Leslie Monis wrote: The current implementation of the PIE queuing discipline is according to the IETF draft [http://tools.ietf.org/html/draft-pan-aqm

Re: TC stats / hw offload question

2019-04-26 Thread Jamal Hadi Salim
On 2019-04-26 8:13 a.m., Edward Cree wrote: Sure; this block is (still slightly abridged) if (a->ops && a->ops->stats_update) {     struct efx_tc_counter_index *ctr;     ctr = efx_tc_flower_get_counter_by_index(efx, a->tcfa_index);     if (IS_ERR(ctr)) {         rc = PTR_ERR(ctr);        

Re: [RFC PATCH net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-06 Thread Jamal Hadi Salim
On 2019-05-04 2:27 a.m., Jakub Kicinski wrote: On Fri, 3 May 2019 16:06:55 +0100, Edward Cree wrote: Introduce a new offload command TC_CLSFLOWER_STATS_BYINDEX, similar to the existing TC_CLSFLOWER_STATS but specifying an action_index (the tcfa_index of the action), which is called for each

Re: [RFC PATCH net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-08 Thread Jamal Hadi Salim
On 2019-05-07 8:27 a.m., Edward Cree wrote: On 06/05/2019 13:41, Jamal Hadi Salim wrote: On 2019-05-04 2:27 a.m., Jakub Kicinski wrote: On Fri, 3 May 2019 16:06:55 +0100, Edward Cree wrote: [..] I don't know much of anything about RTM_GETACTION, but it doesn't appear  to be p

Re: [RFC PATCH net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-09 Thread Jamal Hadi Salim
On 2019-05-08 1:07 p.m., Edward Cree wrote: On 08/05/2019 15:02, Jamal Hadi Salim wrote: The lazy thing most people have done is essentially assume that there is a stat per filter rule... I wouldnt call it the 'the right thing' Yup, that's why I'm trying to not do

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-18 Thread Jamal Hadi Salim
On 2019-05-15 3:39 p.m., Edward Cree wrote: [..] A point for discussion: would it be better if, instead of the tcfa_index (for which the driver has to know the rules about which flow_action types share a namespace), we had some kind of globally unique cookie? In the same way that rule->coo

Re: [RFC PATCH v2 net-next 1/3] flow_offload: copy tcfa_index into flow_action_entry

2019-05-18 Thread Jamal Hadi Salim
On 2019-05-15 3:42 p.m., Edward Cree wrote: Required for support of shared counters (and possibly other shared per- action entities in future). Signed-off-by: Edward Cree --- include/net/flow_offload.h | 1 + net/sched/cls_api.c| 1 + 2 files changed, 2 insertions(+) diff --git a

Re: [RFC PATCH v2 net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-18 Thread Jamal Hadi Salim
On 2019-05-15 3:42 p.m., Edward Cree wrote: In the TC_CLSFLOWER_STATS callback from fl_hw_update_stats(), pass an array of struct flow_stats_entry, one for each action in the flow rule. Current drivers (which do not collect per-action stats, but rather per- rule) call flow_stats_update() in a

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-18 Thread Jamal Hadi Salim
On 2019-05-17 1:14 p.m., Edward Cree wrote: On 17/05/2019 16:27, Edward Cree wrote: I'm now leaning towards the approach of adding "unsigned long cookie" to struct flow_action_entry and populating it with (unsigned long)act in tc_setup_flow_action(). For concreteness, here's what that look

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-20 Thread Jamal Hadi Salim
On 2019-05-20 11:26 a.m., Edward Cree wrote: On 18/05/2019 21:39, Jamal Hadi Salim wrote: On 2019-05-17 1:14 p.m., Edward Cree wrote: On 17/05/2019 16:27, Edward Cree wrote: Unless *I* missed something, I'm not changing the TC<=>user-space API at  all.  If user space specifi

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-20 Thread Jamal Hadi Salim
On 2019-05-20 11:37 a.m., Edward Cree wrote: On 19/05/2019 01:22, Pablo Neira Ayuso wrote: On Fri, May 17, 2019 at 04:27:29PM +0100, Edward Cree wrote: Thanks.  Looking at net/netfilter/nfnetlink_acct.c, it looks as though you  don't have a u32 index in there; for the cookie approach, would

Re: [RFC PATCH v2 net-next 2/3] flow_offload: restore ability to collect separate stats per action

2019-05-20 Thread Jamal Hadi Salim
On 2019-05-20 11:46 a.m., Edward Cree wrote: I can't see anything stats-offload related in net/sched/cls_u32.c (just  SW stats dumping in u32_dump()) and it doesn't call  tcf_exts_stats_update() either.  Looking through ixgbe code I also  don't see any sign there of stats gathering for offloa

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-20 Thread Jamal Hadi Salim
On 2019-05-20 12:10 p.m., Edward Cree wrote: On 20/05/2019 16:38, Jamal Hadi Salim wrote: That is fine then if i could do: tc actions add action drop index 104 then followed by for example the two filters you show below.. That seems to work. nice. Is your hardware not using explicit

Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics

2019-05-20 Thread Jamal Hadi Salim
On 2019-05-20 12:29 p.m., Jamal Hadi Salim wrote: Assuming in this case you added by value the actions? To be clear on the terminology: "By Value" implies you add the filter and action in the same command line. "By Reference" implies you first create the action then c

  1   2   3   4   5   6   7   8   9   10   >