patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jeff Guo <jia.guo@intel.com>
To: helin.zhang@intel.com, jingjing.wu@intel.com
Cc: stable@dpdk.org, jia.guo@intel.com
Subject: [dpdk-stable] [dpdk-dev 2/2] app: enable HW CRC strip by default
Date: Thu, 18 May 2017 10:06:31 +0800	[thread overview]
Message-ID: <1495073191-28887-2-git-send-email-jia.guo@intel.com> (raw)
In-Reply-To: <1495073191-28887-1-git-send-email-jia.guo@intel.com>

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 <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pipeline/init.c                    | 2 +-
 app/test-pmd/parameters.c                   | 8 ++++----
 app/test-pmd/testpmd.c                      | 2 +-
 app/test/test_kni.c                         | 2 +-
 app/test/test_link_bonding.c                | 4 ++--
 app/test/test_link_bonding_mode4.c          | 2 +-
 app/test/test_link_bonding_rssconf.c        | 4 ++--
 app/test/test_pmd_perf.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 ++--
 11 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/app/test-pipeline/init.c b/app/test-pipeline/init.c
index aef082f..00dbc27 100644
--- a/app/test-pipeline/init.c
+++ b/app/test-pipeline/init.c
@@ -105,7 +105,7 @@ static struct rte_eth_conf port_conf = {
 		.hw_ip_checksum = 1, /* IP checksum offload enabled */
 		.hw_vlan_filter = 0, /* VLAN filtering disabled */
 		.jumbo_frame    = 0, /* Jumbo Frame Support disabled */
-		.hw_strip_crc   = 0, /* CRC stripped by hardware */
+		.hw_strip_crc   = 1, /* CRC stripped by hardware */
 	},
 	.rx_adv_conf = {
 		.rss_conf = {
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/app/test/test_kni.c b/app/test/test_kni.c
index 309741c..db17fdf 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -92,7 +92,7 @@ static const struct rte_eth_conf port_conf = {
 		.hw_ip_checksum = 0,
 		.hw_vlan_filter = 0,
 		.jumbo_frame = 0,
-		.hw_strip_crc = 0,
+		.hw_strip_crc = 1,
 	},
 	.txmode = {
 		.mq_mode = ETH_DCB_NONE,
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 3229660..52d2d05 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -172,7 +172,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 = {
@@ -191,7 +191,7 @@ static struct rte_eth_conf default_pmd_conf = {
 		.hw_ip_checksum = 0, /**< IP checksum offload enabled */
 		.hw_vlan_filter = 0, /**< VLAN filtering disabled */
 		.jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
-		.hw_strip_crc   = 0, /**< CRC stripped by hardware */
+		.hw_strip_crc   = 1, /**< CRC stripped by hardware */
 	},
 	.txmode = {
 		.mq_mode = ETH_MQ_TX_NONE,
diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index 53caa3e..dc33973 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -143,7 +143,7 @@ static struct rte_eth_conf default_pmd_conf = {
 		.hw_ip_checksum = 0, /**< IP checksum offload enabled */
 		.hw_vlan_filter = 0, /**< VLAN filtering disabled */
 		.jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
-		.hw_strip_crc   = 0, /**< CRC stripped by hardware */
+		.hw_strip_crc   = 1, /**< CRC stripped by hardware */
 	},
 	.txmode = {
 		.mq_mode = ETH_MQ_TX_NONE,
diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index 34f1c16..e11da9b 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -116,7 +116,7 @@ static struct rte_eth_conf default_pmd_conf = {
 		.hw_ip_checksum = 0, /**< IP checksum offload enabled */
 		.hw_vlan_filter = 0, /**< VLAN filtering disabled */
 		.jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
-		.hw_strip_crc   = 0, /**< CRC stripped by hardware */
+		.hw_strip_crc   = 1, /**< CRC stripped by hardware */
 	},
 	.txmode = {
 		.mq_mode = ETH_MQ_TX_NONE,
@@ -133,7 +133,7 @@ static struct rte_eth_conf rss_pmd_conf = {
 		.hw_ip_checksum = 0, /**< IP checksum offload enabled */
 		.hw_vlan_filter = 0, /**< VLAN filtering disabled */
 		.jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
-		.hw_strip_crc   = 0, /**< CRC stripped by hardware */
+		.hw_strip_crc   = 1, /**< CRC stripped by hardware */
 	},
 	.txmode = {
 		.mq_mode = ETH_MQ_TX_NONE,
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index e055aa0..1ffd65a 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -100,7 +100,7 @@ static struct rte_eth_conf port_conf = {
 		.hw_vlan_strip  = 0, /**< VLAN strip enabled. */
 		.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
 		.jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
-		.hw_strip_crc   = 0, /**< CRC stripped by hardware */
+		.hw_strip_crc   = 1, /**< CRC stripped by hardware */
 		.enable_scatter = 0, /**< scatter rx disabled */
 	},
 	.txmode = {
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

      reply	other threads:[~2017-05-18  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18  2:06 [dpdk-stable] [dpdk-dev 1/2] examples: " Jeff Guo
2017-05-18  2:06 ` Jeff Guo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1495073191-28887-2-git-send-email-jia.guo@intel.com \
    --to=jia.guo@intel.com \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).