On Thu, Jul 02, 2026 at 03:52:13PM +0200, Przemek Kitszel wrote:
> 
> > @@ -2713,8 +2714,7 @@ static int bnx2x_mcast_enqueue_cmd(struct bnx2x *bp,
> >                             total_elems = BNX2X_MCAST_BINS_NUM;
> >             }
> >             while (total_elems > 0) {
> > -                   elem_group = (struct bnx2x_mcast_elem_group *)
> > -                                __get_free_page(GFP_ATOMIC | __GFP_ZERO);
> > +                   elem_group = kzalloc(PAGE_SIZE, GFP_ATOMIC);
> 
> what is the current rule of thumb for kzalloc vs kvzalloc size under
> GFP_ATOMIC?

kvzalloc() with GFP_ATOMIC is kzalloc():

        /*
         * vmalloc uses GFP_KERNEL for some internal allocations (e.g page 
tables)
         * so the given set of flags has to be compatible.
         */
        if ((flags & GFP_KERNEL) != GFP_KERNEL)
                return kmalloc_node(size, flags, node);

so it's only physically contiguous allocations.

 
> >                     if (!elem_group) {
> >                             bnx2x_free_groups(&new_cmd->group_head);
> >                             kfree(new_cmd);
> > 
> 

-- 
Sincerely yours,
Mike.

Reply via email to