[Open-FCoE] [PATCH 04/11] Remove extraneous dcb members from the network interface structure.

Eric Multanen eric.w.multanen at intel.com
Sat Dec 5 00:52:15 UTC 2009


Delete members in the network interface structure used to hold dcb
information which are not used for any purpose.

Signed-off-by:  Eric Multanen <eric.w.multanen at intel.com>
---

 fcoemon.c |   36 ------------------------------------
 fcoemon.h |    1 -
 2 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/fcoemon.c b/fcoemon.c
index 8be3381..000e7a6 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -95,8 +95,6 @@ struct fcoe_port_config {
 	char ifname[IFNAMSIZ];
 	int fcoe_enable;
 	int dcb_required;
-	int dcb_app_0_enable;
-	int dcb_app_0_willing;
 };
 
 enum fcoeadm_action {
@@ -321,8 +319,6 @@ static int fcm_read_config_files(void)
 		/* if not found, default to "no" */
 		if (!strncasecmp(val, "yes", 3) && rc == 1) {
 			curr->dcb_required = 1;
-			curr->dcb_app_0_enable = DCB_APP_0_DEFAULT_ENABLE;
-			curr->dcb_app_0_willing = DCB_APP_0_DEFAULT_WILLING;
 		}
 
 		fclose(fp);
@@ -786,37 +782,6 @@ static struct fcm_fcoe *fcm_fcoe_lookup_name(char *name)
 	return ff;
 }
 
-static void fcm_fcoe_get_dcb_settings(struct fcm_fcoe *ff)
-{
-	struct fcoe_port_config *p;
-	struct fcm_vfcoe *fv;
-
-	if (ff->ff_mac == 0)
-		return;		/* loopback or other non-eligible interface */
-
-	/*
-	 * Get DCB config from file if possible.
-	 */
-	p = fcoe_config.port;
-	while (p) {
-		if (!strncmp(ff->ff_name, p->ifname, IFNAMSIZ)) {
-			ff->ff_app_info.enable = p->dcb_app_0_enable;
-			ff->ff_app_info.willing = p->dcb_app_0_willing;
-			break;
-		}
-
-		TAILQ_FOREACH(fv, &(ff->ff_vfcoe_head), fv_list) {
-			if (!strncmp(fv->fv_name, p->ifname, IFNAMSIZ)) {
-				ff->ff_app_info.enable = p->dcb_app_0_enable;
-				ff->ff_app_info.willing = p->dcb_app_0_willing;
-				break;
-			}
-		}
-
-		p = p->next;
-	}
-}
-
 static void fcm_fcoe_set_name(struct fcm_fcoe *ff, char *ifname)
 {
 	char *cp;
@@ -1918,7 +1883,6 @@ static void fcm_dcbd_port_advance(struct fcm_fcoe *ff)
 		fcm_dcbd_state_set(ff, FCD_GET_DCB_STATE);
 		/* Fall through */
 	case FCD_GET_DCB_STATE:
-		fcm_fcoe_get_dcb_settings(ff);
 		snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s",
 			 DCB_CMD, CLIF_RSP_VERSION,
 			 CMD_GET_CONFIG, FEATURE_DCB, 0,
diff --git a/fcoemon.h b/fcoemon.h
index 11cb4fb..ccc8129 100644
--- a/fcoemon.h
+++ b/fcoemon.h
@@ -156,7 +156,6 @@ static struct fcm_vfcoe *fcm_vfcoe_lookup_name(struct fcm_fcoe *, char *);
 static struct fcm_fcoe *fcm_fcoe_lookup_create_ifname(char *);
 static struct fcm_vfcoe *fcm_vfcoe_lookup_create_ifname(char *, char *);
 static void fcm_fcoe_set_name(struct fcm_fcoe *, char *);
-static void fcm_fcoe_get_dcb_settings(struct fcm_fcoe *);
 static int fcm_link_init(void);
 
 #endif /* _FCOEMON_H_ */




More information about the devel mailing list