Subject: RE: [PATCH net-next 2/5] net: wangxun: add ethtool_ops for ring parameters

From: Jiawen Wu <[email-masked]>
Date: Thu, 30 Nov 2023 11:32:22 +0800

> > +int wx_set_ring(struct wx *wx, u32 new_tx_count, u32 new_rx_count)
> > +{
> > +	struct wx_ring *temp_ring;
> > +	int i, err = 0;
> > +
> > +	/* allocate temporary buffer to store rings in */
> > +	i = max_t(int, wx->num_tx_queues, wx->num_rx_queues);
> > +	temp_ring = vmalloc(i * sizeof(struct wx_ring));
> 
> So it is O.K. for the pages to be scattered around the physical
> address space, not contiguous. Does this memory ever get passed to the
> hardware?

No, this memory is only used to temporarily store ring info. It will be freed after
restoring the ring info.