diff mbox series

[iproute2,1/3] dcb: Set values with RTM_SETDCB type

Message ID 61a95beac0ea7f2979ffd5ba5f4a08f000cc091a.1609543363.git.me@pmachata.org (mailing list archive)
State Superseded
Delegated to: David Ahern
Headers show
Series dcb: Fixes | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Petr Machata Jan. 1, 2021, 11:25 p.m. UTC
dcb currently sends all netlink messages with a type RTM_GETDCB, even the
set ones. Change to the appropriate type.

Signed-off-by: Petr Machata <me@pmachata.org>
---
 dcb/dcb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Hemminger Jan. 2, 2021, 5:34 p.m. UTC | #1
On Sat,  2 Jan 2021 00:25:50 +0100
Petr Machata <me@pmachata.org> wrote:

> dcb currently sends all netlink messages with a type RTM_GETDCB, even the
> set ones. Change to the appropriate type.
> 
> Signed-off-by: Petr Machata <me@pmachata.org>
> ---
>  dcb/dcb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dcb/dcb.c b/dcb/dcb.c
> index adec57476e1d..f5c62790e27e 100644
> --- a/dcb/dcb.c
> +++ b/dcb/dcb.c
> @@ -177,7 +177,7 @@ int dcb_set_attribute(struct dcb *dcb, const char *dev, int attr, const void *da
>  	struct nlattr *nest;
>  	int ret;
>  
> -	nlh = dcb_prepare(dcb, dev, RTM_GETDCB, DCB_CMD_IEEE_SET);
> +	nlh = dcb_prepare(dcb, dev, RTM_SETDCB, DCB_CMD_IEEE_SET);
>  
>  	nest = mnl_attr_nest_start(nlh, DCB_ATTR_IEEE);
>  	mnl_attr_put(nlh, attr, data_len, data);

Should I add fixes tag to this?
Petr Machata Jan. 3, 2021, 10:47 a.m. UTC | #2
Stephen Hemminger <stephen@networkplumber.org> writes:

> On Sat,  2 Jan 2021 00:25:50 +0100
> Petr Machata <me@pmachata.org> wrote:
>
>> dcb currently sends all netlink messages with a type RTM_GETDCB, even the
>> set ones. Change to the appropriate type.
>> 
>> Signed-off-by: Petr Machata <me@pmachata.org>
>> ---
>>  dcb/dcb.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/dcb/dcb.c b/dcb/dcb.c
>> index adec57476e1d..f5c62790e27e 100644
>> --- a/dcb/dcb.c
>> +++ b/dcb/dcb.c
>> @@ -177,7 +177,7 @@ int dcb_set_attribute(struct dcb *dcb, const char *dev, int attr, const void *da
>>  	struct nlattr *nest;
>>  	int ret;
>>  
>> -	nlh = dcb_prepare(dcb, dev, RTM_GETDCB, DCB_CMD_IEEE_SET);
>> +	nlh = dcb_prepare(dcb, dev, RTM_SETDCB, DCB_CMD_IEEE_SET);
>>  
>>  	nest = mnl_attr_nest_start(nlh, DCB_ATTR_IEEE);
>>  	mnl_attr_put(nlh, attr, data_len, data);
>
> Should I add fixes tag to this?

Ha, I forgot that Fixes: tags are a thing in iproute2. Sorry about that,
I'll resend.
Stephen Hemminger Jan. 3, 2021, 6:22 p.m. UTC | #3
On Sun, 03 Jan 2021 11:47:46 +0100
Petr Machata <me@pmachata.org> wrote:

> Stephen Hemminger <stephen@networkplumber.org> writes:
> 
> > On Sat,  2 Jan 2021 00:25:50 +0100
> > Petr Machata <me@pmachata.org> wrote:
> >  
> >> dcb currently sends all netlink messages with a type RTM_GETDCB, even the
> >> set ones. Change to the appropriate type.
> >> 
> >> Signed-off-by: Petr Machata <me@pmachata.org>
> >> ---
> >>  dcb/dcb.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/dcb/dcb.c b/dcb/dcb.c
> >> index adec57476e1d..f5c62790e27e 100644
> >> --- a/dcb/dcb.c
> >> +++ b/dcb/dcb.c
> >> @@ -177,7 +177,7 @@ int dcb_set_attribute(struct dcb *dcb, const char *dev, int attr, const void *da
> >>  	struct nlattr *nest;
> >>  	int ret;
> >>  
> >> -	nlh = dcb_prepare(dcb, dev, RTM_GETDCB, DCB_CMD_IEEE_SET);
> >> +	nlh = dcb_prepare(dcb, dev, RTM_SETDCB, DCB_CMD_IEEE_SET);
> >>  
> >>  	nest = mnl_attr_nest_start(nlh, DCB_ATTR_IEEE);
> >>  	mnl_attr_put(nlh, attr, data_len, data);  
> >
> > Should I add fixes tag to this?  
> 
> Ha, I forgot that Fixes: tags are a thing in iproute2. Sorry about that,
> I'll resend.

Thanks, Fixes are mainly to help out distribution maintainers who want
to backport to older versions.
diff mbox series

Patch

diff --git a/dcb/dcb.c b/dcb/dcb.c
index adec57476e1d..f5c62790e27e 100644
--- a/dcb/dcb.c
+++ b/dcb/dcb.c
@@ -177,7 +177,7 @@  int dcb_set_attribute(struct dcb *dcb, const char *dev, int attr, const void *da
 	struct nlattr *nest;
 	int ret;
 
-	nlh = dcb_prepare(dcb, dev, RTM_GETDCB, DCB_CMD_IEEE_SET);
+	nlh = dcb_prepare(dcb, dev, RTM_SETDCB, DCB_CMD_IEEE_SET);
 
 	nest = mnl_attr_nest_start(nlh, DCB_ATTR_IEEE);
 	mnl_attr_put(nlh, attr, data_len, data);