tg3 driver patch breaks L3DSR in RHEL 6.2.z and up

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 6.2 (2.6.32-220 and up)
  • Red Hat Enterprise Linux 6.3 (2.6.32-279 and up)
  • tg3 3.119 driver patch and up

Issue

  • In the RHEL6 kernel (2.6.32-220 and up), a bug was introduced in the tg3 3.119 driver patch that breaks the Layer 3 Direct-Server-Return (L3DSR) implementation.

Resolution

  • A work-around has been confirmed until the patched kernel is released. As root, turn on "rx" via ethtool for the affected nic after the driver is loaded:
  # ethtool -K ethX rx on

When you pass 'rx on' to the network interface, the following code is executed:

static int tg3_set_rx_csum(struct net_device *dev, u32 data)
{
        struct tg3 *tp = netdev_priv(dev);

        if (tg3_flag(tp, BROKEN_CHECKSUMS)) {
                if (data != 0)
                        return -EINVAL;
                return 0;
        }

        spin_lock_bh(&tp->lock);
        if (data)
>               tg3_flag_set(tp, RX_CHECKSUMS);   <-------
        else
                tg3_flag_clear(tp, RX_CHECKSUMS);
        spin_unlock_bh(&tp->lock);

        return 0;
}

This sets the same flag that isn't being set in the bug.

  • A patch has been generated to fix the issue and has been submitted for inclusion in the next kernel release:
--- drivers/net/tg3.c.orig      2012-06-08 14:17:09.900310052 -0500
+++ drivers/net/tg3.c   2012-06-08 14:22:29.386116709 -0500
@@ -15141,8 +15141,9 @@
        if (tp->pci_chip_rev_id != CHIPREV_ID_5700_B0) {
                features |= NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_GRO;

-       if (tg3_flag(tp, 5755_PLUS))
-               features |= NETIF_F_IPV6_CSUM;
+               tg3_flag_set(tp, RX_CHECKSUMS);
+               if (tg3_flag(tp, 5755_PLUS))
+                       features |= NETIF_F_IPV6_CSUM;
        }

        /* TSO is on by default on chips that support hardware TSO.

Root Cause

  • A one line code bug was introduced during the backporting process for the tg3 3.119 driver patch.

Attachments

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.