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 s

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

2020-08-17 Thread Cong Wang
On Mon, Aug 17, 2020 at 4:19 AM Jamal Hadi Salim wrote: > > 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 unconditional

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 like: if (filter_parameter_has_ha

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

2020-08-16 Thread Cong Wang
On Thu, Aug 13, 2020 at 5:52 AM Jamal Hadi Salim wrote: > > The _main_ requirement is to scale to a large number of filters > (a million is a good handwave number). Scale means > 1) fast datapath lookup time + 2) fast insertion/deletion/get/dump > from control/user space. > fwmark is good at all t

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 1

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

2020-08-12 Thread Marcelo Ricardo Leitner
On Tue, Aug 11, 2020 at 04:25:43PM -0700, Cong Wang wrote: > On Sun, Aug 9, 2020 at 4:41 PM Jamal Hadi Salim wrote: > > > > Interesting idea. Note: my experience is that typical setup is > > to have only one of those (from offload perspective). Ariel, > > are your use cases requiring say both fiel

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

2020-08-11 Thread Cong Wang
On Sun, Aug 9, 2020 at 4:41 PM Jamal Hadi Salim wrote: > > Interesting idea. Note: my experience is that typical setup is > to have only one of those (from offload perspective). Ariel, > are your use cases requiring say both fields? > > From policy perspective, i think above will get more complex

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

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

2020-08-09 Thread Cong Wang
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->mark, skb->hash could be set by multip

[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 hardware offl