Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P678
mbufq xmit hack
Active
Public
Actions
Authored by
gallatin
on Tue, Nov 11, 6:40 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F135670861: mbufq xmit hack
Tue, Nov 11, 6:40 PM
2025-11-11 18:40:21 (UTC+0)
Subscribers
None
static int
mlx5e_xmit_locked(if_t ifp, struct mlx5e_sq *sq, struct mbuf *mb)
{
struct mbufq *mq;
struct mbuf *m;
int err = 0;
if (unlikely((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0 ||
READ_ONCE(sq->running) == 0)) {
m_freem(mb);
return (ENETDOWN);
}
/* Do transmit */
if (mb->m_pkthdr.csum_flags & CSUM_EXTX) {
mq = mb->m_pkthdr.ex_txq;
mb->m_pkthdr.ex_txq = NULL;
mb->m_pkthdr.csum_flags &= ~CSUM_EXTX;
while (err == 0 && (m = mbufq_dequeue(mq)) != NULL) {
err = mlx5e_sq_xmit(sq, &m);
if (err != 0) {
m_freem(m);
err = ENOBUFS;
}
}
} else {
err = mlx5e_sq_xmit(sq, &mb);
if (err != 0) {
/* NOTE: m_freem() is NULL safe */
m_freem(mb);
err = ENOBUFS;
}
}
/* Write the doorbell record, if any. */
mlx5e_tx_notify_hw(sq, false);
Event Timeline
gallatin
created this paste.
Tue, Nov 11, 6:40 PM
2025-11-11 18:40:21 (UTC+0)
gallatin
created this object in space
S1 Global
.
Log In to Comment