From: Andrew Rybchenko Date: Thu, 16 Nov 2017 08:04:10 +0000 (+0000) Subject: net/sfc/base: provide simple access to RxQ state in EvQ X-Git-Tag: spdx-start~663 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=01ef4004593c9051f729a247442de0a5386e4cbd;p=dpdk.git net/sfc/base: provide simple access to RxQ state in EvQ Packed stream Rx datapath requires access to packed stream state stored in event queue. Number of credits is upstead in event handler on a new buffer, packets parsing on 64k boundary crossing and Rx doorbell push to give credits back. Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/base/ef10_rx.c b/drivers/net/sfc/base/ef10_rx.c index 6a301c14f2..534a06e5b8 100644 --- a/drivers/net/sfc/base/ef10_rx.c +++ b/drivers/net/sfc/base/ef10_rx.c @@ -784,8 +784,7 @@ ef10_rx_qpush_ps_credits( { efx_nic_t *enp = erp->er_enp; efx_dword_t dword; - efx_evq_rxq_state_t *rxq_state = - &erp->er_eep->ee_rxq_state[erp->er_label]; + efx_evq_rxq_state_t *rxq_state = erp->er_ev_qstate; uint32_t credits; EFSYS_ASSERT(rxq_state->eers_rx_packed_stream); @@ -834,8 +833,7 @@ ef10_rx_qps_packet_info( uint16_t buf_len; uint8_t *pkt_start; efx_qword_t *qwordp; - efx_evq_rxq_state_t *rxq_state = - &erp->er_eep->ee_rxq_state[erp->er_label]; + efx_evq_rxq_state_t *rxq_state = erp->er_ev_qstate; EFSYS_ASSERT(rxq_state->eers_rx_packed_stream); @@ -994,6 +992,8 @@ ef10_rx_qcreate( ef10_ev_rxlabel_init(eep, erp, label, type); + erp->er_ev_qstate = &erp->er_eep->ee_rxq_state[label]; + return (0); fail6: diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h index 1fd5c717be..dabb65d3f7 100644 --- a/drivers/net/sfc/base/efx_impl.h +++ b/drivers/net/sfc/base/efx_impl.h @@ -761,6 +761,7 @@ struct efx_rxq_s { unsigned int er_label; unsigned int er_mask; efsys_mem_t *er_esmp; + efx_evq_rxq_state_t *er_ev_qstate; }; #define EFX_RXQ_MAGIC 0x15022005