All of lore.kernel.org
 help / color / mirror / Atom feed
From: Toshiaki Makita <toshiaki.makita1@gmail.com>
To: netdev@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH v5 bpf-next 1/9] net: Export skb_headers_offset_update
Date: Thu, 26 Jul 2018 23:40:24 +0900	[thread overview]
Message-ID: <20180726144032.2116-2-toshiaki.makita1@gmail.com> (raw)
In-Reply-To: <20180726144032.2116-1-toshiaki.makita1@gmail.com>

From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>

This is needed for veth XDP which does skb_copy_expand()-like operation.

v2:
- Drop skb_copy_header part because it has already been exported now.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
---
 include/linux/skbuff.h | 1 +
 net/core/skbuff.c      | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index fd3cb1b247df..f6929688853a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1035,6 +1035,7 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
 }
 
 struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
+void skb_headers_offset_update(struct sk_buff *skb, int off);
 int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask);
 struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t priority);
 void skb_copy_header(struct sk_buff *new, const struct sk_buff *old);
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 266b954f763e..f5670e6ab40c 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1291,7 +1291,7 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
 }
 EXPORT_SYMBOL(skb_clone);
 
-static void skb_headers_offset_update(struct sk_buff *skb, int off)
+void skb_headers_offset_update(struct sk_buff *skb, int off)
 {
 	/* Only adjust this if it actually is csum_start rather than csum */
 	if (skb->ip_summed == CHECKSUM_PARTIAL)
@@ -1305,6 +1305,7 @@ static void skb_headers_offset_update(struct sk_buff *skb, int off)
 	skb->inner_network_header += off;
 	skb->inner_mac_header += off;
 }
+EXPORT_SYMBOL(skb_headers_offset_update);
 
 void skb_copy_header(struct sk_buff *new, const struct sk_buff *old)
 {
-- 
2.14.3

  reply	other threads:[~2018-07-26 15:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26 14:40 [PATCH v5 bpf-next 0/9] veth: Driver XDP Toshiaki Makita
2018-07-26 14:40 ` Toshiaki Makita [this message]
2018-07-26 14:40 ` [PATCH v5 bpf-next 2/9] veth: Add driver XDP Toshiaki Makita
2018-07-27  3:02   ` John Fastabend
2018-07-27  4:55     ` Toshiaki Makita
2018-07-26 14:40 ` [PATCH v5 bpf-next 3/9] veth: Avoid drops by oversized packets when XDP is enabled Toshiaki Makita
2018-07-27  0:51   ` Jakub Kicinski
2018-07-27  1:06     ` Toshiaki Makita
2018-07-27  1:08       ` Jakub Kicinski
2018-07-26 14:40 ` [PATCH v5 bpf-next 4/9] veth: Handle xdp_frames in xdp napi ring Toshiaki Makita
2018-07-27  3:40   ` John Fastabend
2018-07-26 14:40 ` [PATCH v5 bpf-next 5/9] veth: Add ndo_xdp_xmit Toshiaki Makita
2018-07-27  3:54   ` John Fastabend
2018-07-26 14:40 ` [PATCH v5 bpf-next 6/9] bpf: Make redirect_info accessible from modules Toshiaki Makita
2018-07-29  7:06   ` kbuild test robot
2018-07-26 14:40 ` [PATCH v5 bpf-next 7/9] xdp: Helpers for disabling napi_direct of xdp_return_frame Toshiaki Makita
2018-07-30 12:33   ` Jesper Dangaard Brouer
2018-07-26 14:40 ` [PATCH v5 bpf-next 8/9] veth: Add XDP TX and REDIRECT Toshiaki Makita
2018-07-26 14:40 ` [PATCH v5 bpf-next 9/9] veth: Support per queue XDP ring 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=20180726144032.2116-2-toshiaki.makita1@gmail.com \
    --to=toshiaki.makita1@gmail.com \
    --cc=ast@kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=makita.toshiaki@lab.ntt.co.jp \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.