[dpdk-dev] [memnic PATCH 1/5] common: update memnic.h to support variable frame size

Hiroshi Shimamoto h-shimamoto at ct.jp.nec.com
Fri Jun 6 13:05:11 CEST 2014


From: Hiroshi Shimamoto <h-shimamoto at ct.jp.nec.com>

Update MEMNIC data structure in common header file.

Prepare to support extra features for MEMNIC.

Change name reserved to request which will be used to negotiate between
host and guest, and add feature flag and other definitions.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto at ct.jp.nec.com>
Reviewed-by: Hayato Momma <h-momma at ce.jp.nec.com>
---
 common/memnic.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/common/memnic.h b/common/memnic.h
index 84e941c..d5a651f 100644
--- a/common/memnic.h
+++ b/common/memnic.h
@@ -42,19 +42,24 @@
 #define MEMNIC_MAX_PACKET_SIZE	(4096)
 
 #define MEMNIC_MAX_FRAME_LEN	(1500 + 14 + 4) /* MTU + ether header + vlan */
+#define MEMNIC_MAX_JUMBO_FRAME_LEN	(MEMNIC_MAX_PACKET_SIZE - 8)
 
 struct memnic_header {
 	uint32_t magic;
 	uint32_t version;
 	uint32_t valid;
 	uint32_t reset;
-	uint32_t features;
-	uint32_t reserved;
+	uint32_t features;	/* features this MEMNIC provides */
+	uint32_t request;	/* requesting features from Guest */
 	union {
 		uint8_t mac_addr[6];
 		uint8_t dummy[8];
 	};
+	/* for extra features */
+	uint32_t framesz;
 };
+#define MEMNIC_FEAT_FRAME_SIZE	(0x00000001)
+#define MEMNIC_FEAT_ALL		(MEMNIC_FEAT_FRAME_SIZE)
 
 struct memnic_info {
 	uint32_t flags;
-- 
1.8.4



More information about the dev mailing list