mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-31 12:13:10 +00:00
Prevent hang on ATCA-7220 when transmitting packets < 60 bytes.
This commit is contained in:
parent
d0ebf478da
commit
fcd5eed4f0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243264
@ -116,6 +116,19 @@ int cvm_oct_xmit(struct mbuf *m, struct ifnet *ifp)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OCTEON_VENDOR_RADISYS
|
||||
/*
|
||||
* The RSYS4GBE will hang if asked to transmit a packet less than 60 bytes.
|
||||
*/
|
||||
if (__predict_false(m->m_pkthdr.len < 60) &&
|
||||
cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) {
|
||||
static uint8_t pad[60];
|
||||
|
||||
if (!m_append(m, sizeof pad - m->m_pkthdr.len, pad))
|
||||
printf("%s: unable to pad small packet.", __func__);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If the packet is not fragmented.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user