From: Toshiaki Makita <toshiaki.makita1@gmail.com>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>
Cc: "Toshiaki Makita" <toshiaki.makita1@gmail.com>,
netdev@vger.kernel.org, xdp-newbies@vger.kernel.org,
bpf@vger.kernel.org, "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Jason Wang" <jasowang@redhat.com>
Subject: [PATCH v2 bpf-next 1/2] xdp: Add tracepoint for bulk XDP_TX
Date: Wed, 5 Jun 2019 14:36:12 +0900 [thread overview]
Message-ID: <20190605053613.22888-2-toshiaki.makita1@gmail.com> (raw)
In-Reply-To: <20190605053613.22888-1-toshiaki.makita1@gmail.com>
This is introduced for admins to check what is happening on XDP_TX when
bulk XDP_TX is in use, which will be first introduced in veth in next
commit.
Signed-off-by: Toshiaki Makita <toshiaki.makita1@gmail.com>
---
include/trace/events/xdp.h | 25 +++++++++++++++++++++++++
kernel/bpf/core.c | 1 +
2 files changed, 26 insertions(+)
diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
index e95cb86..e06ea65 100644
--- a/include/trace/events/xdp.h
+++ b/include/trace/events/xdp.h
@@ -50,6 +50,31 @@
__entry->ifindex)
);
+TRACE_EVENT(xdp_bulk_tx,
+
+ TP_PROTO(const struct net_device *dev,
+ int sent, int drops, int err),
+
+ TP_ARGS(dev, sent, drops, err),
+
+ TP_STRUCT__entry(
+ __field(int, ifindex)
+ __field(int, drops)
+ __field(int, sent)
+ __field(int, err)
+ ),
+
+ TP_fast_assign(
+ __entry->ifindex = dev->ifindex;
+ __entry->drops = drops;
+ __entry->sent = sent;
+ __entry->err = err;
+ ),
+
+ TP_printk("ifindex=%d sent=%d drops=%d err=%d",
+ __entry->ifindex, __entry->sent, __entry->drops, __entry->err)
+);
+
DECLARE_EVENT_CLASS(xdp_redirect_template,
TP_PROTO(const struct net_device *dev,
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 33fb292..3a3f4af 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -2106,3 +2106,4 @@ int __weak skb_copy_bits(const struct sk_buff *skb, int offset, void *to,
#include <linux/bpf_trace.h>
EXPORT_TRACEPOINT_SYMBOL_GPL(xdp_exception);
+EXPORT_TRACEPOINT_SYMBOL_GPL(xdp_bulk_tx);
--
1.8.3.1
next prev parent reply other threads:[~2019-06-05 5:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 5:36 [PATCH v2 bpf-next 0/2] veth: Bulk XDP_TX Toshiaki Makita
2019-06-05 5:36 ` Toshiaki Makita [this message]
2019-06-05 7:59 ` [PATCH v2 bpf-next 1/2] xdp: Add tracepoint for bulk XDP_TX Jesper Dangaard Brouer
2019-06-06 11:04 ` Toshiaki Makita
2019-06-06 19:41 ` Jesper Dangaard Brouer
2019-06-07 2:22 ` Toshiaki Makita
2019-06-07 9:32 ` Jesper Dangaard Brouer
2019-06-10 11:41 ` Toshiaki Makita
2019-06-05 5:36 ` [PATCH v2 bpf-next 2/2] veth: Support " Toshiaki Makita
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=20190605053613.22888-2-toshiaki.makita1@gmail.com \
--to=toshiaki.makita1@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=jakub.kicinski@netronome.com \
--cc=jasowang@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.com \
--cc=xdp-newbies@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;
as well as URLs for NNTP newsgroup(s).