Thread (76 messages) 76 messages, 5 authors, 2016-06-30
STALE3670d REVIEWED: 2 (0M)
Revisions (3)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current

[PATCH v3 15/20] vhost: remove unnecessary fields

From: Yuanhan Liu <hidden>
Date: 2016-06-07 03:51:48
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

The "reserved" field in virtio_net and vhost_virtqueue struct is not
necessary any more. We now expose virtio_net device with a number "vid".

This patch also removes the "priv" field: all fields are priviate now:
application can't access it now. The only way that we could still access
it is to expose it by a function, but I doubt that's needed or worthwhile.

Signed-off-by: Yuanhan Liu <redacted>
Tested-by: Rich Lane <redacted>
Acked-by: Rich Lane <redacted>
---
 lib/librte_vhost/vhost-net.h | 3 ---
 1 file changed, 3 deletions(-)
diff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_vhost/vhost-net.h
index 3edeb92..c133ea8 100644
--- a/lib/librte_vhost/vhost-net.h
+++ b/lib/librte_vhost/vhost-net.h
@@ -88,7 +88,6 @@ struct vhost_virtqueue {
 
 	/* Physical address of used ring, for logging */
 	uint64_t		log_guest_addr;
-	uint64_t		reserved[15];
 	struct buf_vector	buf_vec[BUF_VECTOR_MAX];
 } __rte_cache_aligned;
 
@@ -133,14 +132,12 @@ struct virtio_net {
 #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ)
 	char			ifname[IF_NAME_SZ];
 	uint32_t		virt_qp_nb;
-	void			*priv;
 	uint64_t		log_size;
 	uint64_t		log_base;
 	struct ether_addr	mac;
 
 	/* to tell if we need broadcast rarp packet */
 	rte_atomic16_t		broadcast_rarp;
-	uint64_t		reserved[61];
 	struct vhost_virtqueue	*virtqueue[VHOST_MAX_QUEUE_PAIRS * 2];
 } __rte_cache_aligned;
 
-- 
1.9.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help