app: remove unneeded atomic header include
[dpdk.git] / app / test-pmd / config.c
index a18871d..2c2ab44 100644 (file)
@@ -27,7 +27,6 @@
 #include <rte_eal.h>
 #include <rte_per_lcore.h>
 #include <rte_lcore.h>
-#include <rte_atomic.h>
 #include <rte_branch_prediction.h>
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
@@ -1241,10 +1240,12 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
        if (port_id_is_invalid(port_id, ENABLED_WARN))
                return;
 
-       diag = rte_eth_dev_set_mtu(port_id, mtu);
-       if (diag != 0) {
-               fprintf(stderr, "Set MTU failed. diag=%d\n", diag);
-               return;
+       if (port->need_reconfig == 0) {
+               diag = rte_eth_dev_set_mtu(port_id, mtu);
+               if (diag != 0) {
+                       fprintf(stderr, "Set MTU failed. diag=%d\n", diag);
+                       return;
+               }
        }
 
        port->dev_conf.rxmode.mtu = mtu;
@@ -2963,7 +2964,7 @@ port_rss_reta_info(portid_t port_id,
 }
 
 /*
- * Displays the RSS hash functions of a port, and, optionaly, the RSS hash
+ * Displays the RSS hash functions of a port, and, optionally, the RSS hash
  * key of the port.
  */
 void
@@ -3019,7 +3020,9 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
        }
        printf("RSS functions:\n ");
        for (i = 0; rss_type_table[i].str; i++) {
-               if (rss_hf & rss_type_table[i].rss_type)
+               if (rss_type_table[i].rss_type == 0)
+                       continue;
+               if ((rss_hf & rss_type_table[i].rss_type) == rss_type_table[i].rss_type)
                        printf("%s ", rss_type_table[i].str);
        }
        printf("\n");
@@ -3040,7 +3043,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
        unsigned int i;
 
        rss_conf.rss_key = NULL;
-       rss_conf.rss_key_len = hash_key_len;
+       rss_conf.rss_key_len = 0;
        rss_conf.rss_hf = 0;
        for (i = 0; rss_type_table[i].str; i++) {
                if (!strcmp(rss_type_table[i].str, rss_type))
@@ -3049,6 +3052,7 @@ port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
        diag = rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf);
        if (diag == 0) {
                rss_conf.rss_key = hash_key;
+               rss_conf.rss_key_len = hash_key_len;
                diag = rte_eth_dev_rss_hash_update(port_id, &rss_conf);
        }
        if (diag == 0)
@@ -4816,11 +4820,15 @@ flowtype_to_str(uint16_t flow_type)
                {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
                {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
                {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+               {"ipv6-ex", RTE_ETH_FLOW_IPV6_EX},
+               {"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX},
+               {"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX},
                {"port", RTE_ETH_FLOW_PORT},
                {"vxlan", RTE_ETH_FLOW_VXLAN},
                {"geneve", RTE_ETH_FLOW_GENEVE},
                {"nvgre", RTE_ETH_FLOW_NVGRE},
                {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+               {"gtpu", RTE_ETH_FLOW_GTPU},
        };
 
        for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
@@ -5241,7 +5249,7 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
 {
        port->mc_addr_nb--;
        if (addr_idx == port->mc_addr_nb) {
-               /* No need to recompact the set of multicast addressses. */
+               /* No need to recompact the set of multicast addresses. */
                if (port->mc_addr_nb == 0) {
                        /* free the pool of multicast addresses. */
                        free(port->mc_addr_pool);