From patchwork Mon Mar 9 16:28:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Zolotarov X-Patchwork-Id: 3945 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8C2029AA8; Mon, 9 Mar 2015 17:29:00 +0100 (CET) Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by dpdk.org (Postfix) with ESMTP id B6A1F9A9B for ; Mon, 9 Mar 2015 17:28:58 +0100 (CET) Received: by wevl61 with SMTP id l61so11213506wev.6 for ; Mon, 09 Mar 2015 09:28:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eemCL7OvUUdQ6AAdN+ICcJzm1dt2FTXCVcPpASiUfoI=; b=mNBVAeomEJhUC0KKBr4UzWn4jY7guv7AwkK3M4qsgojhCBGvjtB6AOHovI4cT4HYfZ 4Zbepb5CtH2cYOsjpr05JSUHb5Bz1VUEBFN68++8V2IHszVI7009ZELZrpc9L7rruU+x V/EPLHMD88lCmxE6F6WVyU6P0Rc71Cqhrop1BU/u2jvvO0q/Y8PnnBfJQX7kPy1efxUU IfeZV+J72kenRV3zpWO1V7O1A5UeFOTIk1EAw4VGAzzo6Hyp9rm7A+oBld8pQ5chPjlN UR9OY8+cmf5FwlhN0Htvq/Td9XwlS8pt8/E6tEVImAH/+/TR8iGe+3BkBpAnOBCtNHzd hhpQ== X-Gm-Message-State: ALoCoQlxojDSB++dWE6b5O2+E/TdTloBXRGkXHS3MXQtD19jwx5kW2apsViYb88NcxQfqn4khfAY X-Received: by 10.180.208.107 with SMTP id md11mr18986881wic.10.1425918538483; Mon, 09 Mar 2015 09:28:58 -0700 (PDT) Received: from vladz-laptop.localdomain ([109.65.117.109]) by mx.google.com with ESMTPSA id e18sm28920929wjz.27.2015.03.09.09.28.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Mar 2015 09:28:57 -0700 (PDT) From: Vlad Zolotarov To: dev@dpdk.org Date: Mon, 9 Mar 2015 18:28:51 +0200 Message-Id: <1425918532-8601-3-git-send-email-vladz@cloudius-systems.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1425918532-8601-1-git-send-email-vladz@cloudius-systems.com> References: <1425918532-8601-1-git-send-email-vladz@cloudius-systems.com> Subject: [dpdk-dev] [PATCH v2 2/3] ixgbe: Bug fix: Properly configure Rx CRC stripping for x540 devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" According to x540 spec chapter 8.2.4.8.9 CRCSTRIP field of RDRXCTL should be configured to the same value as HLREG0.RXCRCSTRP. Clearing the RDRXCTL.RSCFRSTSIZE field for x540 is not required by the spec but seems harmless. Signed-off-by: Vlad Zolotarov Acked-by: Konstantin Ananyev --- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index b033e04..ce9658e 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -3677,7 +3677,8 @@ ixgbe_dev_rx_init(struct rte_eth_dev *dev) IXGBE_WRITE_REG(hw, IXGBE_RXCSUM, rxcsum); - if (hw->mac.type == ixgbe_mac_82599EB) { + if (hw->mac.type == ixgbe_mac_82599EB || + hw->mac.type == ixgbe_mac_X540) { rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); if (dev->data->dev_conf.rxmode.hw_strip_crc) rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP;