mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 23:30:18 +01:00
dcb: turn off all DCB features when disabling DCB
Don't just disable DCB, but turn off the features too.
This commit is contained in:
parent
32670b5264
commit
ebc06a0015
2 changed files with 27 additions and 3 deletions
22
src/nm-dcb.c
22
src/nm-dcb.c
|
|
@ -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",
|
||||
NULL
|
||||
};
|
||||
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;
|
||||
iter++;
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
NULL },
|
||||
};
|
||||
GError *error = NULL;
|
||||
gboolean success;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue