((_ndesc) - 1 /* head must not step on tail */ - \
1 /* Rx error */ - 1 /* flush */)
+/** Invalid user mark value when the mark should be treated as unset */
+#define SFC_EF100_USER_MARK_INVALID 0
+
struct sfc_ef100_rx_sw_desc {
struct rte_mbuf *mbuf;
};
SFC_EF100_RX_PREFIX_FIELD(LENGTH, B_FALSE),
SFC_EF100_RX_PREFIX_FIELD(RSS_HASH_VALID, B_FALSE),
- SFC_EF100_RX_PREFIX_FIELD(USER_FLAG, B_FALSE),
SFC_EF100_RX_PREFIX_FIELD(CLASS, B_FALSE),
SFC_EF100_RX_PREFIX_FIELD(RSS_HASH, B_FALSE),
SFC_EF100_RX_PREFIX_FIELD(USER_MARK, B_FALSE),
ESF_GZ_RX_PREFIX_RSS_HASH);
}
- if ((rxq->flags & SFC_EF100_RXQ_USER_MARK) &&
- EFX_TEST_OWORD_BIT(rx_prefix[0], ESF_GZ_RX_PREFIX_USER_FLAG_LBN)) {
- ol_flags |= PKT_RX_FDIR_ID;
+ if (rxq->flags & SFC_EF100_RXQ_USER_MARK) {
+ uint32_t user_mark;
+
/* EFX_OWORD_FIELD converts little-endian to CPU */
- m->hash.fdir.hi = EFX_OWORD_FIELD(rx_prefix[0],
- ESF_GZ_RX_PREFIX_USER_MARK);
+ user_mark = EFX_OWORD_FIELD(rx_prefix[0],
+ ESF_GZ_RX_PREFIX_USER_MARK);
+ if (user_mark != SFC_EF100_USER_MARK_INVALID) {
+ ol_flags |= PKT_RX_FDIR_ID;
+ m->hash.fdir.hi = user_mark;
+ }
}
m->ol_flags = ol_flags;
rxq->flags &= ~SFC_EF100_RXQ_RSS_HASH;
if ((unsup_rx_prefix_fields &
- ((1U << EFX_RX_PREFIX_FIELD_USER_FLAG) |
- (1U << EFX_RX_PREFIX_FIELD_USER_MARK))) == 0)
+ (1U << EFX_RX_PREFIX_FIELD_USER_MARK)) == 0)
rxq->flags |= SFC_EF100_RXQ_USER_MARK;
else
rxq->flags &= ~SFC_EF100_RXQ_USER_MARK;