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: [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-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-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 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 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-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 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

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: [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

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
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: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
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: [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: [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: 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: 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: 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: [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: [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

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 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: [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 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 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 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 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 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 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 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: [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: [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: [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

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: [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: [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: [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: [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] 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 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 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 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 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-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 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-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-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-17 Thread Jamal Hadi Salim
On 2020-10-16 12:42 p.m., Vlad Buslov wrote: All action print callbacks have arg==NULL check and return at the beginning. To print action type we need either to have dedicated 'brief_dump' callback instead of reusing print_aop() or extend/refactor print_aop() implementation for all actions to a

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

2020-10-16 Thread Jamal Hadi Salim
On 2020-10-16 10:42 a.m., Vlad Buslov wrote: From: Vlad Buslov Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when user requested it with following example CLI (-br for 'brief'): $ tc -s -brief f

0x14: Videos posted

2020-10-09 Thread Jamal Hadi Salim
To everyone (PC, organizing committee, speakers, workshop chairs, Tutors, sponsors, and attendees) - thank one more time for making the conference the success it was! The videos are now up. The sessions page is at: https://netdevconf.info/0x14/accepted-sessions.html The videos can be viewed d

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

2020-10-09 Thread Jamal Hadi Salim
On 2020-10-09 8:15 a.m., Vlad Buslov wrote: On Fri 09 Oct 2020 at 15:03, Jamal Hadi Salim wrote: Which test(s)? I see for example d45e mentioning terse but i dont see corresponding code in the iproute2 tree i just pulled. Yes. The tests d45e and 7c65 were added as a part of kernel series

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

2020-10-09 Thread Jamal Hadi Salim
On 2020-10-08 11:34 a.m., Vlad Buslov wrote: On Thu 08 Oct 2020 at 15:58, Jamal Hadi Salim wrote: Hi Jamal, The existing terse dump tdc tests will have to be changed according with new iproute2 tc syntax for brief(terse) output. Which test(s)? I see for example d45e mentioning terse but

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

2020-10-08 Thread Jamal Hadi Salim
On 2020-10-07 9:40 p.m., David Ahern wrote: On 9/30/20 9:59 AM, Vlad Buslov wrote: From: Vlad Buslov Implement support for classifier/action terse dump using new TCA_DUMP_FLAGS tlv with only available flag value TCA_DUMP_FLAGS_TERSE. Set the flag when user requested it with following example C

0x14: slides and papers posted

2020-09-20 Thread Jamal Hadi Salim
To everyone (PC, organizing committee, speakers, workshop chairs, Tutors, sponsors, and attendees) - thank you for making the conference the success it was! The slides and papers are now up. The videos will come after. The sessions page is at: https://netdevconf.info/0x14/accepted-sessions.htm

i4oe/XXV710 suspect tx_dropped stats

2020-09-15 Thread Jamal Hadi Salim
Ethtool reporting zero. ip -s reporting non-zero. Which is right? See attached for more details. cheers, jamal some bus info b3:00.0 Ethernet controller: Intel Corporation Ethernet Controller XXV710 for 25GbE SFP28 (rev 02) Subsystem: Super Micro Computer Inc Ethernet Controller XXV710

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: [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-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-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

[PATCH iproute2 1/1] tc: introduce skbhash classifier

2020-08-07 Thread Jamal Hadi Salim
From: Jamal Hadi Salim This 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->mark, skb->hash could be set by multiple entities in the datapath including but not limited to ha

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

2020-08-07 Thread Jamal Hadi Salim
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->mark, skb->hash could be set by multiple entities in the datapath including but not limited to ha

Re: rcu build on bug

2020-08-07 Thread Jamal Hadi Salim
rcu_head rcu; u32 mask; struct fw_filter __rcu *ht[HTSIZE]; - struct rcu_head rcu; }; Does not fix it.. cheers, jamal On 2020-08-07 11:16 a.m., Jamal Hadi Salim wrote: Made this small change: -- diff --git a/net/sched/cls_fw.c b

rcu build on bug

2020-08-07 Thread Jamal Hadi Salim
Made this small change: -- diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index ec945294626a..75d43ed10cd8 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c @@ -22,7 +22,7 @@ #include #include -#define HTSIZE 256 +#define HTSIZE 4096 struct fw_head { u32

Re: [PATCH net-next v2 0/3] ] TC datapath hash api

2020-08-07 Thread Jamal Hadi Salim
On 2020-07-10 8:04 a.m., Jamal Hadi Salim wrote: On 2020-07-09 8:19 a.m., Jiri Pirko wrote: Thu, Jul 09, 2020 at 01:00:26PM CEST, j...@mojatatu.com wrote: Main point is: classifying based on hash(and for that matter any other metadata like mark) is needed as a general utility for the system

Netdev conf 0x14 update and logistics

2020-07-22 Thread Jamal Hadi Salim
Some logistics for Netdev 0x14 virtual conference: Netdev 0x14 virtual conference will kick off on July 28th 3PM GMT(This coming Tuesday!) with a keynote from networking industry visionary Nick McKeown. What does Nick want to talk to us about? Nick has a vision on how we can work together to rea

Re: [PATCH net-next v2 0/3] ] TC datapath hash api

2020-07-10 Thread Jamal Hadi Salim
On 2020-07-09 8:19 a.m., Jiri Pirko wrote: Thu, Jul 09, 2020 at 01:00:26PM CEST, j...@mojatatu.com wrote: On 2020-07-08 10:45 a.m., Jiri Pirko wrote: Wed, Jul 08, 2020 at 03:54:14PM CEST, j...@mojatatu.com wrote: On 2020-07-07 6:05 a.m., Jiri Pirko wrote: Nothing to do with how a driver off

Re: [PATCH net-next v2 0/3] ] TC datapath hash api

2020-07-09 Thread Jamal Hadi Salim
On 2020-07-08 10:45 a.m., Jiri Pirko wrote: Wed, Jul 08, 2020 at 03:54:14PM CEST, j...@mojatatu.com wrote: On 2020-07-07 6:05 a.m., Jiri Pirko wrote: [..] IMO: For this specific case where _offload_ is the main use case i think it is not a good idea because flower on ingress is slow. Eh? W

Re: [PATCH net-next v2 0/3] ] TC datapath hash api

2020-07-08 Thread Jamal Hadi Salim
On 2020-07-07 6:05 a.m., Jiri Pirko wrote: Fri, Jul 03, 2020 at 01:22:47PM CEST, j...@mojatatu.com wrote: Hi, Several comments: 1) I agree with previous comments that you should look at incorporating this into skbedit. Unless incorporating into skbedit introduces huge complexity, IMO it belongs

Re: [PATCH net-next v2 0/3] ] TC datapath hash api

2020-07-05 Thread Jamal Hadi Salim
Hi Ariel, On 2020-07-05 1:26 p.m., Ariel Levkovich wrote: On 7/3/20 7:22 AM, Jamal Hadi Salim wrote: [..] Hi Jamal, I agree that using skbedit makes some sense and can provide the same functionality. However I believe that from a concept point of view, using it is wrong. In my honest

Re: [PATCH net-next v2 0/3] ] TC datapath hash api

2020-07-03 Thread Jamal Hadi Salim
Hi, Several comments: 1) I agree with previous comments that you should look at incorporating this into skbedit. Unless incorporating into skbedit introduces huge complexity, IMO it belongs there. 2) I think it would make sense to create a skb hash classifier instead of tying this entirely to fl

Re: [Cake] [PATCH net-next 1/5] sch_cake: fix IP protocol handling in the presence of VLAN tags

2020-06-26 Thread Jamal Hadi Salim
On 2020-06-26 8:52 a.m., Toke Høiland-Jørgensen wrote: Davide Caratti writes: hello, my 2 cents: On Thu, 2020-06-25 at 21:53 +0200, Toke Høiland-Jørgensen wrote: I think it depends a little on the use case; some callers actually care about the VLAN tags themselves and handle that specially

Re: [v1,net-next 3/4] net: qos: police action add index for tc flower offloading

2020-06-26 Thread Jamal Hadi Salim
On 2020-06-24 8:34 p.m., Po Liu wrote: -Original Message- That is the point i was trying to get to. Basically: You have a counter table which is referenced by "index" You also have a meter/policer table which is referenced by "index". They should be one same group and same meaning

Re: [v1,net-next 3/4] net: qos: police action add index for tc flower offloading

2020-06-24 Thread Jamal Hadi Salim
On 2020-06-23 7:52 p.m., Po Liu wrote: Hi Jamal, My question: Is this any different from how stats are structured? [..] My question: Why cant you apply the same semantics for the counters? Does your hardware have an indexed counter/stats table? If yes then you Yes, That is the poin

Re: [v1,net-next 3/4] net: qos: police action add index for tc flower offloading

2020-06-23 Thread Jamal Hadi Salim
On 2020-06-23 7:55 a.m., Po Liu wrote: [..] My question: Is this any different from how stats are structured? I don't know I fully catch the question. Are you trying to get how many frames for each filter chain passing one index policing action? If one index police action bind to multiple tc

Re: [v1,net-next 3/4] net: qos: police action add index for tc flower offloading

2020-06-23 Thread Jamal Hadi Salim
This certainly brings an interesting point which i brought up earlier when Jiri was doing offloading of stats. In this case the action index is being used as the offloaded policer index (note: there'd need to be a check whether the index is infact acceptable to the h/w etc unless there 2^32 meters

Re: [iproute2 PATCH 0/2] Fix segfault in lib/bpf.c

2020-05-28 Thread Jamal Hadi Salim
On 2020-05-27 6:13 p.m., Stephen Hemminger wrote: On Tue, 26 May 2020 18:04:09 +0200 Andrea Claudi wrote: Jamal reported a segfault in bpf_make_custom_path() when custom pinning is used. This is caused by commit c0325b06382cb ("bpf: replace snprintf with asprintf when dealing with long buffers

Re: [PATCH iproute2 v3 0/2] bpf: memory access fixes

2020-05-26 Thread Jamal Hadi Salim
On 2020-05-25 4:53 a.m., Andrea Claudi wrote: Reverting c0325b06382c will for sure fix the segfault identified by Jamal and get rid of the problems highlighted by Daniel and others. To fix the s[n]printf truncation warning we can simply check for its return value. From the snprintf man page:

Re: [PATCH net-next v2 0/4] Implement classifier-action terse dump mode

2020-05-23 Thread Jamal Hadi Salim
On 2020-05-22 12:16 p.m., Vlad Buslov wrote: On Thu 21 May 2020 at 20:02, Jakub Kicinski wrote: On Thu, 21 May 2020 17:36:12 +0300 Vlad Buslov wrote: Hi Edward, Cong, Do you really need to dump classifiers? If you care about stats the actions could be sufficient if the offload code was fix

Re: [PATCH iproute2 v3 0/2] bpf: memory access fixes

2020-05-23 Thread Jamal Hadi Salim
On 2020-05-22 9:33 p.m., Daniel Borkmann wrote: On 5/18/20 3:00 PM, Jamal Hadi Salim wrote: ping? Note: these are trivial bug fixes. Looking at c0325b06382c ("bpf: replace snprintf with asprintf when dealing with long buffers"), I wonder whether it's best to just revert a

Re: [PATCH iproute2-next 1/1] tc: report time an action was first used

2020-05-19 Thread Jamal Hadi Salim
On 2020-05-18 11:38 a.m., David Ahern wrote: On 5/18/20 7:10 AM, Jamal Hadi Salim wrote: On 2020-05-17 9:28 a.m., Roman Mashak wrote: Have print_tm() dump firstuse value along with install, lastuse and expires. Signed-off-by: Roman Mashak ---   tc/tc_util.c | 5 +   1 file changed, 5

Re: [PATCH iproute2-next 1/1] tc: report time an action was first used

2020-05-18 Thread Jamal Hadi Salim
On 2020-05-17 9:28 a.m., Roman Mashak wrote: Have print_tm() dump firstuse value along with install, lastuse and expires. Signed-off-by: Roman Mashak --- tc/tc_util.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tc/tc_util.c b/tc/tc_util.c index 12f865cc71bf..f6aa2ed552a9 100644

Re: [PATCH iproute2 v3 0/2] bpf: memory access fixes

2020-05-18 Thread Jamal Hadi Salim
ping? Note: these are trivial bug fixes. cheers, jamal On 2020-04-28 12:15 p.m., Jamal Hadi Salim wrote: Stephen, What happened to this? cheers, jamal On 2020-04-23 1:58 p.m., Jamal Hadi Salim wrote: From: Jamal Hadi Salim Changes from V2:   1) Dont initialize tmp on stack (Stephen)   2

Re: [PATCH net 1/1] net sched: fix reporting the first-time use timestamp

2020-05-18 Thread Jamal Hadi Salim
On 2020-05-17 9:10 p.m., Roman Mashak wrote: Cong Wang writes: On Sun, May 17, 2020 at 5:47 AM Roman Mashak wrote: When a new action is installed, firstuse field of 'tcf_t' is explicitly set to 0. Value of zero means "new action, not yet used"; as a packet hits the action, 'firstuse' is sta

Netdev conf 0x14 update

2020-05-14 Thread Jamal Hadi Salim
Hi, Apologies for taking longer than promised to provide an update on the conference. We finally have a decision - the conference is going fully virtual. For details please see: https://netdevconf.info/0x14/news.html?virtual-netdev-0x14 cheers, jamal

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-03 Thread Jamal Hadi Salim
and parent from caller down to tcf_fill_node") Fixes: edf6711c9840 ("net: sched: remove classid and q fields from tcf_proto") Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim cheers, jamal

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-03 Thread Jamal Hadi Salim
On 2020-05-03 8:02 a.m., Jamal Hadi Salim wrote: On 2020-05-02 10:28 p.m., Cong Wang wrote: On Sat, May 2, 2020 at 2:19 AM Jamal Hadi Salim wrote: On 2020-05-02 4:48 a.m., Jamal Hadi Salim wrote: [..] Note: tc filter show dev dummy0 root should not show that filter. OTOH, tc filter show

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-03 Thread Jamal Hadi Salim
On 2020-05-02 10:28 p.m., Cong Wang wrote: On Sat, May 2, 2020 at 2:19 AM Jamal Hadi Salim wrote: On 2020-05-02 4:48 a.m., Jamal Hadi Salim wrote: [..] Note: tc filter show dev dummy0 root should not show that filter. OTOH, tc filter show dev dummy0 parent : should. Hmm, but we use

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-02 Thread Jamal Hadi Salim
On 2020-05-02 4:48 a.m., Jamal Hadi Salim wrote: On 2020-04-30 11:53 p.m., Cong Wang wrote: [..] Steps to reproduce this:   ip li set dev dummy0 up   tc qd add dev dummy0 ingress   tc filter add dev dummy0 parent : protocol arp basic action pass   tc filter show dev dummy0 root Before

Re: [Patch net v2] net_sched: fix tcm_parent in tc filter dump

2020-05-02 Thread Jamal Hadi Salim
On 2020-04-30 11:53 p.m., Cong Wang wrote: When we tell kernel to dump filters from root (:), those filters on ingress (:) are matched, but their true parents must be dumped as they are. However, kernel dumps just whatever we tell it, that is either : or :: $ nl

Re: [PATCH iproute2 v3 0/2] bpf: memory access fixes

2020-04-28 Thread Jamal Hadi Salim
Stephen, What happened to this? cheers, jamal On 2020-04-23 1:58 p.m., Jamal Hadi Salim wrote: From: Jamal Hadi Salim Changes from V2: 1) Dont initialize tmp on stack (Stephen) 2) Dont look at the return code of snprintf (Dominique) 3) Set errno to EINVAL instead of returning -EINVAL

Re: [PATCH net-next 00/13] Control action percpu counters allocation by netlink flag

2019-10-23 Thread Jamal Hadi Salim
On 2019-10-23 9:04 a.m., Vlad Buslov wrote: On Wed 23 Oct 2019 at 15:49, Jamal Hadi Salim wrote: Hi Vlad, I understand your use case being different since it is for h/w offload. If you have time can you test with batching many actions and seeing the before/after improvement? Will do

Re: [RFC PATCH v2 bpf-next 00/15] xdp_flow: Flow offload to XDP

2019-10-23 Thread Jamal Hadi Salim
Sorry - didnt read every detail of this thread so i may be missing something. On 2019-10-22 12:54 p.m., John Fastabend wrote: Toshiaki Makita wrote: On 2019/10/19 0:22, John Fastabend wrote: Toshiaki Makita wrote: This is a PoC for an idea to offload flow, i.e. TC flower and nftables, to XD

Re: [PATCH net-next 00/13] Control action percpu counters allocation by netlink flag

2019-10-23 Thread Jamal Hadi Salim
I shouldve read the thread backward. My earlier email was asking similar question to Roman. On 2019-10-23 2:38 a.m., Vlad Buslov wrote: On Tue 22 Oct 2019 at 21:17, Roman Mashak wrote: Hi Roman, I considered it, but didn't find good way to implement my change with TCA_ROOT_FLAGS. I neede

Re: [PATCH net-next 00/13] Control action percpu counters allocation by netlink flag

2019-10-23 Thread Jamal Hadi Salim
Hi Vlad, On 2019-10-22 10:17 a.m., Vlad Buslov wrote: Currently, significant fraction of CPU time during TC filter allocation is spent in percpu allocator. Moreover, percpu allocator is protected with single global mutex which negates any potential to improve its performance by means of recent

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

  1   2   3   4   5   6   7   8   9   10   >