lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201201004143.27569-2-elder@linaro.org>
Date:   Mon, 30 Nov 2020 18:41:42 -0600
From:   Alex Elder <elder@...aro.org>
To:     davem@...emloft.net, kuba@...nel.org, subashab@...eaurora.org
Cc:     evgreen@...omium.org, cpratapa@...eaurora.org,
        bjorn.andersson@...aro.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH net-next 1/2] if_rmnet.h: define struct rmnet_map_v5_csum_header

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@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ