Change local variable tso_segsz to tsosegsz to avoid mbuf.h macro conflicts.
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
aaea33e51f
commit
edd26b66ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254803
@ -1690,7 +1690,7 @@ jme_encap(struct jme_softc *sc, struct mbuf **m_head)
|
||||
struct mbuf *m;
|
||||
bus_dma_segment_t txsegs[JME_MAXTXSEGS];
|
||||
int error, i, nsegs, prod;
|
||||
uint32_t cflags, tso_segsz;
|
||||
uint32_t cflags, tsosegsz;
|
||||
|
||||
JME_LOCK_ASSERT(sc);
|
||||
|
||||
@ -1808,10 +1808,10 @@ jme_encap(struct jme_softc *sc, struct mbuf **m_head)
|
||||
|
||||
m = *m_head;
|
||||
cflags = 0;
|
||||
tso_segsz = 0;
|
||||
tsosegsz = 0;
|
||||
/* Configure checksum offload and TSO. */
|
||||
if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) {
|
||||
tso_segsz = (uint32_t)m->m_pkthdr.tso_segsz <<
|
||||
tsosegsz = (uint32_t)m->m_pkthdr.tso_segsz <<
|
||||
JME_TD_MSS_SHIFT;
|
||||
cflags |= JME_TD_TSO;
|
||||
} else {
|
||||
@ -1830,7 +1830,7 @@ jme_encap(struct jme_softc *sc, struct mbuf **m_head)
|
||||
|
||||
desc = &sc->jme_rdata.jme_tx_ring[prod];
|
||||
desc->flags = htole32(cflags);
|
||||
desc->buflen = htole32(tso_segsz);
|
||||
desc->buflen = htole32(tsosegsz);
|
||||
desc->addr_hi = htole32(m->m_pkthdr.len);
|
||||
desc->addr_lo = 0;
|
||||
sc->jme_cdata.jme_tx_cnt++;
|
||||
|
@ -2390,7 +2390,7 @@ nfe_encap(struct nfe_softc *sc, struct mbuf **m_head)
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t segs[NFE_MAX_SCATTER];
|
||||
int error, i, nsegs, prod, si;
|
||||
uint32_t tso_segsz;
|
||||
uint32_t tsosegsz;
|
||||
uint16_t cflags, flags;
|
||||
struct mbuf *m;
|
||||
|
||||
@ -2429,9 +2429,9 @@ nfe_encap(struct nfe_softc *sc, struct mbuf **m_head)
|
||||
|
||||
m = *m_head;
|
||||
cflags = flags = 0;
|
||||
tso_segsz = 0;
|
||||
tsosegsz = 0;
|
||||
if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) {
|
||||
tso_segsz = (uint32_t)m->m_pkthdr.tso_segsz <<
|
||||
tsosegsz = (uint32_t)m->m_pkthdr.tso_segsz <<
|
||||
NFE_TX_TSO_SHIFT;
|
||||
cflags &= ~(NFE_TX_IP_CSUM | NFE_TX_TCP_UDP_CSUM);
|
||||
cflags |= NFE_TX_TSO;
|
||||
@ -2482,14 +2482,14 @@ nfe_encap(struct nfe_softc *sc, struct mbuf **m_head)
|
||||
if ((m->m_flags & M_VLANTAG) != 0)
|
||||
desc64->vtag = htole32(NFE_TX_VTAG |
|
||||
m->m_pkthdr.ether_vtag);
|
||||
if (tso_segsz != 0) {
|
||||
if (tsosegsz != 0) {
|
||||
/*
|
||||
* XXX
|
||||
* The following indicates the descriptor element
|
||||
* is a 32bit quantity.
|
||||
*/
|
||||
desc64->length |= htole16((uint16_t)tso_segsz);
|
||||
desc64->flags |= htole16(tso_segsz >> 16);
|
||||
desc64->length |= htole16((uint16_t)tsosegsz);
|
||||
desc64->flags |= htole16(tsosegsz >> 16);
|
||||
}
|
||||
/*
|
||||
* finally, set the valid/checksum/TSO bit in the first
|
||||
@ -2502,14 +2502,14 @@ nfe_encap(struct nfe_softc *sc, struct mbuf **m_head)
|
||||
else
|
||||
desc32->flags |= htole16(NFE_TX_LASTFRAG_V1);
|
||||
desc32 = &sc->txq.desc32[si];
|
||||
if (tso_segsz != 0) {
|
||||
if (tsosegsz != 0) {
|
||||
/*
|
||||
* XXX
|
||||
* The following indicates the descriptor element
|
||||
* is a 32bit quantity.
|
||||
*/
|
||||
desc32->length |= htole16((uint16_t)tso_segsz);
|
||||
desc32->flags |= htole16(tso_segsz >> 16);
|
||||
desc32->length |= htole16((uint16_t)tsosegsz);
|
||||
desc32->flags |= htole16(tsosegsz >> 16);
|
||||
}
|
||||
/*
|
||||
* finally, set the valid/checksum/TSO bit in the first
|
||||
|
Loading…
Reference in New Issue
Block a user