[PATCH v3 02/16] net/i40e: use common division round up macro

Bruce Richardson bruce.richardson at intel.com
Wed Sep 23 09:35:02 CEST 2026


On Wed, Sep 23, 2026 at 08:30:18AM +0100, Bruce Richardson wrote:
> On Tue, Sep 22, 2026 at 06:07:25PM -0700, Joshua Washington wrote:
> > The RTE_DIV_ROUND_UP in rte_common.h makes DIV_ROUND_UP redundant.
> > 
> > Signed-off-by: Joshua Washington <joshwash at google.com>
> > Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> > ---
> >  drivers/net/intel/i40e/base/i40e_osdep.h | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 

FYI: Just a note for i40e and the other intel drivers: the osdep.h files
have moved in the repo in next-net-intel tree, so this patch will conflict
once those changes are merged to main. Therefore, I'd suggest not merging
this till after the pull, and then adjusting the paths in the patch on
apply for simplicity of merge.

Thanks,
/Bruce

> > diff --git a/drivers/net/intel/i40e/base/i40e_osdep.h b/drivers/net/intel/i40e/base/i40e_osdep.h
> > index 9c5a94f055..93620f5c50 100644
> > --- a/drivers/net/intel/i40e/base/i40e_osdep.h
> > +++ b/drivers/net/intel/i40e/base/i40e_osdep.h
> > @@ -227,12 +227,11 @@ struct i40e_spinlock {
> >  #define i40e_memset(a, b, c, d) memset((a), (b), (c))
> >  #define i40e_memcpy(a, b, c, d) memcpy((a), (b), (c))
> >  
> > -#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
> >  #define DELAY(x) rte_delay_us_sleep(x)
> >  #define i40e_usec_delay(x) DELAY(x)
> >  #define i40e_msec_delay(x) DELAY(1000 * (x))
> >  #define udelay(x) DELAY(x)
> >  #define msleep(x) DELAY(1000*(x))
> > -#define usleep_range(min, max) msleep(DIV_ROUND_UP(min, 1000))
> > +#define usleep_range(min, max) msleep(RTE_DIV_ROUND_UP(min, 1000))
> >  
> >  #endif /* _I40E_OSDEP_H_ */
> > -- 
> > 2.55.0.1082.g2b9226bbc0-goog
> > 


More information about the dev mailing list