From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: davem@davemloft.net, jiri@resnulli.us
Cc: dsahern@gmail.com, netdev@vger.kernel.org,
oss-drivers@netronome.com,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next 0/8] use tc_cls_can_offload_and_chain0() throughout the drivers
Date: Wed, 24 Jan 2018 16:17:45 -0800 [thread overview]
Message-ID: <20180125001753.30408-1-jakub.kicinski@netronome.com> (raw)
Hi!
This set makes most drivers use a new tc_cls_can_offload_and_chain0()
helper which will set extack in case TC hw offload flag is disabled.
i40e patch will follow after net -> net-next merge.
I chose to keep the new helper which also looks at the chain but
renamed it more appropriately. The rationale being that most drivers
don't accept chains other than 0 and since we have to pass extack
to the helper we can as well pass the entire struct tc_cls_common_offload
and perform the most common checks. Jiri, please let me know if that's
acceptable for you.
This code makes the assumption that type_data in the callback can
be interpreted as struct tc_cls_common_offload, i.e. the real offload
structure has common part as the first member. This allows us to
make the check once for all classifier types if driver supports
more than one. This also means I've dropped the last patch of
the RFC (preventing use of common before type validation in nfp).
Jakub Kicinski (8):
pkt_cls: add new tc cls helper to check offload flag and chain index
bnxt: use tc_cls_can_offload_and_chain0()
nfp: flower: use tc_cls_can_offload_and_chain0()
cxgb4: use tc_cls_can_offload_and_chain0()
ixgbe: use tc_cls_can_offload_and_chain0()
mlx5: use tc_cls_can_offload_and_chain0()
mlxsw: use tc_cls_can_offload_and_chain0()
selftests/bpf: check for spurious extacks from the driver
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++-
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 3 ---
drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 3 ++-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 +------
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +---
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5 +---
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++---
drivers/net/ethernet/netronome/nfp/bpf/main.c | 4 +---
.../net/ethernet/netronome/nfp/flower/offload.c | 7 +++---
drivers/net/netdevsim/bpf.c | 5 +---
include/net/pkt_cls.h | 12 ++++++++++
tools/testing/selftests/bpf/test_offload.py | 27 ++++++++++++++++++++++
13 files changed, 54 insertions(+), 39 deletions(-)
--
2.15.1
next reply other threads:[~2018-01-25 0:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-25 0:17 Jakub Kicinski [this message]
2018-01-25 0:17 ` [PATCH net-next 1/8] pkt_cls: add new tc cls helper to check offload flag and chain index Jakub Kicinski
2018-01-25 8:03 ` Jiri Pirko
2018-01-25 19:26 ` Jakub Kicinski
2018-01-25 15:41 ` Marcelo Ricardo Leitner
2018-01-25 19:25 ` Jakub Kicinski
2018-01-25 0:17 ` [PATCH net-next 2/8] cxgb4: use tc_cls_can_offload_and_chain0() Jakub Kicinski
2018-01-25 0:17 ` [PATCH net-next 3/8] mlx5: " Jakub Kicinski
2018-01-25 14:12 ` Or Gerlitz
2018-01-25 0:17 ` [PATCH net-next 4/8] bnxt: " Jakub Kicinski
2018-01-25 0:17 ` [PATCH net-next 5/8] nfp: flower: " Jakub Kicinski
2018-01-25 0:17 ` [PATCH net-next 6/8] ixgbe: " Jakub Kicinski
2018-01-25 0:17 ` [PATCH net-next 7/8] mlxsw: " Jakub Kicinski
2018-01-25 0:17 ` [PATCH net-next 8/8] selftests/bpf: check for spurious extacks from the driver Jakub Kicinski
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=20180125001753.30408-1-jakub.kicinski@netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@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).