From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 598921396; Thu, 23 Mar 2017 04:42:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490240536; x=1521776536; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=tzD+Z26P20+Tu7TsCEuzgLpDF9Q8FpRjTkGzPzVoZfc=; b=aRWO1zQYeTjHWOWaFMP0074Mq+s++St/4gNUGE9iS5FTcY9tAk0iftBT kclzvRYZt5wVDWtilRDy2xbvmebxiA==; Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2017 20:42:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,208,1486454400"; d="scan'208";a="63919586" Received: from jeffguo-s2600wt2.sh.intel.com ([10.239.129.150]) by orsmga002.jf.intel.com with ESMTP; 22 Mar 2017 20:42:13 -0700 From: Jeff Guo To: helin.zhang@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org, jia.guo@intel.com, stable@dpdk.org Date: Thu, 23 Mar 2017 11:40:01 +0800 Message-Id: <1490240402-60495-2-git-send-email-jia.guo@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490240402-60495-1-git-send-email-jia.guo@intel.com> References: <1490003874-37766-2-git-send-email-jia.guo@intel.com> <1490240402-60495-1-git-send-email-jia.guo@intel.com> Subject: [dpdk-stable] [dpdk-dev v3 2/3] app: enable HW CRC strip by default X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2017 03:42:16 -0000 Since VF has no ability to disable/enable HW CRC strip for non-DPDK PF drivers, and for most case of kernel driver default enable HW CRC strip, if disable HW CRC strip in app's rxmode, VF driver will return fail and result the VF launch failure. So this patch default to enable HW CRC strip to let VF launch successful. Signed-off-by: Jeff Guo Cc: stable@dpdk.org --- app/test-pmd/parameters.c | 8 ++++---- app/test-pmd/testpmd.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 28db8cd..4d5be7d 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -149,7 +149,7 @@ usage(char* progname) "the packet will be enqueued into the rx drop-queue. " "If the drop-queue doesn't exist, the packet is dropped. " "By default drop-queue=127.\n"); - printf(" --crc-strip: enable CRC stripping by hardware.\n"); + printf(" --disable-crc-strip: disable CRC stripping by hardware.\n"); printf(" --enable-lro: enable large receive offload.\n"); printf(" --enable-rx-cksum: enable rx hardware checksum offload.\n"); printf(" --disable-hw-vlan: disable hardware vlan.\n"); @@ -526,7 +526,7 @@ launch_args_parse(int argc, char** argv) { "pkt-filter-report-hash", 1, 0, 0 }, { "pkt-filter-size", 1, 0, 0 }, { "pkt-filter-drop-queue", 1, 0, 0 }, - { "crc-strip", 0, 0, 0 }, + { "disable-crc-strip", 0, 0, 0 }, { "enable-lro", 0, 0, 0 }, { "enable-rx-cksum", 0, 0, 0 }, { "enable-scatter", 0, 0, 0 }, @@ -766,8 +766,8 @@ launch_args_parse(int argc, char** argv) "drop queue %d invalid - must" "be >= 0 \n", n); } - if (!strcmp(lgopts[opt_idx].name, "crc-strip")) - rx_mode.hw_strip_crc = 1; + if (!strcmp(lgopts[opt_idx].name, "disable-crc-strip")) + rx_mode.hw_strip_crc = 0; if (!strcmp(lgopts[opt_idx].name, "enable-lro")) rx_mode.enable_lro = 1; if (!strcmp(lgopts[opt_idx].name, "enable-scatter")) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index e04e215..1ed72de 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -284,7 +284,7 @@ struct rte_eth_rxmode rx_mode = { .hw_vlan_strip = 1, /**< VLAN strip enabled. */ .hw_vlan_extend = 0, /**< Extended VLAN disabled. */ .jumbo_frame = 0, /**< Jumbo Frame Support disabled. */ - .hw_strip_crc = 0, /**< CRC stripping by hardware disabled. */ + .hw_strip_crc = 1, /**< CRC stripping by hardware enabled. */ }; struct rte_fdir_conf fdir_conf = { -- 2.7.4