Unable to change NIC settings with ethtool

2

1

I'm trying to change my NIC (Intel 10G NIC) settings using ethtool, but can't seem to do that.

I tried

ethtool -G xge0 rx 32768 tx 32768

and then tried to see if the settings have changed using

ethtool -g xge0

But I see the output

Ring parameters for xge0: 
Pre-set maximums: 
RX:        4096 
RX Mini:   0 
RX Jumbo:  0 
TX:        4096 
Current hardware settings: 
RX:        4096 
RX Mini:   0 
RX Jumbo:  0 
TX:        4096

Why can't I change the settings?

Rayne

Posted 2012-05-22T10:52:47.533

Reputation: 479

Answers

4

The controller can only handle 4,096 ring entries in each ring. The NIC actually needs the DMA address of each available slot in each ring buffer. It only has 4,096 slots in each direction. (And more wouldn't really help anyway.)

The ring works like this (I'll cover only receive, because it's simpler, but the concept is the same):

  1. The driver allocates a certain number of receive buffers in DMAable main memory.

  2. The driver tells the NIC the base addresses of these buffers.

  3. As the NIC receives packets, it DMAs them in to these buffers.

  4. The driver asks the NIC how many packets it has DMAed into main memory.

  5. The driver processes these packets.

  6. The driver allocates new receive buffers to refill the ring.

  7. The driver registers the base addresses of the new buffers with the NIC.

So the NIC has to know the physical address of each buffer in the ring. This NIC only has 4,096 slots in each direction for those physical addresses.

David Schwartz

Posted 2012-05-22T10:52:47.533

Reputation: 58 310