mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
sfxge: switch to TxQ creation specific flags
It is better do not mix TxQ creation and receive event flags since only checksum flags are applicable to TxQ. Also it will allow to add a new TxQ creation specific flags. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4389
This commit is contained in:
parent
57396b7a90
commit
9dd0e15fab
4 changed files with 15 additions and 8 deletions
|
|
@ -2028,6 +2028,9 @@ efx_tx_fini(
|
|||
|
||||
#define EFX_TXQ_MAX_BUFS 8 /* Maximum independent of EFX_BUG35388_WORKAROUND. */
|
||||
|
||||
#define EFX_TXQ_CKSUM_IPV4 0x0001
|
||||
#define EFX_TXQ_CKSUM_TCPUDP 0x0002
|
||||
|
||||
extern __checkReturn efx_rc_t
|
||||
efx_tx_qcreate(
|
||||
__in efx_nic_t *enp,
|
||||
|
|
|
|||
|
|
@ -921,9 +921,9 @@ falconsiena_tx_qcreate(
|
|||
|
||||
EFX_SET_OWORD_FIELD(oword, FRF_BZ_TX_NON_IP_DROP_DIS, 1);
|
||||
EFX_SET_OWORD_FIELD(oword, FRF_BZ_TX_IP_CHKSM_DIS,
|
||||
(flags & EFX_CKSUM_IPV4) ? 0 : 1);
|
||||
(flags & EFX_TXQ_CKSUM_IPV4) ? 0 : 1);
|
||||
EFX_SET_OWORD_FIELD(oword, FRF_BZ_TX_TCP_CHKSM_DIS,
|
||||
(flags & EFX_CKSUM_TCPUDP) ? 0 : 1);
|
||||
(flags & EFX_TXQ_CKSUM_TCPUDP) ? 0 : 1);
|
||||
|
||||
EFX_BAR_TBL_WRITEO(enp, FR_AZ_TX_DESC_PTR_TBL,
|
||||
etp->et_index, &oword, B_TRUE);
|
||||
|
|
|
|||
|
|
@ -90,8 +90,10 @@ efx_mcdi_init_txq(
|
|||
|
||||
MCDI_IN_POPULATE_DWORD_6(req, INIT_TXQ_IN_FLAGS,
|
||||
INIT_TXQ_IN_FLAG_BUFF_MODE, 0,
|
||||
INIT_TXQ_IN_FLAG_IP_CSUM_DIS, (flags & EFX_CKSUM_IPV4) ? 0 : 1,
|
||||
INIT_TXQ_IN_FLAG_TCP_CSUM_DIS, (flags & EFX_CKSUM_TCPUDP) ? 0 : 1,
|
||||
INIT_TXQ_IN_FLAG_IP_CSUM_DIS,
|
||||
(flags & EFX_TXQ_CKSUM_IPV4) ? 0 : 1,
|
||||
INIT_TXQ_IN_FLAG_TCP_CSUM_DIS,
|
||||
(flags & EFX_TXQ_CKSUM_TCPUDP) ? 0 : 1,
|
||||
INIT_TXQ_IN_FLAG_TCP_UDP_ONLY, 0,
|
||||
INIT_TXQ_IN_CRC_MODE, 0,
|
||||
INIT_TXQ_IN_FLAG_TIMESTAMP, 0);
|
||||
|
|
@ -210,8 +212,10 @@ hunt_tx_qcreate(
|
|||
EFX_POPULATE_QWORD_4(desc,
|
||||
ESF_DZ_TX_DESC_IS_OPT, 1,
|
||||
ESF_DZ_TX_OPTION_TYPE, ESE_DZ_TX_OPTION_DESC_CRC_CSUM,
|
||||
ESF_DZ_TX_OPTION_UDP_TCP_CSUM, (flags & EFX_CKSUM_TCPUDP) ? 1 : 0,
|
||||
ESF_DZ_TX_OPTION_IP_CSUM, (flags & EFX_CKSUM_IPV4) ? 1 : 0);
|
||||
ESF_DZ_TX_OPTION_UDP_TCP_CSUM,
|
||||
(flags & EFX_TXQ_CKSUM_TCPUDP) ? 1 : 0,
|
||||
ESF_DZ_TX_OPTION_IP_CSUM,
|
||||
(flags & EFX_TXQ_CKSUM_IPV4) ? 1 : 0);
|
||||
|
||||
EFSYS_MEM_WRITEQ(etp->et_esmp, 0, &desc);
|
||||
hunt_tx_qpush(etp, *addedp, 0);
|
||||
|
|
|
|||
|
|
@ -1439,10 +1439,10 @@ sfxge_tx_qstart(struct sfxge_softc *sc, unsigned int index)
|
|||
flags = 0;
|
||||
break;
|
||||
case SFXGE_TXQ_IP_CKSUM:
|
||||
flags = EFX_CKSUM_IPV4;
|
||||
flags = EFX_TXQ_CKSUM_IPV4;
|
||||
break;
|
||||
case SFXGE_TXQ_IP_TCP_UDP_CKSUM:
|
||||
flags = EFX_CKSUM_IPV4 | EFX_CKSUM_TCPUDP;
|
||||
flags = EFX_TXQ_CKSUM_IPV4 | EFX_TXQ_CKSUM_TCPUDP;
|
||||
break;
|
||||
default:
|
||||
KASSERT(0, ("Impossible TX queue"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue