read_filter_mode_and_ingress_config(adap);
/*
- * For T6, cache the adapter's compressed error vector
- * and passing outer header info for encapsulated packets.
+ * Cache a mask of the bits that represent the error vector portion of
+ * rx_pkt.err_vec. T6+ can use a compressed error vector to make room
+ * for information about outer encapsulation (GENEVE/VXLAN/NVGRE).
*/
+ tpp->err_vec_mask = htobe16(0xffff);
if (chip_id(adap) > CHELSIO_T5) {
v = t4_read_reg(adap, A_TP_OUT_CONFIG);
- tpp->rx_pkt_encap = (v & F_CRXPKTENC) ? 1 : 0;
+ if (v & F_CRXPKTENC) {
+ tpp->err_vec_mask =
+ htobe16(V_T6_COMPR_RXERR_VEC(M_T6_COMPR_RXERR_VEC));
+ }
}
return 0;
#define S_T6_COMPR_RXERR_VEC 0
#define M_T6_COMPR_RXERR_VEC 0x3F
-#define V_T6_COMPR_RXERR_VEC(x) ((x) << S_T6_COMPR_RXERR_LEN)
+#define V_T6_COMPR_RXERR_VEC(x) ((x) << S_T6_COMPR_RXERR_VEC)
#define G_T6_COMPR_RXERR_VEC(x) \
(((x) >> S_T6_COMPR_RXERR_VEC) & M_T6_COMPR_RXERR_VEC)
M_HASHTYPE_SET(m0, sw_hashtype[rss->hash_type][rss->ipv6]);
m0->m_pkthdr.flowid = be32toh(rss->hash_val);
- if (cpl->csum_calc && !cpl->err_vec) {
+ if (cpl->csum_calc && !(cpl->err_vec & sc->params.tp.err_vec_mask)) {
if (ifp->if_capenable & IFCAP_RXCSUM &&
cpl->l2info & htobe32(F_RXF_IP)) {
m0->m_pkthdr.csum_flags = (CSUM_IP_CHECKED |