From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, kuba@kernel.org, subashab@codeaurora.org
Cc: evgreen@chromium.org, cpratapa@codeaurora.org,
bjorn.andersson@linaro.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next 1/2] if_rmnet.h: define struct rmnet_map_v5_csum_header
Date: Mon, 30 Nov 2020 18:41:42 -0600 [thread overview]
Message-ID: <20201201004143.27569-2-elder@linaro.org> (raw)
In-Reply-To: <20201201004143.27569-1-elder@linaro.org>
Define a new rmnet_map_v5_csum_header structure type. It will be
used for inline checksum offload, supported with version 5 of the
QMAP protocol.
Signed-off-by: Alex Elder <elder@linaro.org>
---
include/linux/if_rmnet.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/include/linux/if_rmnet.h b/include/linux/if_rmnet.h
index 9661416a9bb47..0fdda0e6e9963 100644
--- a/include/linux/if_rmnet.h
+++ b/include/linux/if_rmnet.h
@@ -52,4 +52,34 @@ struct rmnet_map_ul_csum_header {
#endif
} __aligned(1);
+
+/* Values for the header_type field of struct rmnet_map_v5_csum_header */
+enum rmnet_map_v5_header_type {
+ RMNET_MAP_HEADER_TYPE_UNKNOWN = 0x0,
+ RMNET_MAP_HEADER_TYPE_COALESCING = 0x1,
+ RMNET_MAP_HEADER_TYPE_CSUM_OFFLOAD = 0x2,
+};
+
+/* QMAP v5 checksum offload header */
+struct rmnet_map_v5_csum_header {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ u8 next_hdr:1;
+ u8 header_type:7;
+
+ u8 hw_reserved:5;
+ u8 priority:1;
+ u8 hw_reserved_bit:1;
+ u8 csum_valid_required:1;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ u8 header_type:7;
+ u8 next_hdr:1;
+
+ u8 csum_valid_required:1;
+ u8 hw_reserved_bit:1;
+ u8 priority:1;
+ u8 hw_reserved:5;
+#endif
+ __be16 reserved;
+};
+
#endif /* !(_LINUX_IF_RMNET_H_) */
--
2.20.1
next prev parent reply other threads:[~2020-12-01 0:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 0:41 [PATCH net-next 0/2] net: ipa: IPA v4.5 inline checksum offload Alex Elder
2020-12-01 0:41 ` Alex Elder [this message]
2020-12-01 0:41 ` [PATCH net-next 2/2] net: ipa: add support for " Alex Elder
2020-12-02 2:13 ` Jakub Kicinski
2020-12-02 13:24 ` Alex Elder
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=20201201004143.27569-2-elder@linaro.org \
--to=elder@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=cpratapa@codeaurora.org \
--cc=davem@davemloft.net \
--cc=evgreen@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.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).