Re: [PATCH v1] {net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function

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

 



> > > > >
> > > > >  	/*
> > > > >  	 * The zSeries OSA network cards can be shared among various
> > > > > @@ -128,11 +137,8 @@ static inline int addrconf_ifid_eui48(u8 *eui, struct net_device *dev)
> > > > >  	if (dev->dev_id) {
> > > > >  		eui[3] = (dev->dev_id >> 8) & 0xFF;
> > > > >  		eui[4] = dev->dev_id & 0xFF;
> > > > > -	} else {
> > > > > -		eui[3] = 0xFF;
> > > > > -		eui[4] = 0xFE;
> > > > > -		eui[0] ^= 2;
> > > >
> > > > Sorry, but NAK.
> > > > You missed the assignment below. In original code it WASN'T for dev->dev_id != NULL, and now it is.
> > >
> > > s/below/above
> >
> > I'm sorry but which assignment is missing? Default values for 0, 3 and 4
> > are set in genaddrconf_ifid_eui48 then override here in case dev->dev_id is
> > set.
> 
> Not really, in original code of addrconf_ifid_eui48(), the eui[0] is set
> conditionally to be "eui[0] ^= 2" or stays without change. In your
> proposed code, eui[0] will be always changed to be "eui[0] ^= 2".

Thanks!
I was confused by the "missing", you should have used "extra assignment" or
even "wrong extra assignment" in your first comment.

Appreciate if you can review v2 which will reset eui[0] to default if
dev_id is used.

> 
> 
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux