net/sfc/base: improve RxQ label init prototype
authorAndrew Rybchenko <arybchenko@solarflare.com>
Thu, 16 Nov 2017 08:04:06 +0000 (08:04 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
RxQ type provides more information which may be useful to
setup event queue appropriately.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/base/ef10_ev.c
drivers/net/sfc/base/ef10_impl.h
drivers/net/sfc/base/ef10_rx.c

index d9389da..eb9ec75 100644 (file)
@@ -1336,9 +1336,11 @@ ef10_ev_rxlabel_init(
        __in            efx_evq_t *eep,
        __in            efx_rxq_t *erp,
        __in            unsigned int label,
-       __in            boolean_t packed_stream)
+       __in            efx_rxq_type_t type)
 {
        efx_evq_rxq_state_t *eersp;
+       boolean_t packed_stream = (type >= EFX_RXQ_TYPE_PACKED_STREAM_1M) &&
+           (type <= EFX_RXQ_TYPE_PACKED_STREAM_64K);
 
        EFSYS_ASSERT3U(label, <, EFX_ARRAY_SIZE(eep->ee_rxq_state));
        eersp = &eep->ee_rxq_state[label];
index d913c6c..ad33da3 100644 (file)
@@ -117,7 +117,7 @@ ef10_ev_rxlabel_init(
        __in            efx_evq_t *eep,
        __in            efx_rxq_t *erp,
        __in            unsigned int label,
-       __in            boolean_t packed_stream);
+       __in            efx_rxq_type_t type);
 
                void
 ef10_ev_rxlabel_fini(
index da1c645..53ea054 100644 (file)
@@ -978,7 +978,7 @@ ef10_rx_qcreate(
        erp->er_eep = eep;
        erp->er_label = label;
 
-       ef10_ev_rxlabel_init(eep, erp, label, ps_buf_size != 0);
+       ef10_ev_rxlabel_init(eep, erp, label, type);
 
        return (0);