DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [memnic PATCH 1/5] common: update memnic.h to support variable frame size
@ 2014-06-06 11:05 Hiroshi Shimamoto
  0 siblings, 0 replies; only message in thread
From: Hiroshi Shimamoto @ 2014-06-06 11:05 UTC (permalink / raw)
  To: dev; +Cc: Hayato Momma

From: Hiroshi Shimamoto <h-shimamoto@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@ct.jp.nec.com>
Reviewed-by: Hayato Momma <h-momma@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-06 11:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-06 11:05 [dpdk-dev] [memnic PATCH 1/5] common: update memnic.h to support variable frame size Hiroshi Shimamoto

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).