netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <kernel-team@fb.com>
Subject: [PATCH net-next 1/8] net: Add skb_inner_transport_offset function
Date: Mon, 14 Dec 2015 11:19:40 -0800	[thread overview]
Message-ID: <1450120787-1773171-2-git-send-email-tom@herbertland.com> (raw)
In-Reply-To: <1450120787-1773171-1-git-send-email-tom@herbertland.com>

Same thing as skb_transport_offset but returns the offset of the inner
transport header (when skb->encpasulation is set).

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 include/linux/skbuff.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 9b9b9ea..3f19744 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1939,6 +1939,11 @@ static inline unsigned char *skb_inner_transport_header(const struct sk_buff
 	return skb->head + skb->inner_transport_header;
 }
 
+static inline int skb_inner_transport_offset(const struct sk_buff *skb)
+{
+	return skb_inner_transport_header(skb) - skb->data;
+}
+
 static inline void skb_reset_inner_transport_header(struct sk_buff *skb)
 {
 	skb->inner_transport_header = skb->data - skb->head;
-- 
2.4.6

  reply	other threads:[~2015-12-14 19:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 19:19 [PATCH net-next 0/8] net: The beginning of the end for NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM Tom Herbert
2015-12-14 19:19 ` Tom Herbert [this message]
2015-12-14 19:19 ` [PATCH net-next 2/8] sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC Tom Herbert
2015-12-14 19:19 ` [PATCH net-next 3/8] fcoe: Use CHECKSUM_PARTIAL to indicate CRC offload Tom Herbert
2015-12-14 19:19 ` [PATCH net-next 4/8] net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK Tom Herbert
2015-12-14 19:19 ` [PATCH net-next 5/8] net: Eliminate NETIF_F_GEN_CSUM and NETIF_F_V[46]_CSUM Tom Herbert
2015-12-14 19:19 ` [PATCH net-next 6/8] tcp: Fix conditions to determine checksum offload Tom Herbert
2015-12-14 19:39   ` Eric Dumazet
2015-12-14 20:39     ` Tom Herbert
2015-12-14 19:19 ` [PATCH net-next 7/8] net: Add driver helper functions to determine checksum offloadability Tom Herbert
2015-12-14 19:19 ` [PATCH net-next 8/8] net: Elaborate on checksum offload interface description Tom Herbert
2015-12-15 21:32 ` [PATCH net-next 0/8] net: The beginning of the end for NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM David Miller
2015-12-15 22:11   ` Tom Herbert
2015-12-15 22:18     ` Tom Herbert
2015-12-16  2:07     ` 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=1450120787-1773171-2-git-send-email-tom@herbertland.com \
    --to=tom@herbertland.com \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --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;
as well as URLs for NNTP newsgroup(s).