Skip to contentSkip to conversation

eth frame error on imx6ul

DISCUSSION Stefano Manni 2 participants 5 messages Aug 5, 2024 – Aug 6, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

on a target based on imx6ul I see lots of errors like this when connected to the company LAN:

WARNING: eth0: error frame: 0x87ed5190 0x00000886

where 0x00000886 means "frame length violation" (FEC_RBD_LG).

It seems to be an HW issue BUT on another target based on imx6x with exactly the same HW block for ethernet I never see this error.

Have you ever faced something like this?

Thanks,
Stefano

#1 lore raw

Hello Stefano,

Quoted 5 lines · Stefano Manni

Hello,

on a target based on imx6ul I see lots of errors like this when connected to the company LAN:

Quoted 8 lines

WARNING: eth0: error frame: 0x87ed5190 0x00000886

where 0x00000886 means "frame length violation" (FEC_RBD_LG).

It seems to be an HW issue BUT on another target based on imx6x with exactly the same HW block for ethernet I never see this error.

Have you ever faced something like this?

Do you have TFTP or something running while seeing these errors, or when do they pop up?

Cheers,
Ahmad

Quoted 6 lines

Thanks,
Stefano

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#2 lore raw

Hello Ahmad

Quoted 3 lines · Ahmad Fatoum

Do you have TFTP or something running while seeing these errors, or when do they pop up?

They pop up unconditionally just after ifup. If I run tcpdump on the same LAN I see a lot of multicast/broadcast frames and probably the error comes out on the reception of them. Also because I figured out from fec_imx.h that 0x00000886 means:

#define FEC_RBD_LAST 0x0800 /**< Receive BD status: Buffer
is last in frame (useless here!) */
#define FEC_RBD_BC 0x0080 /**< Receive BD status: The
received frame is broadcast frame */
#define FEC_RBD_CR 0x0004 /**< Receive BD status: CRC
error */
#define FEC_RBD_OV 0x0002 /**< Receive BD status: Receive
FIFO overrun */

Best,
Stefano

#3 lore raw
Quoted 12 lines · Stefano Manni

Hello Ahmad

Quoted 3 lines · Ahmad Fatoum

Do you have TFTP or something running while seeing these errors, or when do they pop up?

They pop up unconditionally just after ifup. If I run tcpdump on the same LAN I see a lot of multicast/broadcast frames and probably the error comes out on the reception of them. Also because I figured out from fec_imx.h that 0x00000886 means:

Quoted 8 lines

#define FEC_RBD_LAST 0x0800 /**< Receive BD status: Buffer
is last in frame (useless here!) */
#define FEC_RBD_BC 0x0080 /**< Receive BD status: The
received frame is broadcast frame */
#define FEC_RBD_CR 0x0004 /**< Receive BD status: CRC
error */
#define FEC_RBD_OV 0x0002 /**< Receive BD status: Receive
FIFO overrun */

You can enable CONFIG_CMD_ETHLOG to capture the frames and see if the frame that triggers the error looks odd in some way.

Cheers,
Ahmad

Quoted 5 lines

Best,
Stefano

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#4 lore raw

Hello Ahmad,

Quoted 3 lines · Ahmad Fatoum

You can enable CONFIG_CMD_ETHLOG to capture the frames and see if the frame that triggers the error looks odd in some way.

unfortunately ethlog cannot be used because fec_recv() -> net_receive() -> rx_monitor() is not called when the frame is invalid.

So I've patched in some way fec_recv() to print out the frame in case of error:

drivers/net/fec_imx.c +3 -0
index 75a6596282..d2fb617631 100644
@@ -579,6 +579,10 @@ static int fec_recv(struct eth_device *dev)
        if (bd_status & FEC_RBD_ERR) {
                dev_warn(&dev->dev, "error frame: 0x%p 0x%08x\n",
                         rbd, bd_status);
+
+               dev_print_hex_dump(&dev->dev, KERN_DEBUG, "",
+                          DUMP_PREFIX_OFFSET, 16, 1, rbd-
Quoted 1 line

data_pointer, rbd->data_length, true);

+

        } else if (bd_status & FEC_RBD_LAST) {
                const uint16_t data_length = readw(&rbd->data_length);

And these are some of the frames I see:

WARNING: eth0: error frame: 0x87ed50e8 0x00000886
eth0: 00000000: ff ff ff ff ff ff 00 50 56 ad 1c 33 08 06 00 01
eth0: 00000010: 08 00 06 04 00 01 00 50 56 ad 1c 33 c0 a8 d8 d0
eth0: 00000020: 00 00 00 00 00 00 c0 a8 d7 de 00 00 00 00 00 00
eth0: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 ec 3f
WARNING: eth0: error frame: 0x87ed5190 0x00000886
eth0: 00000000: ff ff ff ff ff ff 00 50 56 ad f3 d9 08 06 00 01
eth0: 00000010: 08 00 06 04 00 01 00 50 56 ad f3 d9 c0 a8 d5 42
eth0: 00000020: 00 00 00 00 00 00
WARNING: eth0: error frame: 0x87ed5198 0x00000886
eth0: 00000000: ff ff ff ff ff ff 00 1e 2a c1 b4 8c 08 00 45 00
eth0: 00000010: 00 4e 94 ec 00 00 80 11 4a 99 c0 a8 d9 c8 c0 a8
eth0: 00000020: ff ff 00 89 00 89 00 3a 1b 08 d2 c3 01 10 00 01
eth0: 00000030: 00 00 00 00 00 00 20 46 44 45 4c 46 4a 46

Focusing on the first two, they are ARP but look odd, they should be 60 byte long.

Any idea?

Best,
Stefano