Received: by 10.192.165.148 with SMTP id m20csp556393imm; Wed, 25 Apr 2018 04:12:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+WVYjkM1MKtD7p4WXEisu4PNwe7yeNEAVJomDrsdlKUVmgB4O8zwGrgWS65oUwPes9321y X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr29467125plg.393.1524654766507; Wed, 25 Apr 2018 04:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524654766; cv=none; d=google.com; s=arc-20160816; b=JxUIJxnT83Y+NW6pIUrnoi8AOm3xYqQvigR6xeNEvXsb/v9LaV+gCVlEggtx+7TxG2 9uX0sDzCbq07CEXHpyQDtoBpKJNCi4Hv/gYudhAndx9HHWg3o9bl2MVk1mQo4KXylZdZ iGqudzo/WMvYXC1+qYN0seT8UOqmfzF77yLn2EFLqIfPT/f9Kav8wuHzBlB9NSXygfoj gCLDpGLUDm9FNoTbh5GRGrkc5ARfxvDtQbSov4ZEDC1NbMmVD7/JNR5mJfoj1aL9x6CJ UsrBUwae7MPGEzI9v4Uds0ov8NqWeWfp4gGzyCpHf90V4/1qr4VC1RW3GlDrB3gQxIo0 7ZVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=jNC1waNKdtsdqBi8bqmFZPygt2S4YvYHgjdGPnEynlM=; b=oG3QvX4d8eN4Hi1i2YFR3oMJzWRBy2uju/JgY3eJewUPJxgCzi2Nq9cZXZg7Q7/KkE QpuZ5dHntriaXfh2GcSSThtx6/U3oEYGKa6mtwi73tS5nH2fW3l8l5l5WWMaDLhCLBh4 8GgNssOc4siQnDcdVuUVRPoqmU2RKgnz3iUzReXzV7tUVoF9txJeH0iMoJ5KDF1Gxr4g ewj6wjSbiPZAiW6gn20WEwM1cSO6T8k+1K0v/pGwLWfB2kyF08Pk2XHPqfHeUTOfGhTb RnMq76JZhQtO76ElIPEA1ZnhOvW4oCjVS2TzNiiU5L5oytk8j6KzzivlrEBXwM7gQwCF LXsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si12828845pgq.462.2018.04.25.04.12.32; Wed, 25 Apr 2018 04:12:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753986AbeDYLL0 (ORCPT + 99 others); Wed, 25 Apr 2018 07:11:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52238 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261AbeDYKky (ORCPT ); Wed, 25 Apr 2018 06:40:54 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2E23E36; Wed, 25 Apr 2018 10:40:53 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emil Tantilov , Andrew Bowers , Jeff Kirsher , Sasha Levin Subject: [PATCH 4.14 093/183] ixgbe: dont set RXDCTL.RLPML for 82599 Date: Wed, 25 Apr 2018 12:35:13 +0200 Message-Id: <20180425103246.216275044@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Emil Tantilov [ 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 Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -3987,11 +3987,15 @@ void ixgbe_configure_rx_ring(struct ixgb 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 |