Skip to contentSkip to conversation

sunvnet: add VIO v1.7 and v1.8 support

PATCH In review David L Stevens 1 participant 1 message Dec 2, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/6 sunvnet: add VIO v1.7 and v1.8 support

This patch adds support for VIO v1.7 (extended descriptor format) and v1.8 (receive-side checksumming) to the sunvnet driver.

---
 arch/sparc/include/asm/vio.h       |   19 +++++++
 drivers/net/ethernet/sun/sunvnet.c |  102 ++++++++++++++++++++++++++++++++----
 2 files changed, 111 insertions(+), 10 deletions(-)
arch/sparc/include/asm/vio.h +19 -0
index d758c8d..fb124fe 100644
@@ -247,6 +247,25 @@ struct vio_net_desc {
 	struct ldc_trans_cookie	cookies[0];
 };
 
+struct vio_net_dext {
+	u8		flags;
+#define VNET_PKT_HASH			0x01
+#define	VNET_PKT_HCK_IPV4_HDRCKSUM	0x02
+#define	VNET_PKT_HCK_FULLCKSUM		0x04
+#define	VNET_PKT_IPV4_LSO		0x08
+#define	VNET_PKT_HCK_IPV4_HDRCKSUM_OK	0x10
+#define	VNET_PKT_HCK_FULLCKSUM_OK	0x20
+
+	u8		vnet_hashval;
+	u16		ipv4_lso_mss;
+	u32		resv3;
+};
+
+static inline struct vio_net_dext *vio_net_ext(struct vio_net_desc *desc)
+{
+	return (struct vio_net_dext *)&desc->cookies[2];
+}
+
 #define VIO_MAX_RING_COOKIES	24
 
 struct vio_dring_state {
drivers/net/ethernet/sun/sunvnet.c +92 -10

171 lines not on this page · raw message

Signature · 1 line
1.7.1