netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Jakub Kicinski <jakub.kicinski@netronome.com>,
	Vlad Buslov <vladbu@mellanox.com>
Cc: David Miller <davem@davemloft.net>,
	Paul Blakey <paulb@mellanox.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jiri Pirko <jiri@resnulli.us>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Pravin Shelar <pshelar@ovn.org>,
	Simon Horman <simon.horman@netronome.com>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Or Gerlitz <gerlitz.or@gmail.com>
Subject: Re: CONFIG_NET_TC_SKB_EXT
Date: Sat, 21 Sep 2019 00:15:16 +0200	[thread overview]
Message-ID: <0e9a1701-356f-5f94-b88e-a39175dee77a@iogearbox.net> (raw)
In-Reply-To: <20190920091647.0129e65f@cakuba.netronome.com>

On 9/20/19 6:16 PM, Jakub Kicinski wrote:
> On Thu, 19 Sep 2019 15:13:55 +0000, Vlad Buslov wrote:
>> On Thu 19 Sep 2019 at 14:21, David Miller <davem@davemloft.net> wrote:
>>> As Linus pointed out, the Kconfig logic for CONFIG_NET_TC_SKB_EXT
>>> is really not acceptable.
>>>
>>> It should not be enabled by default at all.
>>>
>>> Instead the actual users should turn it on or depend upon it, which in
>>> this case seems to be OVS.
>>>
>>> Please fix this, thank you.
>>
>> Hi David,
>>
>> We are working on it, but Paul is OoO today. Is it okay if we send the
>> fix early next week?
> 
> Doesn't really seem like we have too many ways forward here, right?
> 
> How about this?
> 
> ------>8-----------------------------------
> 
> net: hide NET_TC_SKB_EXT as a config option
> 
> Linus points out the NET_TC_SKB_EXT config option looks suspicious.
> Indeed, it should really be selected to ensure correct OvS operation
> if TC offload is used. Hopefully those who care about TC-only and
> OvS-only performance disable the other one at compilation time.
> 
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> ---
>   net/openvswitch/Kconfig |  1 +
>   net/sched/Kconfig       | 13 +++----------
>   2 files changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/net/openvswitch/Kconfig b/net/openvswitch/Kconfig
> index 22d7d5604b4c..bd407ea7c263 100644
> --- a/net/openvswitch/Kconfig
> +++ b/net/openvswitch/Kconfig
> @@ -15,6 +15,7 @@ config OPENVSWITCH
>   	select NET_MPLS_GSO
>   	select DST_CACHE
>   	select NET_NSH
> +	select NET_TC_SKB_EXT if NET_CLS_ACT
>   	---help---
>   	  Open vSwitch is a multilayer Ethernet switch targeted at virtualized
>   	  environments.  In addition to supporting a variety of features
> diff --git a/net/sched/Kconfig b/net/sched/Kconfig
> index b3faafeafab9..f1062ef55098 100644
> --- a/net/sched/Kconfig
> +++ b/net/sched/Kconfig
> @@ -719,6 +719,7 @@ config NET_EMATCH_IPT
>   config NET_CLS_ACT
>   	bool "Actions"
>   	select NET_CLS
> +	select NET_TC_SKB_EXT if OPENVSWITCH

But how would that make much of a difference :( Distros are still going to
enable all of this blindlessly. Given discussion in [0], could we just get
rid of this tasteless hack altogether which is for such a narrow use case
anyway?

I thought idea of stuffing things into skb extensions are only justified if
it's not enabled by default for everyone. :(

   [0] https://lore.kernel.org/netdev/CAHC9VhSz1_KA1tCJtNjwK26BOkGhKGbPT7v1O82mWPduvWwd4A@mail.gmail.com/T/#u

>   	---help---
>   	  Say Y here if you want to use traffic control actions. Actions
>   	  get attached to classifiers and are invoked after a successful
> @@ -964,18 +965,10 @@ config NET_IFE_SKBTCINDEX
>           depends on NET_ACT_IFE
>   
>   config NET_TC_SKB_EXT
> -	bool "TC recirculation support"
> -	depends on NET_CLS_ACT
> -	default y if NET_CLS_ACT
> +	bool
> +	depends on NET_CLS_ACT && OPENVSWITCH
>   	select SKB_EXTENSIONS
>   
> -	help
> -	  Say Y here to allow tc chain misses to continue in OvS datapath in
> -	  the correct recirc_id, and hardware chain misses to continue in
> -	  the correct chain in tc software datapath.
> -
> -	  Say N here if you won't be using tc<->ovs offload or tc chains offload.
> -
>   endif # NET_SCHED
>   
>   config NET_SCH_FIFO
> 


  reply	other threads:[~2019-09-20 22:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 11:21 CONFIG_NET_TC_SKB_EXT David Miller
2019-09-19 15:13 ` CONFIG_NET_TC_SKB_EXT Vlad Buslov
2019-09-20 16:16   ` CONFIG_NET_TC_SKB_EXT Jakub Kicinski
2019-09-20 22:15     ` Daniel Borkmann [this message]
2019-09-20 22:56       ` CONFIG_NET_TC_SKB_EXT Jakub Kicinski
2019-09-20 23:40         ` CONFIG_NET_TC_SKB_EXT Daniel Borkmann
2019-09-21  0:06         ` CONFIG_NET_TC_SKB_EXT Daniel Borkmann
2019-09-22  3:18           ` CONFIG_NET_TC_SKB_EXT Pravin Shelar
2019-09-22  4:51             ` CONFIG_NET_TC_SKB_EXT Alexei Starovoitov
2019-09-22 11:51               ` CONFIG_NET_TC_SKB_EXT Paul Blakey
2019-09-22 21:47                 ` CONFIG_NET_TC_SKB_EXT Jakub Kicinski
2019-09-23 16:56                   ` CONFIG_NET_TC_SKB_EXT Paul Blakey
2019-09-23 17:17                     ` CONFIG_NET_TC_SKB_EXT Edward Cree
2019-09-24 11:48                       ` CONFIG_NET_TC_SKB_EXT Paul Blakey
2019-09-25 17:01                         ` CONFIG_NET_TC_SKB_EXT Edward Cree
2019-09-26  7:30                           ` CONFIG_NET_TC_SKB_EXT Paul Blakey
2019-09-26 13:09                             ` CONFIG_NET_TC_SKB_EXT Edward Cree
2019-09-26 13:56                               ` CONFIG_NET_TC_SKB_EXT Paul Blakey
2019-09-26 14:26                                 ` CONFIG_NET_TC_SKB_EXT Edward Cree
2019-09-26 15:14                                   ` CONFIG_NET_TC_SKB_EXT Paul Blakey
2019-09-26 17:02                                     ` CONFIG_NET_TC_SKB_EXT Edward Cree
2019-09-23 18:46                   ` CONFIG_NET_TC_SKB_EXT Marcelo Ricardo Leitner

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=0e9a1701-356f-5f94-b88e-a39175dee77a@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=gerlitz.or@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=paulb@mellanox.com \
    --cc=pshelar@ovn.org \
    --cc=simon.horman@netronome.com \
    --cc=vladbu@mellanox.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).