Re: [PATCHv2 net-next 2/3] bonding: use correct return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 18, 2024 at 12:46:18AM +0000, Hangbin Liu wrote:
> On Thu, Oct 17, 2024 at 04:47:19PM +0200, Toke Høiland-Jørgensen wrote:
> > > diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> > > index f0f76b6ac8be..6887a867fe8b 100644
> > > --- a/drivers/net/bonding/bond_main.c
> > > +++ b/drivers/net/bonding/bond_main.c
> > > @@ -5699,7 +5699,7 @@ static int bond_xdp_set(struct net_device *dev, struct bpf_prog *prog,
> > >  		if (dev_xdp_prog_count(slave_dev) > 0) {
> > >  			SLAVE_NL_ERR(dev, slave_dev, extack,
> > >  				     "Slave has XDP program loaded, please unload before enslaving");
> > > -			err = -EOPNOTSUPP;
> > > +			err = -EEXIST;
> > 
> > Hmm, this has been UAPI since kernel 5.15, so can we really change it
> > now? What's the purpose of changing it, anyway?
> 
> I just think it should return EXIST when the error is "Slave has XDP program
> loaded". No special reason. If all others think we should not change it, I
> can drop this patch.

Hi Toke,

Could you add some colour to what extent user's might rely on this error code?

Basically I think that if they do then we shouldn't change this.




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux