SFC_ASSERT(rxq != NULL);
SFC_ASSERT(rxq->evq == evq);
- SFC_ASSERT(rxq->state & SFC_RXQ_STARTED);
+ SFC_ASSERT(rxq->flags & SFC_RXQ_FLAG_STARTED);
stop = (id + 1) & rxq->ptr_mask;
pending_id = rxq->pending & rxq->ptr_mask;
struct sfc_adapter *sa = evq->sa;
int rc;
- if ((evq->rxq != NULL) && (evq->rxq->state & SFC_RXQ_RUNNING)) {
+ if ((evq->rxq != NULL) &&
+ (evq->rxq->flags & SFC_RXQ_FLAG_RUNNING)) {
unsigned int rxq_sw_index = sfc_rxq_sw_index(evq->rxq);
sfc_warn(sa,
boolean_t discard_next = B_FALSE;
struct rte_mbuf *scatter_pkt = NULL;
- if (unlikely((rxq->state & SFC_RXQ_RUNNING) == 0))
+ if (unlikely((rxq->flags & SFC_RXQ_FLAG_RUNNING) == 0))
return 0;
sfc_ev_qpoll(rxq->evq);
SFC_ASSERT(sw_index < sa->rxq_count);
rxq = sa->rxq_info[sw_index].rxq;
- if (rxq == NULL || (rxq->state & SFC_RXQ_RUNNING) == 0)
+ if (rxq == NULL || (rxq->flags & SFC_RXQ_FLAG_RUNNING) == 0)
return 0;
sfc_ev_qpoll(rxq->evq);
int
sfc_rx_qdesc_done(struct sfc_rxq *rxq, unsigned int offset)
{
- if ((rxq->state & SFC_RXQ_RUNNING) == 0)
+ if ((rxq->flags & SFC_RXQ_FLAG_RUNNING) == 0)
return 0;
sfc_ev_qpoll(rxq->evq);
rxq->pending = rxq->completed = rxq->added = rxq->pushed = 0;
- rxq->state |= (SFC_RXQ_STARTED | SFC_RXQ_RUNNING);
+ rxq->state |= SFC_RXQ_STARTED;
+ rxq->flags |= SFC_RXQ_FLAG_STARTED | SFC_RXQ_FLAG_RUNNING;
sfc_rx_qrefill(rxq);
sa->eth_dev->data->rx_queue_state[sw_index] =
RTE_ETH_QUEUE_STATE_STOPPED;
- rxq->state &= ~SFC_RXQ_RUNNING;
+ rxq->flags &= ~SFC_RXQ_FLAG_RUNNING;
if (sw_index == 0)
efx_mac_filter_default_rxq_clear(sa->nic);
sfc_rx_qflush(sa, sw_index);
+ rxq->flags &= ~SFC_RXQ_FLAG_STARTED;
rxq->state = SFC_RXQ_INITIALIZED;
efx_rx_qdestroy(rxq->common);
#define SFC_RXQ_INITIALIZED (1 << SFC_RXQ_INITIALIZED_BIT)
SFC_RXQ_STARTED_BIT,
#define SFC_RXQ_STARTED (1 << SFC_RXQ_STARTED_BIT)
- SFC_RXQ_RUNNING_BIT,
-#define SFC_RXQ_RUNNING (1 << SFC_RXQ_RUNNING_BIT)
SFC_RXQ_FLUSHING_BIT,
#define SFC_RXQ_FLUSHING (1 << SFC_RXQ_FLUSHING_BIT)
SFC_RXQ_FLUSHED_BIT,
/* Used on data path */
struct sfc_evq *evq;
struct sfc_rx_sw_desc *sw_desc;
- unsigned int state;
+ unsigned int flags;
+#define SFC_RXQ_FLAG_STARTED 0x1
+#define SFC_RXQ_FLAG_RUNNING 0x2
+#define SFC_RXQ_FLAG_RSS_HASH 0x4
unsigned int ptr_mask;
unsigned int pending;
unsigned int completed;
uint16_t batch_max;
uint16_t prefix_size;
-#if EFSYS_OPT_RX_SCALE
- unsigned int flags;
-#define SFC_RXQ_FLAG_RSS_HASH 0x1
-#endif
/* Used on refill */
unsigned int added;
/* Not used on data path */
unsigned int hw_index;
+ unsigned int state;
};
static inline unsigned int