This fixes a bug introduced with vlan support where fcoemon will disable the app feature after some error cases.
fcoemon clears the app config data when it goes into an error state. If fcoemon leaves the error state it queries the configuration data to see if the app feature should be enabled and then enables it if this is true. The search for this was not searching the vlan configurations. This resulted in the app config data not being set correctly. Also because this was used to set the app feature it caused fcoemon to disable the app feature completly. Signed-off-by: John Fastabend <[email protected]> --- fcoemon.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/fcoemon.c b/fcoemon.c index 12ca5d0..4d76243 100644 --- a/fcoemon.c +++ b/fcoemon.c @@ -802,6 +802,7 @@ static void fcm_fcoe_get_dcb_settings(struct fcm_fcoe *ff) fc_wwn_t wwpn; int vlan = ff->ff_vlan; struct fcoe_port_config *p; + struct fcm_vfcoe *fv; if (ff->ff_mac == 0) return; /* loopback or other non-eligible interface */ @@ -818,6 +819,15 @@ static void fcm_fcoe_get_dcb_settings(struct fcm_fcoe *ff) 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; } } @@ -1371,7 +1381,7 @@ static void update_saved_pfcup(struct fcm_fcoe *ff) } /* - * clear_dcbd_info - lear dcbd info to unknown values + * clear_dcbd_info - clear dcbd info to unknown values * */ static void clear_dcbd_info(struct fcm_fcoe *ff) _______________________________________________ devel mailing list [email protected] http://www.open-fcoe.org/mailman/listinfo/devel
