Commit ebc06a00 authored by Dan Williams's avatar Dan Williams
Browse files

dcb: turn off all DCB features when disabling DCB

Don't just disable DCB, but turn off the features too.
parent 32670b52
......@@ -228,8 +228,26 @@ _dcb_cleanup (const char *iface,
gpointer user_data,
GError **error)
/* FIXME: do we need to turn off features individually here? */
return do_helper (iface, DCBTOOL, run_func, user_data, error, "dcb off");
const char *cmds[] = {
"dcb off",
"app:fcoe e:0",
"app:iscsi e:0",
"app:fip e:0",
"pfc e:0",
"pg e:0",
const char **iter = cmds;
gboolean success = TRUE;
/* Turn everything off and return first error we get (if any) */
while (iter && *iter) {
if (!do_helper (iface, DCBTOOL, run_func, user_data, success ? error : NULL, *iter))
success = FALSE;
return success;
......@@ -268,7 +268,13 @@ static void
test_dcb_cleanup (void)
static DcbExpected expected = { 0,
{ "dcbtool sc eth0 dcb off", NULL },
{ "dcbtool sc eth0 dcb off",
"dcbtool sc eth0 app:fcoe e:0",
"dcbtool sc eth0 app:iscsi e:0",
"dcbtool sc eth0 app:fip e:0",
"dcbtool sc eth0 pfc e:0",
"dcbtool sc eth0 pg e:0",
GError *error = NULL;
gboolean success;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment