All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: netdev@vger.kernel.org, Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
	Kumar A S <kumaras@chelsio.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	Alexander Duyck <alexander.h.duyck@intel.com>,
	Amritha Nambiar <amritha.nambiar@intel.com>,
	Jose.Abreu@synopsys.com, peppe.cavallaro@st.com,
	alexandre.torgue@st.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Anjali Singhai Jain <anjali.singhai@intel.com>
Subject: Offloaded u32 classifier tables WAS (Re: [PATCH net 00/13] cls_u32 cleanups and fixes.
Date: Mon, 10 Sep 2018 08:25:45 -0400	[thread overview]
Message-ID: <3c72ac9e-12d6-0244-d380-5803607c1dae@mojatatu.com> (raw)
In-Reply-To: <20180909154827.GH19965@ZenIV.linux.org.uk>

On 2018-09-09 11:48 a.m., Al Viro wrote:

>
> BTW, shouldn't we issue u32_clear_hw_hnode() every time
> we destroy an hnode?  It's done on u32_delete(), it's
> done (for root ht) on u32_destroy(), but it's not done
> for any other hnodes when you remove the entire (not shared)
> filter.  Looks fishy...
> 

What you are saying makes sense, but that doesnt seem
like a new thing.
All hardware offload examples I have seen use root tables
only[1]. So I am not sure if they use any other tables
although the intel hardware at least seems very capable.
Look at ixgbe_main.c for example. Theres an explicit assumption
that root is always 0x800 but oresence of

+Cc some of the NIC vendor folks..



cheers,
jamal

[1]
Here's a script posted by someone at Intel(Sridhar?) a while back
that adds 2 filters, one with skip-sw and the other with skip-hw
flag.

---
    # add ingress qdisc
    tc qdisc add dev p4p1 ingress

    # enable hw tc offload.
    ethtool -K p4p1 hw-tc-offload on

    # add u32 filter with skip-sw flag.
    tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
       handle 800:0:1 u32 ht 800: flowid 800:1 \
       skip-sw \
       match ip src 192.168.1.0/24 \
       action drop

    # add u32 filter with skip-hw flag.
    tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
       handle 800:0:2 u32 ht 800: flowid 800:2 \
       skip-hw \
       match ip src 192.168.2.0/24 \
       action drop
----

  reply	other threads:[~2018-09-10 17:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-09  1:31 [PATCH net 00/13] cls_u32 cleanups and fixes Al Viro
2018-09-09  1:31 ` [PATCH net 01/13] net: sched: cls_u32: fix hnode refcounting Al Viro
2018-09-09 11:37   ` Jamal Hadi Salim
2018-09-09 11:37     ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 02/13] net: sched: cls_u32: mark root hnode explicitly Al Viro
2018-09-09 11:39   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 03/13] net: sched: cls_u32: disallow linking to root hnode Al Viro
2018-09-09 11:39   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 04/13] net: sched: cls_u32: make sure that divisor is a power of 2 Al Viro
2018-09-09 11:41   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 05/13] net: sched: cls_u32: get rid of unused argument of u32_destroy_key() Al Viro
2018-09-09 11:41   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 06/13] net: sched: cls_u32: get rid of tc_u_knode ->tp Al Viro
2018-09-09 11:43   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 07/13] net: sched: cls_u32: get rid of tc_u_common ->rcu Al Viro
2018-09-09 11:45   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 08/13] net: sched: cls_u32: clean tc_u_common hashtable Al Viro
2018-09-09 11:47   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 09/13] net: sched: cls_u32: pass tc_u_common to u32_set_parms() instead of tc_u_hnode Al Viro
2018-09-09 11:52   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 10/13] net: sched: cls_u32: the tp_c argument of u32_set_parms() is always tp->data Al Viro
2018-09-09 12:48   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 11/13] net: sched: cls_u32: get rid of hnode ->tp_c and tp_c argument of u32_set_parms() Al Viro
2018-09-09 12:49   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 12/13] net: sched: cls_u32: keep track of knodes count in tc_u_common Al Viro
2018-09-09 12:50   ` Jamal Hadi Salim
2018-09-09  1:31 ` [PATCH net 13/13] net: sched: cls_u32: simplify the hell out u32_delete() emptiness check Al Viro
2018-09-09 12:51   ` Jamal Hadi Salim
2018-09-09 12:58 ` [PATCH net 00/13] cls_u32 cleanups and fixes Jamal Hadi Salim
2018-09-09 14:15   ` Al Viro
2018-09-09 15:48     ` Al Viro
2018-09-10 12:25       ` Jamal Hadi Salim [this message]
2018-09-10 12:31         ` Offloaded u32 classifier tables WAS (Re: " Jamal Hadi Salim
2018-09-10 11:30     ` Jamal Hadi Salim
2018-09-12  6:15 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c72ac9e-12d6-0244-d380-5803607c1dae@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=alexandre.torgue@st.com \
    --cc=amritha.nambiar@intel.com \
    --cc=anjali.singhai@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jiri@resnulli.us \
    --cc=kumaras@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.