From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id EB9551DB1; Sat, 8 Apr 2017 07:59:19 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 07 Apr 2017 22:59:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,170,1488873600"; d="scan'208";a="1153194057" Received: from jeffguo-s2600wt2.sh.intel.com ([10.239.129.150]) by fmsmga002.fm.intel.com with ESMTP; 07 Apr 2017 22:59:17 -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: Sat, 8 Apr 2017 13:56:40 +0800 Message-Id: <1491631001-145204-2-git-send-email-jia.guo@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491631001-145204-1-git-send-email-jia.guo@intel.com> References: <1490247839-110341-3-git-send-email-jia.guo@intel.com> <1491631001-145204-1-git-send-email-jia.guo@intel.com> Subject: [dpdk-stable] [dpdk-dev v4 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: Sat, 08 Apr 2017 05:59:20 -0000 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 Cc: stable@dpdk.org --- v4: modify commit log handle some commit change --- app/test-pmd/parameters.c | 8 ++++---- app/test-pmd/testpmd.c | 2 +- doc/guides/howto/virtio_user_as_exceptional_path.rst | 4 ++-- doc/guides/nics/thunderx.rst | 2 +- doc/guides/testpmd_app_ug/run_app.rst | 4 ++-- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index c36bcf8..2852fa2 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -153,7 +153,7 @@ usage(char* progname) printf(" --latencystats=N: enable latency and jitter statistcs " "monitoring on forwarding lcore id N.\n"); #endif - 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"); @@ -533,7 +533,7 @@ launch_args_parse(int argc, char** argv) #ifdef RTE_LIBRTE_LATENCY_STATS { "latencystats", 1, 0, 0 }, #endif - { "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 }, @@ -786,8 +786,8 @@ launch_args_parse(int argc, char** argv) " must be >= 0\n", n); } #endif - 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 d6bd2b2..2ab5091 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -306,7 +306,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/howto/virtio_user_as_exceptional_path.rst b/doc/guides/howto/virtio_user_as_exceptional_path.rst index 91a99c6..0bbcd3f 100644 --- a/doc/guides/howto/virtio_user_as_exceptional_path.rst +++ b/doc/guides/howto/virtio_user_as_exceptional_path.rst @@ -84,7 +84,7 @@ compiling the kernel and those kernel modules should be inserted. $(testpmd) -l 2-3 -n 4 \ --vdev=virtio_user0,path=/dev/vhost-net,queue_size=1024 \ - -- -i --txqflags=0x0 --disable-hw-vlan --enable-lro --crc-strip \ + -- -i --txqflags=0x0 --disable-hw-vlan --enable-lro \ --enable-rx-cksum --rxd=1024 --txd=1024 This command runs testpmd with two ports, one physical NIC to communicate @@ -114,7 +114,7 @@ compiling the kernel and those kernel modules should be inserted. $(testpmd) -l 2-3 -n 4 \ --vdev=virtio_user0,path=/dev/vhost-net,queues=2,queue_size=1024 \ -- -i --txqflags=0x0 --disable-hw-vlan --enable-lro \ - --crc-strip --enable-rx-cksum --txq=2 --rxq=2 --rxd=1024 \ + --enable-rx-cksum --txq=2 --rxq=2 --rxd=1024 \ --txd=1024 #. Start testpmd: diff --git a/doc/guides/nics/thunderx.rst b/doc/guides/nics/thunderx.rst index a95b701..036db86 100644 --- a/doc/guides/nics/thunderx.rst +++ b/doc/guides/nics/thunderx.rst @@ -155,7 +155,7 @@ managed by ``librte_pmd_thunderx_nicvf`` in the Linux operating system. .. code-block:: console ./arm64-thunderx-linuxapp-gcc/app/testpmd -l 0-3 -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 d1fabef..8118206 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 497e2dd..6b8fc17 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -1378,9 +1378,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