X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fice%2Fice_switch_filter.c;h=6b0c1bff1ec81632a3d74a66333db86caa107a9a;hb=78156d38e112b33032eedfada65b0df8b047bc31;hp=bbd2805c37963f2c64bea122406117a8cad0ce0a;hpb=b43045eedeebb15354d85babdb84171a1073aa9d;p=dpdk.git diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index bbd2805c37..6b0c1bff1e 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -31,6 +31,7 @@ #define ICE_PPP_IPV4_PROTO 0x0021 #define ICE_PPP_IPV6_PROTO 0x0057 #define ICE_IPV4_PROTO_NVGRE 0x002F +#define ICE_SW_PRI_BASE 6 #define ICE_SW_INSET_ETHER ( \ ICE_INSET_DMAC | ICE_INSET_SMAC | ICE_INSET_ETHERTYPE) @@ -1370,7 +1371,7 @@ ice_switch_parse_pattern(const struct rte_flow_item pattern[], return false; } if (gtp_psc_spec && gtp_psc_mask) { - if (gtp_psc_mask->pdu_type) { + if (gtp_psc_mask->hdr.type) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, @@ -1378,13 +1379,13 @@ ice_switch_parse_pattern(const struct rte_flow_item pattern[], return false; } input = &outer_input_set; - if (gtp_psc_mask->qfi) + if (gtp_psc_mask->hdr.qfi) *input |= ICE_INSET_GTPU_QFI; list[t].type = ICE_GTP; list[t].h_u.gtp_hdr.qfi = - gtp_psc_spec->qfi; + gtp_psc_spec->hdr.qfi; list[t].m_u.gtp_hdr.qfi = - gtp_psc_mask->qfi; + gtp_psc_mask->hdr.qfi; input_set_byte += 1; t++; } @@ -1592,7 +1593,10 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad, rule_info->sw_act.src = rule_info->sw_act.vsi_handle; rule_info->sw_act.flag = ICE_FLTR_RX; rule_info->rx = 1; - rule_info->priority = 6 - priority; + /* 0 denotes lowest priority of recipe and highest priority + * of rte_flow. Change rte_flow priority into recipe priority. + */ + rule_info->priority = ICE_SW_PRI_BASE - priority; return 0; } @@ -1671,7 +1675,10 @@ ice_switch_parse_action(struct ice_pf *pf, rule_info->sw_act.vsi_handle = vsi->idx; rule_info->rx = 1; rule_info->sw_act.src = vsi->idx; - rule_info->priority = priority + 5; + /* 0 denotes lowest priority of recipe and highest priority + * of rte_flow. Change rte_flow priority into recipe priority. + */ + rule_info->priority = ICE_SW_PRI_BASE - priority; return 0;