From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: brouer@redhat.com, netdev@vger.kernel.org,
oss-drivers@netronome.com, alexei.starovoitov@gmail.com,
daniel@iogearbox.net, bblanco@gmail.com
Subject: Re: [RFC 01/12] net: bpf: rename ndo_xdp to ndo_bpf
Date: Wed, 1 Nov 2017 08:41:42 +0100 [thread overview]
Message-ID: <20171101084142.5a5a9afc@redhat.com> (raw)
In-Reply-To: <20171101015217.10666-2-jakub.kicinski@netronome.com>
On Tue, 31 Oct 2017 18:52:06 -0700
Jakub Kicinski <jakub.kicinski@netronome.com> wrote:
> ndo_xdp is a control path callback for setting up XDP in the
> driver. We can reuse it for other forms of communication
> between the eBPF stack and the drivers. Rename the callback
> and associated structures and definitions.
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Simon Horman <simon.horman@netronome.com>
> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
> drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +-
> drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 2 +-
> drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 +--
> drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++--
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +--
> drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 ++--
> drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +--
> .../net/ethernet/netronome/nfp/nfp_net_common.c | 4 +--
> drivers/net/ethernet/qlogic/qede/qede.h | 2 +-
> drivers/net/ethernet/qlogic/qede/qede_filter.c | 2 +-
> drivers/net/ethernet/qlogic/qede/qede_main.c | 4 +--
> drivers/net/tun.c | 4 +--
> drivers/net/virtio_net.c | 4 +--
> include/linux/netdevice.h | 23 ++++++++-------
> net/core/dev.c | 34 +++++++++++-----------
> net/core/rtnetlink.c | 4 +--
> 17 files changed, 56 insertions(+), 55 deletions(-)
>
[...]
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 507977994a03..e5dcb25be398 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -10004,7 +10004,7 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
> return 0;
> }
>
> -static int ixgbe_xdp(struct net_device *dev, struct netdev_xdp *xdp)
> +static int ixgbe_xdp(struct net_device *dev, struct netdev_bpf *xdp)
> {
> struct ixgbe_adapter *adapter = netdev_priv(dev);
>
> @@ -10113,7 +10113,7 @@ static const struct net_device_ops ixgbe_netdev_ops = {
> .ndo_udp_tunnel_add = ixgbe_add_udp_tunnel_port,
> .ndo_udp_tunnel_del = ixgbe_del_udp_tunnel_port,
> .ndo_features_check = ixgbe_features_check,
> - .ndo_xdp = ixgbe_xdp,
> + .ndo_bpf = ixgbe_xdp,
> .ndo_xdp_xmit = ixgbe_xdp_xmit,
> .ndo_xdp_flush = ixgbe_xdp_flush,
> };
[...]
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index fc059f193e7d..edf984406ba0 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -2115,7 +2115,7 @@ static const struct net_device_ops virtnet_netdev = {
> #ifdef CONFIG_NET_POLL_CONTROLLER
> .ndo_poll_controller = virtnet_netpoll,
> #endif
> - .ndo_xdp = virtnet_xdp,
> + .ndo_bpf = virtnet_xdp,
> .ndo_xdp_xmit = virtnet_xdp_xmit,
> .ndo_xdp_flush = virtnet_xdp_flush,
> .ndo_features_check = passthru_features_check,
Sorry, but I don't understand why this rename is needed.
Are you going to add another type than BPF_PROG_TYPE_XDP?
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2017-11-01 7:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 1:52 [RFC 00/12] bpf: add offload as a first class citizen Jakub Kicinski
2017-11-01 1:52 ` [RFC 01/12] net: bpf: rename ndo_xdp to ndo_bpf Jakub Kicinski
2017-11-01 7:41 ` Jesper Dangaard Brouer [this message]
2017-11-01 16:00 ` Jakub Kicinski
2017-11-01 1:52 ` [RFC 02/12] bpf: offload: add infrastructure for loading programs for a specific netdev Jakub Kicinski
2017-11-01 5:23 ` Alexei Starovoitov
2017-11-01 6:04 ` Jakub Kicinski
2017-11-01 1:52 ` [RFC 03/12] bpf: report offload info to user space Jakub Kicinski
2017-11-01 1:52 ` [RFC 04/12] bpftool: print program device bound info Jakub Kicinski
2017-11-01 1:52 ` [RFC 05/12] xdp: allow attaching programs loaded for specific device Jakub Kicinski
2017-11-01 1:52 ` [RFC 06/12] cls_bpf: " Jakub Kicinski
2017-11-01 1:52 ` [RFC 07/12] nfp: bpf: drop support for cls_bpf with legacy actions Jakub Kicinski
2017-11-01 1:52 ` [RFC 08/12] nfp: bpf: refactor offload logic Jakub Kicinski
2017-11-01 1:52 ` [RFC 09/12] nfp: bpf: require seamless reload for program replace Jakub Kicinski
2017-11-01 1:52 ` [RFC 10/12] nfp: bpf: remove the register renumbering leftovers Jakub Kicinski
2017-11-01 1:52 ` [RFC 11/12] nfp: bpf: move to new BPF program offload infrastructure Jakub Kicinski
2017-11-01 1:52 ` [RFC 12/12] bpf: remove old offload/analyzer 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=20171101084142.5a5a9afc@redhat.com \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bblanco@gmail.com \
--cc=daniel@iogearbox.net \
--cc=jakub.kicinski@netronome.com \
--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).