]> git.droids-corp.org - dpdk.git/commitdiff
app: enable HW CRC strip by default
authorJeff Guo <jia.guo@intel.com>
Sat, 8 Apr 2017 05:56:40 +0000 (13:56 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 10 Apr 2017 20:35:48 +0000 (22:35 +0200)
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.

Cc: stable@dpdk.org
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
app/test-pmd/parameters.c
app/test-pmd/testpmd.c
doc/guides/howto/virtio_user_as_exceptional_path.rst
doc/guides/nics/thunderx.rst
doc/guides/testpmd_app_ug/run_app.rst
doc/guides/testpmd_app_ug/testpmd_funcs.rst

index c36bcf8745e67acabb6bdee981b21069044994e2..2852fa23990012f9299f299f3640b07cc9f350b9 100644 (file)
@@ -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"))
index d6bd2b20ecfd58f7f5e913c5c96486617fd51732..2ab50915cb9e11d462a8cda900d190d3d0d0f56e 100644 (file)
@@ -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 = {
index 91a99c6752f1d4fe4da3dba9636dfea707256820..0bbcd3fd9a31cfb5a40b1e15ea7f8e8b1c5d4b49 100644 (file)
@@ -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:
index a95b701f1c01982abcb159767f68d2a6a36cfea2..036db86f2cb8359c8293dfc3588aef9a645159b5 100644 (file)
@@ -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:
index d1fabefb06aeacbb4d026b7ec2c0c050316333e2..8118206e78cadf0febe3bad735f590b457cc030a 100644 (file)
@@ -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``
 
index 497e2dd709c0e90456f555affc5e9adfbeebc516..6b8fc176389e2b522608f014d760517be7c43377 100644 (file)
@@ -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
 ~~~~~~~~~~~~~~~~~~~~~~~