]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ixgbe: don't set RXDCTL.RLPML for 82599
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 12 Jan 2018 22:02:56 +0000 (14:02 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 17:44:25 +0000 (13:44 -0400)
BugLink: http://bugs.launchpad.net/bugs/1774063
[ Upstream commit 2bafa8fac19a31ca72ae1a3e48df35f73661dbed ]

commit 2de6aa3a666e ("ixgbe: Add support for padding packet")

Uses RXDCTL.RLPML to limit the maximum frame size on Rx when using
build_skb. Unfortunately that register does not work on 82599.

Added an explicit check to avoid setting this register on 82599 MAC.

Extended the comment related to the setting of RXDCTL.RLPML to better
explain its purpose.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index a7113e702f584c3dfb4d6a8bc90d609f99e3b4cc..a549c48708827bf7bce3ac023ff17a497b00e8de 100644 (file)
@@ -4120,11 +4120,15 @@ void ixgbe_configure_rx_ring(struct ixgbe_adapter *adapter,
                rxdctl &= ~0x3FFFFF;
                rxdctl |=  0x080420;
 #if (PAGE_SIZE < 8192)
-       } else {
+       /* RXDCTL.RLPML does not work on 82599 */
+       } else if (hw->mac.type != ixgbe_mac_82599EB) {
                rxdctl &= ~(IXGBE_RXDCTL_RLPMLMASK |
                            IXGBE_RXDCTL_RLPML_EN);
 
-               /* Limit the maximum frame size so we don't overrun the skb */
+               /* Limit the maximum frame size so we don't overrun the skb.
+                * This can happen in SRIOV mode when the MTU of the VF is
+                * higher than the MTU of the PF.
+                */
                if (ring_uses_build_skb(ring) &&
                    !test_bit(__IXGBE_RX_3K_BUFFER, &ring->state))
                        rxdctl |= IXGBE_MAX_2K_FRAME_BUILD_SKB |