Wind River Support Network

HomeDefectsLIN6-4419
Not to be fixed

LIN6-4419 : wrl 4.3 / octeon drivers/net/octeon/ethernet-napi.c : high load ethernet traffic causes board to fail to bootup

Created: Feb 22, 2013    Updated: Apr 19, 2018
Resolved Date: Apr 17, 2018
Previous ID: LIN4-14276
Found In Version: 6.0
Severity: Severe
Applicable for: Wind River Linux 6
Component/s: Kernel

Description

the system hangs and fails to boot up if there is
enough incoming traffic to the octeon interfaces. The kernel
detects this and prints endlessly the following kind of
messages:

.
.
.
INFO: RCU detected CPU 1 stall (t=2500 jiffies)
INFO: RCU detected CPU 1 stall (t=10001 jiffies)
INFO: RCU detected CPU 1 stall (t=17502 jiffies)
INFO: RCU detected CPU 1 stall (t=25003 jiffies)
INFO: RCU detected CPU 1 stall (t=32504 jiffies)
.
.
.

After investigating this, it seems that the fault lies in
drivers/net/octeon/ethernet-napi.c:CVM_OCT_NAPI_POLL function.

The main while loop ( while(rx_count < budget) ) never ends. As
we are only just booting the system up, the interface is down
and rx_counter is not increased and the loop keeps going on
(remember that we are getting a lot of incoming traffic and the
work therefore never ends).

Workaround

--- a/drivers/net/octeon/ethernet-napi.c
+++ b/drivers/net/octeon/ethernet-napi.c
@@ -178,6 +178,9 @@ static int CVM_OCT_NAPI_POLL(struct napi_struct *napi, int budget)
                        cvmx_fau_atomic_add32(priv->tx_queue[packet_qos].fau, -1);
                        continue;
                }
+
+               rx_count++;
+
                segments = work->word2.s.bufs;
                skb_in_hw = USE_SKBUFFS_IN_HW && segments > 0;
                if (likely(skb_in_hw)) {
@@ -392,7 +395,6 @@ static int CVM_OCT_NAPI_POLL(struct napi_struct *napi, int budget)
                                        switch (callback_result) {
                                        case CVM_OCT_PASS:
                                                netif_receive_skb(skb);
-                                               rx_count++;
                                                break;
                                        case CVM_OCT_DROP:
                                                dev_kfree_skb_any(skb);
@@ -422,7 +424,6 @@ static int CVM_OCT_NAPI_POLL(struct napi_struct *napi, int budget)
                                } else {
                                        netif_receive_skb(skb);
                                        callback_result = CVM_OCT_PASS;
-                                       rx_count++;
                                }
                        } else {
                                /* Drop any packet received for a device that isn't up */

Steps to Reproduce

wrl 4.3 rcpl 10 or more
start octeon board
boot board up and floodping the interface. 

Live chat
Online