net/mlx: fix debug build with gcc 6.1
[dpdk.git] / drivers / net / mlx5 / mlx5_rxq.c
index 908fd0f..8e02440 100644 (file)
 /* Verbs header. */
 /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
 #ifdef PEDANTIC
-#pragma GCC diagnostic ignored "-pedantic"
+#pragma GCC diagnostic ignored "-Wpedantic"
 #endif
 #include <infiniband/verbs.h>
 #include <infiniband/arch.h>
 #include <infiniband/mlx5_hw.h>
 #ifdef PEDANTIC
-#pragma GCC diagnostic error "-pedantic"
+#pragma GCC diagnostic error "-Wpedantic"
 #endif
 
 /* DPDK headers don't like -pedantic. */
 #ifdef PEDANTIC
-#pragma GCC diagnostic ignored "-pedantic"
+#pragma GCC diagnostic ignored "-Wpedantic"
 #endif
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 #include <rte_ethdev.h>
 #include <rte_common.h>
 #ifdef PEDANTIC
-#pragma GCC diagnostic error "-pedantic"
+#pragma GCC diagnostic error "-Wpedantic"
 #endif
 
 #include "mlx5.h"
@@ -269,7 +269,7 @@ priv_flow_attr(struct priv *priv, struct ibv_exp_flow_attr *flow_attr,
 static enum hash_rxq_type
 hash_rxq_type_from_pos(const struct ind_table_init *table, unsigned int pos)
 {
-       enum hash_rxq_type type = 0;
+       enum hash_rxq_type type = HASH_RXQ_TCPV4;
 
        assert(pos < table->hash_types_n);
        do {
@@ -609,9 +609,11 @@ priv_allow_flow_type(struct priv *priv, enum hash_rxq_flow_type type)
 int
 priv_rehash_flows(struct priv *priv)
 {
-       unsigned int i;
+       enum hash_rxq_flow_type i;
 
-       for (i = 0; (i != RTE_DIM((*priv->hash_rxqs)[0].special_flow)); ++i)
+       for (i = HASH_RXQ_FLOW_TYPE_PROMISC;
+                       i != RTE_DIM((*priv->hash_rxqs)[0].special_flow);
+                       ++i)
                if (!priv_allow_flow_type(priv, i)) {
                        priv_special_flow_disable(priv, i);
                } else {
@@ -743,6 +745,8 @@ rxq_cleanup(struct rxq_ctrl *rxq_ctrl)
 
        DEBUG("cleaning up %p", (void *)rxq_ctrl);
        rxq_free_elts(rxq_ctrl);
+       if (rxq_ctrl->fdir_queue != NULL)
+               priv_fdir_queue_destroy(rxq_ctrl->priv, rxq_ctrl->fdir_queue);
        if (rxq_ctrl->if_wq != NULL) {
                assert(rxq_ctrl->priv != NULL);
                assert(rxq_ctrl->priv->ctx != NULL);