Re: [PATCH v2 09/10] net: lib: add ether_addr_inc() helper

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

 



On Thu, Oct 05, 2023 at 09:07:17AM +0200, Oleksij Rempel wrote:
> On Thu, Oct 05, 2023 at 08:48:46AM +0200, Ahmad Fatoum wrote:
> > >> +void ether_addr_inc(u8 *dst_addr, const u8 *src_addr, u32 increment)
> > >> +{
> > >> +	u32 value;
> > >> +	int i;
> > >> +
> > >> +	for(i = 0; i < 6; ++i)
> > >> +		dst_addr[i] = src_addr[i];
> > >> +
> > >> +	for(i = 5; i >= 0 && increment; --i) {
> > >> +		value = dst_addr[i] + increment;
> > >> +		dst_addr[i] = value & 0xFF;
> > >> +		increment = value >> 8;
> > >> +	}
> > >> +}
> > > 
> > > The Kernel already has eth_addr_add() and more helpers. How about
> > > adopting these instead?
> > 
> > I had copied them over here: https://lore.barebox.org/barebox/20230911155927.3786335-2-a.fatoum@xxxxxxxxxxxxxx/
> > They got reverted along with patch 1/3 in that series, but they have no dependency, so could be reinstated.
> 
> Ok, it looks like two last patches need some more work. I'll drop them
> for now and respin it in a next time slot.
> 
> @Sascha, should I resend first 8 patches separately?

No, I just applied 1-8

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux