All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: jiri@resnulli.us, daniel@iogearbox.net, simon.horman@netronome.com
Cc: netdev@vger.kernel.org, alexei.starovoitov@gmail.com,
	davem@davemloft.net, jhs@mojatatu.com
Subject: Re: [net-next PATCH v2 0/3] tc software only flag
Date: Thu, 25 Feb 2016 15:24:33 -0800	[thread overview]
Message-ID: <56CF8D31.3070307@gmail.com> (raw)
In-Reply-To: <20160225231540.9820.7688.stgit@john-Precision-Tower-5810>

On 16-02-25 03:19 PM, John Fastabend wrote:
> This adds a software only flag to tc but incorporates a bunch of comments
> from the original attempt at this.

In case its not entirely obvious I dropped the hardware only case for
now because I'm investigating Jiri's comment. But just having the
software only case lets me handle many use cases. Now in the u32
classifier I can build graphs where part of the graph is software only
and other parts are sw/hw. This lets me use part of the mark bit or
queue information to learn if the hardware has already acted on the
skb and then parse it differently in the classifier.

> 
> First instead of having the offload decision logic be embedded in cls_u32
> I lifted into cls_pkt.h so it can be used anywhere.
> 
> In order to do this I put the flag defines in pkt_cls.h as well. However
> it was suggested that perhaps these flags could be lifted into the
> upper layer of TCA_ as well but I'm afraid this can not be done with
> existing tc design as far as I can tell. The problem is the filters are
> packed and unpacked in the classifier specific code and pushing the flags
> through the high level doesn't seem easily doable. And we already have
> this design where classifiers handle generic options such as actions and
> policers. So I think adding one more thing here is OK as 'tc', et. al.
> already know how to handle this type of thing.
> 
> Thanks,
> .John
> 
> ---
> 
> John Fastabend (3):
>       net: sched: consolidate offload decision in cls_u32
>       net: cls_u32: move TC offload feature bit into cls_u32 offload logic
>       net: sched: cls_u32 add bit to specify software only rules
> 
> 
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    3 --
>  include/net/pkt_cls.h                         |   17 +++++++++++
>  include/uapi/linux/pkt_cls.h                  |    1 +
>  net/sched/cls_u32.c                           |   37 ++++++++++++++++++-------
>  4 files changed, 45 insertions(+), 13 deletions(-)
> 
> --
> Signature
> 

      parent reply	other threads:[~2016-02-25 23:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 23:19 [net-next PATCH v2 0/3] tc software only flag John Fastabend
2016-02-25 23:19 ` [net-next PATCH v2 1/3] net: sched: consolidate offload decision in cls_u32 John Fastabend
2016-02-25 23:20 ` [net-next PATCH v2 2/3] net: cls_u32: move TC offload feature bit into cls_u32 offload logic John Fastabend
2016-02-25 23:20 ` [net-next PATCH v2 3/3] net: sched: cls_u32 add bit to specify software only rules John Fastabend
2016-02-26  7:02   ` Samudrala, Sridhar
2016-02-26  7:21     ` John Fastabend
2016-02-26 10:29   ` Jiri Pirko
2016-02-26 14:29     ` John Fastabend
2016-02-25 23:24 ` John Fastabend [this message]

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=56CF8D31.3070307@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=simon.horman@netronome.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.