Changeset View
Changeset View
Standalone View
Standalone View
bnxt_txrx.c
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | bnxt_isc_txd_encap(void *sc, if_pkt_info_t pi) | ||||
need_hi = true; | need_hi = true; | ||||
pi->ipi_new_pidx = pi->ipi_pidx; | pi->ipi_new_pidx = pi->ipi_pidx; | ||||
tbd = &((struct tx_bd_long *)txr->vaddr)[pi->ipi_new_pidx]; | tbd = &((struct tx_bd_long *)txr->vaddr)[pi->ipi_new_pidx]; | ||||
pi->ipi_ndescs = 0; | pi->ipi_ndescs = 0; | ||||
/* No need to byte-swap the opaque value */ | /* No need to byte-swap the opaque value */ | ||||
tbd->opaque = ((pi->ipi_nsegs + need_hi) << 24) | pi->ipi_new_pidx; | tbd->opaque = ((pi->ipi_nsegs + need_hi) << 24) | pi->ipi_new_pidx; | ||||
tbd->len = htole16(pi->ipi_segs[seg].ds_len); | tbd->len = htole16(pi->ipi_segs[seg].ds_len); | ||||
/* Few BRCM A0 NICs requires padding for shorter than 52 byte pkts */ | |||||
shurd: Which NICs? A0 of what chip? Why should all chips have this limit enforce if it only affects… | |||||
bhargava.marreddy_broadcom.comAuthorUnsubmitted Not Done Inline ActionsStephen, Linux driver is doing it for all NICs, I'll check with firmware team and get back. Thanks bhargava.marreddy_broadcom.com: Stephen,
Linux driver is doing it for all NICs, I'll check with firmware team and get back. | |||||
shurdUnsubmitted Not Done Inline ActionsWell, it certainly looks wrong... I don't think there's a guarantee that the address has extra bytes available, and nothing is zeroing those bytes. Further, since the minimum Ethernet frame size is 64, and an Ethernet packet contains a frame, I don't even know how you're generating traffic that would require padding... it seems like those would be invalid Ethernet packets regardless. How are you testing this padding? shurd: Well, it certainly looks wrong... I don't think there's a guarantee that the address has extra… | |||||
if (tbd->len < BNXT_MIN_PKT_SIZE) { | |||||
tbd->len = BNXT_MIN_PKT_SIZE; | |||||
} | |||||
tbd->addr = htole64(pi->ipi_segs[seg++].ds_addr); | tbd->addr = htole64(pi->ipi_segs[seg++].ds_addr); | ||||
flags_type = ((pi->ipi_nsegs + need_hi) << | flags_type = ((pi->ipi_nsegs + need_hi) << | ||||
TX_BD_SHORT_FLAGS_BD_CNT_SFT) & TX_BD_SHORT_FLAGS_BD_CNT_MASK; | TX_BD_SHORT_FLAGS_BD_CNT_SFT) & TX_BD_SHORT_FLAGS_BD_CNT_MASK; | ||||
if (pi->ipi_len >= 2048) | if (pi->ipi_len >= 2048) | ||||
flags_type |= TX_BD_SHORT_FLAGS_LHINT_GTE2K; | flags_type |= TX_BD_SHORT_FLAGS_LHINT_GTE2K; | ||||
else | else | ||||
flags_type |= bnxt_tx_lhint[pi->ipi_len >> 9]; | flags_type |= bnxt_tx_lhint[pi->ipi_len >> 9]; | ||||
▲ Show 20 Lines • Show All 556 Lines • Show Last 20 Lines |
Which NICs? A0 of what chip? Why should all chips have this limit enforce if it only affects a few A0s?