net/ngbe: support MAC filters
[dpdk.git] / drivers / net / iavf / iavf_fdir.c
index ea2b692..b63aaca 100644 (file)
@@ -431,7 +431,7 @@ iavf_fdir_parse_action_qregion(struct iavf_adapter *ad,
                }
        }
 
-       if (rss->queue[rss->queue_num - 1] >= ad->eth_dev->data->nb_rx_queues) {
+       if (rss->queue[rss->queue_num - 1] >= ad->dev_data->nb_rx_queues) {
                rte_flow_error_set(error, EINVAL,
                                RTE_FLOW_ERROR_TYPE_ACTION, act,
                                "Invalid queue region indexes.");
@@ -511,7 +511,7 @@ iavf_fdir_parse_action(struct iavf_adapter *ad,
                        filter_action->act_conf.queue.index = act_q->index;
 
                        if (filter_action->act_conf.queue.index >=
-                               ad->eth_dev->data->nb_rx_queues) {
+                               ad->dev_data->nb_rx_queues) {
                                rte_flow_error_set(error, EINVAL,
                                        RTE_FLOW_ERROR_TYPE_ACTION,
                                        actions, "Invalid queue for FDIR.");
@@ -1172,7 +1172,10 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
                        if (gtp_psc_spec && gtp_psc_mask) {
                                if (gtp_psc_mask->hdr.qfi == 0x3F) {
                                        input_set |= IAVF_INSET_GTPU_QFI;
-                                       if (gtp_psc_spec->hdr.type ==
+                                       if (!gtp_psc_mask->hdr.type)
+                                               VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
+                                                                                GTPU_EH, QFI);
+                                       else if (gtp_psc_spec->hdr.type ==
                                                                IAVF_GTPU_EH_UPLINK)
                                                VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
                                                                                 GTPU_UP, QFI);
@@ -1180,9 +1183,6 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad,
                                                                IAVF_GTPU_EH_DWLINK)
                                                VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
                                                                                 GTPU_DWN, QFI);
-                                       else
-                                               VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr,
-                                                                                GTPU_EH, QFI);
                                }
 
                                rte_memcpy(hdr->buffer, gtp_psc_spec,