From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org
Cc: Daniel Borkmann <borkmann@iogearbox.net>,
Jesper Dangaard Brouer <brouer@redhat.com>
Subject: [V3 PATCH net-next 1/5] xdp: remove bpf_warn_invalid_xdp_redirect
Date: Thu, 24 Aug 2017 12:33:03 +0200 [thread overview]
Message-ID: <150357078339.26663.1700540432902545688.stgit@firesoul> (raw)
In-Reply-To: <150357074701.26663.4047992776649697788.stgit@firesoul>
Given there is a tracepoint that can track the error code
of xdp_do_redirect calls, the WARN_ONCE in bpf_warn_invalid_xdp_redirect
doesn't seem relevant any longer. Simply remove the function.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
---
net/core/filter.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/net/core/filter.c b/net/core/filter.c
index 2a0d762a20d8..a5e5f31b41b9 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2476,7 +2476,6 @@ static int __bpf_tx_xdp(struct net_device *dev,
int err;
if (!dev->netdev_ops->ndo_xdp_xmit) {
- bpf_warn_invalid_xdp_redirect(dev->ifindex);
return -EOPNOTSUPP;
}
@@ -2543,7 +2542,6 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp,
fwd = dev_get_by_index_rcu(dev_net(dev), index);
ri->ifindex = 0;
if (unlikely(!fwd)) {
- bpf_warn_invalid_xdp_redirect(index);
err = -EINVAL;
goto out;
}
@@ -2564,7 +2562,6 @@ int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb)
dev = dev_get_by_index_rcu(dev_net(dev), index);
ri->ifindex = 0;
if (unlikely(!dev)) {
- bpf_warn_invalid_xdp_redirect(index);
return -EINVAL;
}
@@ -3565,11 +3562,6 @@ void bpf_warn_invalid_xdp_action(u32 act)
}
EXPORT_SYMBOL_GPL(bpf_warn_invalid_xdp_action);
-void bpf_warn_invalid_xdp_redirect(u32 ifindex)
-{
- WARN_ONCE(1, "Illegal XDP redirect to unsupported device ifindex(%i)\n", ifindex);
-}
-
static bool __is_valid_sock_ops_access(int off, int size)
{
if (off < 0 || off >= sizeof(struct bpf_sock_ops))
next prev parent reply other threads:[~2017-08-24 10:33 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 20:47 [PATCH net-next 0/5] xdp: more work on xdp tracepoints Jesper Dangaard Brouer
2017-08-22 20:47 ` [PATCH net-next 1/5] xdp: remove bpf_warn_invalid_xdp_redirect Jesper Dangaard Brouer
2017-08-22 21:19 ` Daniel Borkmann
2017-08-22 20:47 ` [PATCH net-next 2/5] xdp: make generic xdp redirect use tracepoint trace_xdp_redirect Jesper Dangaard Brouer
2017-08-22 21:21 ` Daniel Borkmann
2017-08-22 20:47 ` [PATCH net-next 3/5] ixgbe: use return codes from ndo_xdp_xmit that are distinguishable Jesper Dangaard Brouer
2017-08-22 21:21 ` Daniel Borkmann
2017-08-22 20:47 ` [PATCH net-next 4/5] xdp: remove net_device names from xdp_redirect tracepoint Jesper Dangaard Brouer
2017-08-22 21:23 ` Daniel Borkmann
2017-08-22 20:47 ` [PATCH net-next 5/5] xdp: get tracepoints xdp_exception and xdp_redirect in sync Jesper Dangaard Brouer
2017-08-22 21:30 ` Daniel Borkmann
2017-08-23 7:41 ` Jesper Dangaard Brouer
2017-08-23 8:54 ` Daniel Borkmann
2017-08-23 10:15 ` [V2 PATCH net-next 0/5] xdp: more work on xdp tracepoints Jesper Dangaard Brouer
2017-08-23 10:15 ` [V2 PATCH net-next 1/5] xdp: remove bpf_warn_invalid_xdp_redirect Jesper Dangaard Brouer
2017-08-23 10:15 ` [V2 PATCH net-next 2/5] xdp: make generic xdp redirect use tracepoint trace_xdp_redirect Jesper Dangaard Brouer
2017-08-23 10:15 ` [V2 PATCH net-next 3/5] ixgbe: use return codes from ndo_xdp_xmit that are distinguishable Jesper Dangaard Brouer
2017-08-23 10:15 ` [V2 PATCH net-next 4/5] xdp: remove net_device names from xdp_redirect tracepoint Jesper Dangaard Brouer
2017-08-23 10:58 ` Daniel Borkmann
2017-08-23 10:15 ` [V2 PATCH net-next 5/5] xdp: get tracepoints xdp_exception and xdp_redirect in sync Jesper Dangaard Brouer
2017-08-23 10:59 ` Daniel Borkmann
2017-08-23 11:16 ` [V2 PATCH net-next 0/5] xdp: more work on xdp tracepoints Jesper Dangaard Brouer
2017-08-24 0:07 ` David Miller
2017-08-24 10:32 ` [V3 " Jesper Dangaard Brouer
2017-08-24 10:33 ` Jesper Dangaard Brouer [this message]
2017-08-24 10:33 ` [V3 PATCH net-next 2/5] xdp: make generic xdp redirect use tracepoint trace_xdp_redirect Jesper Dangaard Brouer
2017-08-24 10:33 ` [V3 PATCH net-next 3/5] ixgbe: use return codes from ndo_xdp_xmit that are distinguishable Jesper Dangaard Brouer
2017-08-24 10:33 ` [V3 PATCH net-next 4/5] xdp: remove net_device names from xdp_redirect tracepoint Jesper Dangaard Brouer
2017-08-24 10:33 ` [V3 PATCH net-next 5/5] xdp: get tracepoints xdp_exception and xdp_redirect in sync Jesper Dangaard Brouer
2017-08-24 14:46 ` [V3 PATCH net-next 0/5] xdp: more work on xdp tracepoints John Fastabend
2017-08-24 19:00 ` 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=150357078339.26663.1700540432902545688.stgit@firesoul \
--to=brouer@redhat.com \
--cc=borkmann@iogearbox.net \
--cc=netdev@vger.kernel.org \
/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