]> git.droids-corp.org - dpdk.git/commitdiff
examples: enable HW CRC strip by default
authorJeff Guo <jia.guo@intel.com>
Sat, 8 Apr 2017 05:56:39 +0000 (13:56 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 10 Apr 2017 20:36:37 +0000 (22:36 +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
example 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>
28 files changed:
examples/bond/main.c
examples/exception_path/main.c
examples/ip_fragmentation/main.c
examples/ip_pipeline/config_parse.c
examples/ip_reassembly/main.c
examples/ipsec-secgw/ipsec-secgw.c
examples/ipv4_multicast/main.c
examples/kni/main.c
examples/l2fwd-crypto/main.c
examples/l2fwd-jobstats/main.c
examples/l2fwd-keepalive/main.c
examples/l2fwd/main.c
examples/l3fwd-acl/main.c
examples/l3fwd-power/main.c
examples/l3fwd-vf/main.c
examples/l3fwd/main.c
examples/link_status_interrupt/main.c
examples/load_balancer/init.c
examples/multi_process/l2fwd_fork/main.c
examples/multi_process/symmetric_mp/main.c
examples/netmap_compat/bridge/bridge.c
examples/performance-thread/l3fwd-thread/main.c
examples/qos_meter/main.c
examples/qos_sched/init.c
examples/quota_watermark/qw/init.c
examples/tep_termination/vxlan_setup.c
examples/vhost/main.c
examples/vhost_xen/main.c

index 6402c6b34a089e04a5602a19ad26c0d94f03553e..9a4ec80732520e3d1efb9d26b811dc0eb9bc0723 100644 (file)
@@ -160,7 +160,7 @@ static struct rte_eth_conf port_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 */
        },
        .rx_adv_conf = {
                .rss_conf = {
index 73d50b69213b4f52f6e827c24c31017773cae088..89bf1cc06089c5f24edb9ea2f5320d702352ee76 100644 (file)
@@ -114,7 +114,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0,    /* IP checksum offload disabled */
                .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,
index 8d2ec43567530616fa4aec37ccbb1e3defe5c431..815b22532eefc407265fcba95f4ad1db2db00a19 100644 (file)
@@ -176,7 +176,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 1, /**< IP checksum offload enabled */
                .hw_vlan_filter = 0, /**< VLAN filtering disabled */
                .jumbo_frame    = 1, /**< Jumbo Frame Support enabled */
-               .hw_strip_crc   = 0, /**< CRC stripped by hardware */
+               .hw_strip_crc   = 1, /**< CRC stripped by hardware */
        },
        .txmode = {
                .mq_mode = ETH_MQ_TX_NONE,
index 3ae7d48d58ef431b747df9eeafeaff80290a201d..0b761346a4c699cb2e200f7804bb43be63286edd 100644 (file)
@@ -103,7 +103,7 @@ static const struct app_link_params link_params_default = {
                        .hw_vlan_strip  = 0, /* VLAN strip */
                        .hw_vlan_extend = 0, /* Extended VLAN */
                        .jumbo_frame    = 0, /* Jumbo frame support */
-                       .hw_strip_crc   = 0, /* CRC strip by HW */
+                       .hw_strip_crc   = 1, /* CRC strip by HW */
                        .enable_scatter = 0, /* Scattered packets RX handler */
 
                        .max_rx_pkt_len = 9000, /* Jumbo frame max packet len */
index b641576fc90196808f092a19b695f39a7671bc3a..b1da7a1e46ae9422e39dd9517664072cce842831 100644 (file)
@@ -200,7 +200,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    = 1, /**< 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 = {
index d3c229abb6dd33899c1562cd3410d6adafd8e3a2..8cbf6ac4443340319c80495ea75ac5e5926caab1 100644 (file)
@@ -208,7 +208,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 = {
index b681f8e2b6fb9ab91f2c9cba3d05f21d38cae2c1..af59d2d307fa0c05a0988a0783efda5aa3873b4b 100644 (file)
@@ -145,7 +145,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .hw_vlan_filter = 0, /**< VLAN filtering disabled */
                .jumbo_frame    = 1, /**< Jumbo Frame Support enabled */
-               .hw_strip_crc   = 0, /**< CRC stripped by hardware */
+               .hw_strip_crc   = 1, /**< CRC stripped by hardware */
        },
        .txmode = {
                .mq_mode = ETH_MQ_TX_NONE,
index 57313d11449dd7eec88724546f8747003acf1d6e..0be57d83d0c9969135ceaaf4cde82fe1f03aea05 100644 (file)
@@ -130,7 +130,7 @@ static struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0,    /* IP checksum offload disabled */
                .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,
index 6a3965bc00b61a26343a40b254398ce4f8a33dff..15fab102bf7f411a54db48985fde18c84a3a0377 100644 (file)
@@ -212,7 +212,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .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,
index eae7a13a3796aa5d36004e01de0dbc488749e319..e6e6c2286571816ddf128deeaff6535ae1f37177 100644 (file)
@@ -126,7 +126,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .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,
index 068f4e5f96130069827b67d1b9bb7ebce44c349b..4623d2ae7c459b40b49917b9f3f07ed60a7d572b 100644 (file)
@@ -116,7 +116,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .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,
index ffcf109574944d2d2217f8c11e0afdfc5ac74def..f9667272f88067996fc351bae4cc448e8a1bf6a3 100644 (file)
@@ -120,7 +120,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .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,
index 0e3daadf948f0664e26c35521c073a35b06e71cc..ea0b5b1eb162e6768df112e5432fae93a7e85648 100644 (file)
@@ -163,7 +163,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 = {
index 978631cf299bcb144b35536022b1677273060b32..ec40a1732f5c3cace07d1ad9dcd418d7d8222df3 100644 (file)
@@ -223,7 +223,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 = {
index dc3d5472943f754d857f9bc0c9a8a2ac9ff49b34..797f722a73220ef4eddfcbb7cda5648705ce6441 100644 (file)
@@ -197,7 +197,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 = {
index 3ce1b6539bce585d33072e23c5515dd6c2d154ba..fd6605bffac004db2193c58b937ac3e3f1556285 100644 (file)
@@ -156,7 +156,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 = {
index 97379fa3d6091a03b559563aa7835012213027db..25da28eb29f58d6e17d84a725b1030002cb205f4 100644 (file)
@@ -116,7 +116,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .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,
index e07850be17e3738c9b0fa56ad35e7a88a9cf7de0..abd05a31d5ea8bc52e992340a236e6e75c4f4e03 100644 (file)
@@ -81,7 +81,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 = {
index 67a9f15ce4e5711709994cdc18f2d2dd20b3af44..311a427dbdb30dbaa90892bee1ef021fa0494637 100644 (file)
@@ -162,7 +162,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .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,
index 75a52728dc5dbd4a5ebb531642fe29345894817b..0990d9659cdfad3063ef831ca16d86ad8d1cf826 100644 (file)
@@ -213,7 +213,7 @@ smp_port_init(uint8_t port, struct rte_mempool *mbuf_pool, uint16_t num_queues)
                                .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 = {
index 53f5fdb6a3630bae95cc30f196cdd9c4654e1f33..2f2b6baaa279a5b6a10a0a11244bd72fbd7fe075 100644 (file)
@@ -59,7 +59,7 @@ struct rte_eth_conf eth_conf = {
                .hw_ip_checksum = 0,
                .hw_vlan_filter = 0,
                .jumbo_frame    = 0,
-               .hw_strip_crc   = 0,
+               .hw_strip_crc   = 1,
        },
        .txmode = {
                .mq_mode = ETH_MQ_TX_NONE,
index 06f89622400b386c12dd6fc9f8c21d6c92ee2e0d..f6154ac2a0faed878d0c4930ae980710d520d4de 100644 (file)
@@ -341,7 +341,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 = {
index abe5eb8bfe3c22397eb91275647a31cd56415519..d8a2107d5daeb1128b5282ace26ac3307730a2ac 100644 (file)
@@ -89,7 +89,7 @@ static struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 1,
                .hw_vlan_filter = 0,
                .jumbo_frame    = 0,
-               .hw_strip_crc   = 0,
+               .hw_strip_crc   = 1,
        },
        .rx_adv_conf = {
                .rss_conf = {
index 70e12bb41f68414c75dc5b9bb4fb4e4dff63a109..fe0221c6fb1e8491d78d0d7026ad385f49599a74 100644 (file)
@@ -92,7 +92,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .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_DCB_NONE,
index 6babfea88b2ab90f7e5db4a57fbfbe570780f1dd..b6264fcf59b9677cc1cfe412cbd2fa5fa740e035 100644 (file)
@@ -57,7 +57,7 @@ static const struct rte_eth_conf port_conf = {
                        .hw_ip_checksum = 0, /**< IP csum offload disabled */
                        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
                        .jumbo_frame    = 0, /**< Jumbo Frame disabled */
-                       .hw_strip_crc   = 0, /**< CRC stripped by hardware */
+                       .hw_strip_crc   = 1, /**< CRC stripped by hardware */
                },
                .txmode = {
                        .mq_mode = ETH_DCB_NONE,
index 87de74d7c33b4f915296e3f344746124198fb942..b57c04512f6faf60d4ff2b204c74bc87900fabd0 100644 (file)
@@ -102,7 +102,7 @@ static const struct rte_eth_conf port_conf = {
                .hw_ip_checksum = 0, /**< IP checksum offload disabled */
                .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,
index 022438e1dd8b4b72c7edfd0cdfb8def2be2d5f3f..aa88733a47ae4eff082061eb87ebb47e073b2eab 100644 (file)
@@ -154,7 +154,7 @@ static struct rte_eth_conf vmdq_conf_default = {
                 */
                .hw_vlan_strip  = 1, /**< VLAN strip enabled. */
                .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
-               .hw_strip_crc   = 0, /**< CRC stripped by hardware */
+               .hw_strip_crc   = 1, /**< CRC stripped by hardware */
        },
 
        .txmode = {
index af05b00ccdce45ece2574d8971154e47eb790b09..d9ef140f79b056487a60cc4a8b9c3c4e70b863c1 100644 (file)
@@ -149,7 +149,7 @@ static const struct rte_eth_conf vmdq_conf_default = {
                 */
                .hw_vlan_strip  = 1, /**< VLAN strip enabled. */
                .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
-               .hw_strip_crc   = 0, /**< CRC stripped by hardware */
+               .hw_strip_crc   = 1, /**< CRC stripped by hardware */
        },
 
        .txmode = {