Skip to contentSkip to conversation

enic: bug fix: make the set/get netlink VF_PORT support symmetrical

PATCH Applied Scott Feldman 2 participants 2 messages Jun 1, 2010 – Jun 2, 2010

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

PATCH 1/1 enic: bug fix: make the set/get netlink VF_PORT support symmetrical

From: Scott Feldman <[email protected]>

To make get/set netlink VF_PORT truly symmetrical, we need to keep track of what items are set and only return those items on get. Previously, the driver wasn't differentiating between a set of attr with a NULL string, for example, and not setting the attr at all. We only want to return the NULL string if the attr was actually set with a NULL string. Otherwise, don't return the attr.

---
 drivers/net/enic/enic.h      |    7 +
 drivers/net/enic/enic_main.c |  200 ++++++++++++++++++++----------------------
 2 files changed, 104 insertions(+), 103 deletions(-)
drivers/net/enic/enic.h +7 -0
index 85f2a2e..45e86d1 100644
@@ -74,7 +74,14 @@ struct enic_msix_entry {
 	void *devid;
 };
 
+#define ENIC_SET_APPLIED		(1 << 0)
+#define ENIC_SET_REQUEST		(1 << 1)
+#define ENIC_SET_NAME			(1 << 2)
+#define ENIC_SET_INSTANCE		(1 << 3)
+#define ENIC_SET_HOST			(1 << 4)
+
 struct enic_port_profile {
+	u32 set;
 	u8 request;
 	char name[PORT_PROFILE_MAX];
 	u8 instance_uuid[PORT_UUID_MAX];
drivers/net/enic/enic_main.c +97 -103

258 lines not on this page · raw message

maintainer Applied
#1 lore raw

From: Scott Feldman <[email protected]>
Date: Tue, 01 Jun 2010 11:59:33 -0700

Quoted 10 lines

From: Scott Feldman <[email protected]>

To make get/set netlink VF_PORT truly symmetrical, we need to keep track of what items are set and only return those items on get. Previously, the driver wasn't differentiating between a set of attr with a NULL string, for example, and not setting the attr at all. We only want to return the NULL string if the attr was actually set with a NULL string. Otherwise, don't return the attr.

Applied, thanks Scott.