From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 02A9C20F for ; Sun, 21 May 2017 14:18:06 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP; 21 May 2017 05:18:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,373,1491289200"; d="scan'208";a="104772061" Received: from jeffguo-s2600wt2.sh.intel.com ([10.239.129.150]) by fmsmga005.fm.intel.com with ESMTP; 21 May 2017 05:18:04 -0700 From: Jeff Guo To: helin.zhang@intel.com, jingjing.wu@intel.com Cc: stable@dpdk.org, jia.guo@intel.com Date: Sun, 21 May 2017 20:14:06 +0800 Message-Id: <1495368848-133719-1-git-send-email-jia.guo@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-stable] [dpdk-dev v2 1/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: Sun, 21 May 2017 12:18:07 -0000 [ backported from upstream commit 79dd163fcaac74006ab607b6c0d1baacc9c40d92 ] Since VF can not disable/enable HW CRC strip for non-DPDK PF drivers, and kernel driver almost default enable that feature, if disable it in app's rxmode, VF driver will report the VF launch failure. So this patch default to enable HW CRC strip to let VF launch successful. Signed-off-by: Jeff Guo Acked-by: Jingjing Wu --- v2: split patch to sync up with upstream commit --- app/test-pmd/parameters.c | 8 ++++---- app/test-pmd/testpmd.c | 2 +- doc/guides/nics/thunderx.rst | 2 +- doc/guides/testpmd_app_ug/run_app.rst | 4 ++-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 08e5a76..2f96953 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -148,7 +148,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"); @@ -525,7 +525,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 }, @@ -765,8 +765,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 a0332c2..523055c 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -283,7 +283,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 = { diff --git a/doc/guides/nics/thunderx.rst b/doc/guides/nics/thunderx.rst index 187c9a4..b12cc8e 100644 --- a/doc/guides/nics/thunderx.rst +++ b/doc/guides/nics/thunderx.rst @@ -156,7 +156,7 @@ managed by ``librte_pmd_thunderx_nicvf`` in the Linux operating system. .. code-block:: console ./arm64-thunderx-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0002:01:00.2 \ - -- -i --disable-hw-vlan-filter --crc-strip --no-flush-rx \ + -- -i --disable-hw-vlan-filter --no-flush-rx \ --port-topology=loop Example output: diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index d7c5120..ac7d458 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -281,9 +281,9 @@ The commandline options are: In perfect filter mode, when a rule is added with queue = -1, the packet will be enqueued into the RX drop-queue. If the drop-queue does not exist, the packet is dropped. The default value is N=127. -* ``--crc-strip`` +* ``--disable-crc-strip`` - Enable hardware CRC stripping. + Disable hardware CRC stripping. * ``--enable-lro`` diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index f1c269a..70d2e4d 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -1257,9 +1257,9 @@ Set hardware CRC stripping on or off for all ports:: testpmd> port config all crc-strip (on|off) -CRC stripping is off by default. +CRC stripping is on by default. -The ``on`` option is equivalent to the ``--crc-strip`` command-line option. +The ``off`` option is equivalent to the ``--disable-crc-strip`` command-line option. port config - scatter ~~~~~~~~~~~~~~~~~~~~~~~ -- 2.7.4