netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: "Jiří Pírko" <jiri@resnulli.us>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	simon.horman@netronome.com,
	"Linux Kernel Network Developers" <netdev@vger.kernel.org>,
	"Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
	"David Miller" <davem@davemloft.net>,
	"Jamal Hadi Salim" <jhs@mojatatu.com>
Subject: Re: [net-next PATCH v3 1/3] net: sched: consolidate offload decision in cls_u32
Date: Fri, 26 Feb 2016 09:39:47 -0800	[thread overview]
Message-ID: <CAM_iQpVPa7Twx35K-VjR6X0DJ9wQuSeTrfFSZe8HWU_yJVj2UA@mail.gmail.com> (raw)
In-Reply-To: <20160226155349.5338.74615.stgit@john-Precision-Tower-5810>

On Fri, Feb 26, 2016 at 7:53 AM, John Fastabend
<john.fastabend@gmail.com> wrote:
> The offload decision was originally very basic and tied to if the dev
> implemented the appropriate ndo op hook. The next step is to allow
> the user to more flexibly define if any paticular rule should be
> offloaded or not. In order to have this logic in one function lift
> the current check into a helper routine tc_should_offload().
>
> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> ---
>  include/net/pkt_cls.h |    5 +++++
>  net/sched/cls_u32.c   |    8 ++++----
>  2 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
> index 2121df5..e64d20b 100644
> --- a/include/net/pkt_cls.h
> +++ b/include/net/pkt_cls.h
> @@ -392,4 +392,9 @@ struct tc_cls_u32_offload {
>         };
>  };
>
> +static inline bool tc_should_offload(struct net_device *dev)
> +{
> +       return dev->netdev_ops->ndo_setup_tc;
> +}
> +

These should be protected by CONFIG_NET_CLS_U32, no?

  parent reply	other threads:[~2016-02-26 17:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 15:53 [net-next PATCH v3 0/3] tc software only John Fastabend
2016-02-26 15:53 ` [net-next PATCH v3 1/3] net: sched: consolidate offload decision in cls_u32 John Fastabend
2016-02-26 15:55   ` Jiri Pirko
2016-02-26 17:39   ` Cong Wang [this message]
2016-02-27  4:24     ` John Fastabend
2016-02-28  4:28       ` Cong Wang
2016-02-29 18:40         ` John Fastabend
2016-02-29 18:58           ` Jiri Pirko
2016-02-29 21:25             ` Cong Wang
2016-02-29 23:40               ` John Fastabend
2016-02-26 15:54 ` [net-next PATCH v3 2/3] net: cls_u32: move TC offload feature bit into cls_u32 offload logic John Fastabend
2016-02-26 15:56   ` Jiri Pirko
2016-02-26 15:54 ` [net-next PATCH v3 3/3] net: sched: cls_u32 add bit to specify software only rules John Fastabend
2016-02-26 15:58   ` Jiri Pirko
2016-03-01 21:06 ` [net-next PATCH v3 0/3] tc software only 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=CAM_iQpVPa7Twx35K-VjR6X0DJ9wQuSeTrfFSZe8HWU_yJVj2UA@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --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 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).