Discussion:
igb mtu change
ratheesh kannoth
2012-10-17 14:41:09 UTC
Permalink
igb_change_mtu change is only changing adapter->rx_ring[0]->rx_buffer_len.

1) we dont have to change adapter->tx_ring[0]->rx_buffer_len ?
2) Is there any way to set different values to
adapter->tx_ring[0]->rx_buffer_len and
adapter->rx_ring[0]->rx_buffer_len ?

I am facing a problem because i have a strange requirement....i have
2KB bufffer pools ( GFP_DMA ) in kernel.
When i receive a jumbo pkt of size 9126, five rx_desc should be
used to recieve paket. So the first rx_desc will have a status error
bit indicating that it is not
EOP ( eop ) ....I could easily keep track of my 2KB buffer pools.

But when sending ...i wll collect all 2KB buffers of same jumbo frame
and dma to tx_ring....
So i need 1500 on rx_ring[0]->rx_buffer_len and 9126 on
adapter->tx_ring[0]->rx_buffer_len. .Is there any way ?

Thanks,
Ratheesh
Alexander Duyck
2012-10-17 20:09:46 UTC
Permalink
Post by ratheesh kannoth
igb_change_mtu change is only changing adapter->rx_ring[0]->rx_buffer_len.
1) we dont have to change adapter->tx_ring[0]->rx_buffer_len ?
2) Is there any way to set different values to
adapter->tx_ring[0]->rx_buffer_len and
adapter->rx_ring[0]->rx_buffer_len ?
I am facing a problem because i have a strange requirement....i have
2KB bufffer pools ( GFP_DMA ) in kernel.
When i receive a jumbo pkt of size 9126, five rx_desc should be
used to recieve paket. So the first rx_desc will have a status error
bit indicating that it is not
EOP ( eop ) ....I could easily keep track of my 2KB buffer pools.
But when sending ...i wll collect all 2KB buffers of same jumbo frame
and dma to tx_ring....
So i need 1500 on rx_ring[0]->rx_buffer_len and 9126 on
adapter->tx_ring[0]->rx_buffer_len. .Is there any way ?
Thanks,
Ratheesh
What version of the igb driver are you using? What you are describing
doesn't sound like the behaviour of the current igb driver.

The current igb driver does receive the frame data into 2K buffers, and
transmits up to MTU size. The only limitation on the size of the frame
you can transmit is the netdev->mtu which the driver doesn't evaluate.
It is evaluated at the network stack level. The igb driver can send up
to 9K frames, in addition it can TSO up to 64K frames and send them in
9K chunks so I am not sure what you are asking.

Thanks,

Alex
ratheesh kannoth
2012-10-18 00:10:32 UTC
Permalink
On Thu, Oct 18, 2012 at 1:39 AM, Alexander Duyck
Post by Alexander Duyck
The current igb driver does receive the frame data into 2K buffers, and
transmits up to MTU size. The only limitation on the size of the frame
you can transmit is the netdev->mtu which the driver doesn't evaluate.
It is evaluated at the network stack level. The igb driver can send up
to 9K frames, in addition it can TSO up to 64K frames and send them in
9K chunks so I am not sure what you are asking.
Thanks,
Alex
Thanks a lot.
I am using igb-3.3.6 for hardware - vendor=0x8086, device=0x10e6
only CONFIG_IGB_DISABLE_PACKET_SPLIT defined.


I will explain my question in detail.


int i = 0 ;
rx_desc = IGB_RX_DESC(rx_ring, i);

if(!(igb_test_staterr(rx_desc, E1000_RXD_STAT_EOP) ) {
printk ( "part of Jumbo frame ...Not the last junk ");
}


If mtu is 1500, and jumbo frame size is 9200. I get the printk -
part of Jumbo frame ...Not the last junk .

But if i change mtu to 9216, the condition ,
!(igb_test_staterr(rx_desc, E1000_RXD_STAT_EOP) , looks like
never satisfied .

Thanks,
Ratheesh

Loading...