From patchwork Thu Mar 5 15:24:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Zolotarov X-Patchwork-Id: 3879 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 4F8725A9A; Thu, 5 Mar 2015 16:24:36 +0100 (CET) Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by dpdk.org (Postfix) with ESMTP id 953A35A85 for ; Thu, 5 Mar 2015 16:24:34 +0100 (CET) Received: by wesx3 with SMTP id x3so264695wes.1 for ; Thu, 05 Mar 2015 07:24:34 -0800 (PST) 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=N3dkgjWLAvUpli7skgXn8uo2EYGBvW45JLp7ngLeQOY=; b=LTg4d6etD+aZCkTJpfYPuGkhdhOhyuah+T3CD4bnT1sWAaJXTaHfk9TuyQyHJiOqaZ wTnx6yaFkBDVYyUfQ2IuFjXSn2L+WrZFyYwCc7EPDt5zc8/VQf6+vTZku8PaPRBPywew 4skhCeAoh8J8yo/2i2rN+mtaUg6GqUuavG/jgUWXL4+coVfpYuxqgxlCfWCzdNLWyIaT hi80Znzo917CPZDKGV4KOBhJ1Sb6m78pQlwsnXuYHsipzv5RgFP28luOrQ9i5YLux4h9 mjqbsYA8mI0sfVHyibFQH8GeEijMz/qcQ7WiU2gyVRGpp2QLbWTRdCLNhQyJm9FYFeOO Iqrw== X-Gm-Message-State: ALoCoQnrzgb2Ou2wex4cj2HNrOl2Dw7PaPKD7SQ72d1nGPP0LE3n85kq1ofbskrVbARG13ep7/YJ X-Received: by 10.180.108.239 with SMTP id hn15mr23960933wib.38.1425569074361; Thu, 05 Mar 2015 07:24:34 -0800 (PST) Received: from vladz-laptop.cloudius-systems.com. ([212.143.139.214]) by mx.google.com with ESMTPSA id m4sm12082938wik.20.2015.03.05.07.24.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 07:24:33 -0800 (PST) From: Vlad Zolotarov To: dev@dpdk.org Date: Thu, 5 Mar 2015 17:24:23 +0200 Message-Id: <1425569067-4958-3-git-send-email-vladz@cloudius-systems.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1425569067-4958-1-git-send-email-vladz@cloudius-systems.com> References: <1425569067-4958-1-git-send-email-vladz@cloudius-systems.com> Subject: [dpdk-dev] [PATCH v3 2/6] 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 --- 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 6c0e466..35a88d8 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -3687,7 +3687,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 (rx_conf->hw_strip_crc) rdrxctl |= IXGBE_RDRXCTL_CRCSTRIP;