const efx_qword_t *qwordp;
uint16_t pkt_len;
+ /* Buffers to be discarded have 0 in packet type */
+ if (unlikely(m->packet_type == 0)) {
+ rte_mempool_put(rxq->refill_mb_pool, m);
+ goto next_buf;
+ }
+
rx_pkts[n_rx_pkts++] = m;
/* Parse pseudo-header */
EFX_QWORD_FIELD(*qwordp,
ES_EZ_ESSB_RX_PREFIX_MARK);
+next_buf:
m = sfc_ef10_essb_next_mbuf(rxq, m);
} while (todo_bufs-- > 0);
}
if (unlikely(rx_ev.eq_u64[0] &
rte_cpu_to_le_64((1ull << ESF_DZ_RX_ECC_ERR_LBN) |
(1ull << ESF_DZ_RX_ECRC_ERR_LBN) |
- (1ull << ESF_DZ_RX_PARSE_INCOMPLETE_LBN))))
+ (1ull << ESF_DZ_RX_PARSE_INCOMPLETE_LBN)))) {
+ /* Zero packet type is used as a marker to dicard bad packets */
goto done;
+ }
#if SFC_EF10_RX_EV_ENCAP_SUPPORT
switch (EFX_QWORD_FIELD(rx_ev, ESF_EZ_RX_ENCAP_HDR)) {
SFC_ASSERT(false);
}
+ SFC_ASSERT(l2_ptype != 0);
+
done:
m->ol_flags = ol_flags & ol_mask;
m->packet_type = tun_ptype | l2_ptype | l3_ptype | l4_ptype;