Bug 105915 - (ACENIC) driver stalls after up/down
(ACENIC) driver stalls after up/down
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Garzik
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-29 10:04 EDT by Jun'ichi NOMURA
Modified: 2013-07-02 22:15 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-06 15:58:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to set 'jumbo' paramerter properly (715 bytes, patch)
2003-09-29 10:07 EDT, Jun'ichi NOMURA
no flags Details | Diff

  None (edit)
Description Jun'ichi NOMURA 2003-09-29 10:04:50 EDT
Description of problem:

When Jumbo frame is enabled (i.e. MTU=9000) for acenic network card,
the interface becomes unable to receive packets after switching on/off
Jumbo frame and/or up/down interface.

The root cause is that driver/net/acenic.c does not update its internal
parameters properly after these operations.

By setting these parameters properly, the problem would be fixed.
Patch will be attached.

Version-Release number of selected component (if applicable):
2.4.21-3.EL

How reproducible:
Often after the following procedure.

Steps to Reproduce:
Set up two hosts (sender and receiver).

1) Problem with up/down interface

1.Change MTU to 9000 on receiver host
   # ifconfig eth0 mtu 9000

2.Change MTU to 9000 on sender host
   # ifconfig eth0 mtu 9000

3.Down the interface on receiver
   # ifconfig eth0 down

4.Up the the interface on receiver
   # ifconfig eth0 mtu 9000 up

5.Send TCP packets from sender to receiver
   # scp  file  receiver:~/ 

6. Interface on receiver stucks


2) Problem with changing MTU

1.Change MTU to 9000 on receiver host
   # ifconfig eth0 mtu 9000

2.Change MTU to 9000 on sender host
   # ifconfig eth0 mtu 9000

3.Send TCP packets from sender to receiver
   # scp  file  receiver:~/ 

4.Change MTU on receiver to 1500
   # ifconfig eth0 mtu 1500

5.Send TCP packets from sender to receiver
   # scp  file  receiver:~/ 

6.Change MTU on receiver to 9000
   # ifconfig eth0 mtu 9000

7.Send TCP packets from sender to receiver
   # scp  file  receiver:~/ 

8. Interface on receiver stucks
    
Actual results:
The interface stucks.

Expected results:
The interface should work after such operations.


Additional info:

Acenic driver has separate buffers for receiving normal frames and
jumbo frames.
The buffers are reloaded at initialization and buffer shortage.
The driver checks ap->jumbo to determine which buffer to be reloaded.

For jumbo frame, the number of current buffers are kept in ap->cur_jumbo_bufs.
When ap->cur_jumbo_bufs becomes smaller than RX_LOW_JUMBO_THRES,
the driver reloads RX_JUMBO_SIZE buffers with ace_load_jumbo_rx_ring().

The problems arises when interface is down/up and/or when MTU is changed.

1) Problem on changing MTU

When MTU is changed from 9000 to 1500, ace_set_rxtx_parms(dev, 0) is
executed. Then buffers are flushed and the number of buffers becomes 0.
NIC raises E_RESET_JUMBO_RNG event interrupt.
At this event, ace_handle_event() sets ap->jumbo to 0 but does not
update ap->cur_jumbo_bufs.
Let R1 be the ap->cur_jumbo_bufs value at this point.

If MTU is changed again to 9000, ace_load_jumbo_rx_ring() is executed
and buffers are reloaded.
At this time, the actual number of buffers are RX_JUMBO_SIZE.
But ap->cur_jumbo_bufs is RX_JUMBO_SIZE plus R1.

With this inconsistency, after receiving packets, actual free buffers
can be 0 while ap->cur_jumbo_bufs is larger than RX_LOW_JUMBO_THRES.
While the buffers are never reloaded unless ap->cur_jumbo_bufs becomes
smaller than RX_LOW_JUMBO_THRES, the driver never declements
ap->cur_jumbo_bufs if packet is not received.
Thus, the driver can not receive any packets.

2) Problem on up/down interface

When the interface is downed at MTU=9000, E_RESET_JUMBO_RNG event occurs
as same way as MTU is changed.
ace_handle_event() sets ap->jumbo to 0 but does not change dev->mtu.

If the interface is up again, ace_open() initialize driver parameters.
It does not change ap->jumbo value nor dev->mtu.
At this point, dev->mtu is 9000 but the driver are set up for normal frames.
So the buffer reload is done for normal frames and jumbo frame buffer
can not be received.
Comment 1 Jun'ichi NOMURA 2003-09-29 10:07:04 EDT
Created attachment 94815 [details]
patch to set 'jumbo' paramerter properly

The patch does the following things:
  - Setting ap->cur_jumbo_bufs to 0 in E_RESET_JUMBO_RNG event handler
  - Setting ap->jumbo to 1 in ace_open() when MTU is larger than normal frame
size
Comment 2 Jun'ichi NOMURA 2005-10-06 11:45:41 EDT
Though I don't have access to the machine any more and cannot test it,
the patch I requested seems included in the recent RHEL3.
(At least since 2.4.21-15.EL)

I guess the following changelog entry corresponds to the fix:

* Wed Nov  5 2003 Ernie Petrides <petrides@redhat.com> kernel-2.4.21-4.10.EL
- update acenic driver to handle enabling of jumbo frame mode (Jeff Moyer)

So, it's ok to close this bug.
Comment 3 Ernie Petrides 2005-10-06 15:58:23 EDT
Thanks you for the info.  That implies that this bug was fixed in RHEL3 U1.

Note You need to log in before you can comment on or make changes to this bug.