X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Fbnxt_rxr.c;h=11807f40949adf18bf367f39ea63b7cb519d9f16;hb=8c7449779c4526d27205043560a21f0e2c2f622b;hp=91ff7290425b1c831295fe7f8389800691cd0e17;hpb=2e449a26e7e81632dac39ff975081473c90e7b73;p=dpdk.git diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 91ff729042..11807f4094 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -412,7 +412,13 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1, bool gfid = false; uint32_t mark_id; uint32_t flags2; + uint32_t gfid_support = 0; int rc; + uint32_t vfr_flag; + + + if (BNXT_GFID_ENABLED(bp)) + gfid_support = 1; cfa_code = rte_le_to_cpu_16(rxcmp1->cfa_code); flags2 = rte_le_to_cpu_32(rxcmp1->flags2); @@ -427,8 +433,14 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1, switch (meta_fmt) { case 0: - /* Not an LFID or GFID, a flush cmd. */ - goto skip_mark; + if (gfid_support) { + /* Not an LFID or GFID, a flush cmd. */ + goto skip_mark; + } else { + /* LFID mode, no vlan scenario */ + gfid = false; + } + break; case 4: case 5: /* @@ -437,13 +449,19 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1, * collisions with EEM. Simply return without setting the mark * in the mbuf. */ - if (BNXT_CFA_META_EM_TEST(meta)) - goto skip_mark; - /* - * It is a TCAM entry, so it is an LFID. The TCAM IDX and Mode - * can also be determined by decoding the meta_data. We are not - * using these for now. - */ + if (BNXT_CFA_META_EM_TEST(meta)) { + /*This is EM hit {EM(1), GFID[27:16], 19'd0 or vtag } */ + gfid = true; + meta >>= BNXT_RX_META_CFA_CODE_SHIFT; + cfa_code |= meta << BNXT_CFA_CODE_META_SHIFT; + } else { + /* + * It is a TCAM entry, so it is an LFID. + * The TCAM IDX and Mode can also be determined + * by decoding the meta_data. We are not + * using these for now. + */ + } break; case 6: case 7: @@ -466,7 +484,7 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1, } rc = ulp_mark_db_mark_get(bp->ulp_ctx, gfid, - cfa_code, &mark_id); + cfa_code, &vfr_flag, &mark_id); if (!rc) { /* Got the mark, write it to the mbuf and return */ mbuf->hash.fdir.hi = mark_id;