[ofa-general] Re: [PATCH/RFC] IPoIB: Allocate priv->tx_ring with vmalloc()

Or Gerlitz ogerlitz at voltaire.com
Sun Mar 16 01:53:22 PDT 2008


Roland Dreier wrote:
> As far as other ethernet drivers, using vmalloc seems fairly common:
>
> e1000/e1000_main.c:   txdr->buffer_info = vmalloc(size);
> e1000/e1000_main.c:   rxdr->buffer_info = vmalloc(size);
>
> bnx2.c:       bp->rx_buf_ring = vmalloc(sizeof(struct sw_bd) * RX_DESC_CNT *
>
> [bnx2x does the same thing but hides it in a macro]
>
> ixgbe/ixgbe_main.c:   txdr->tx_buffer_info = vmalloc(size);
> ixgbe/ixgbe_main.c:   rxdr->rx_buffer_info = vmalloc(size);
>
> e1000e/netdev.c:      tx_ring->buffer_info = vmalloc(size);
> e1000e/netdev.c:      rx_ring->buffer_info = vmalloc(size);
>
> netxen/netxen_nic_main.c:     cmd_buf_arr = (struct netxen_cmd_buffer *)vmalloc(TX_RINGSIZE);
>
>   
Sounds like we can do this as well.

Or.













More information about the general mailing list