FreeBSD Bugzilla – Attachment 173818 Details for
Bug 211962
bxe driver queue soft hangs and flooding tx_soft_errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix bug
bxe.patch (text/plain), 1.41 KB, created by
aler
on 2016-08-18 11:26:03 UTC
(
hide
)
Description:
patch to fix bug
Filename:
MIME Type:
Creator:
aler
Created:
2016-08-18 11:26:03 UTC
Size:
1.41 KB
patch
obsolete
>diff -ur 10.3/sys/dev/bxe/bxe.c src/sys/dev/bxe/bxe.c >--- 10.3/sys/dev/bxe/bxe.c 2016-08-17 15:46:37.763553000 +0300 >+++ src/sys/dev/bxe/bxe.c 2016-08-18 14:20:39.990393000 +0300 >@@ -5719,10 +5719,10 @@ > { > struct buf_ring *tx_br = fp->tx_br; > struct mbuf *next; >- int depth, rc, tx_count; >+ int depth, rc, rc_save, tx_count; > uint16_t tx_bd_avail; > >- rc = tx_count = 0; >+ rc = rc_save = tx_count = 0; > > BXE_FP_TX_LOCK_ASSERT(fp); > >@@ -5749,12 +5749,13 @@ > next = drbr_dequeue(ifp, tx_br); > } else if (drbr_needs_enqueue(ifp, tx_br)) { > /* have both new and pending work, maintain packet order */ >- rc = drbr_enqueue(ifp, tx_br, m); >- if (rc != 0) { >+ /* first dequeue pending packet to make sure we have room for new and avoid semi-deadlock */ >+ next = drbr_dequeue(ifp, tx_br); >+ /* now enqueue new packet, save error code but don't fail anyway, we need to handle dequeued packet */ >+ rc_save = drbr_enqueue(ifp, tx_br, m); >+ if (rc_save != 0) { > fp->eth_q_stats.tx_soft_errors++; >- goto bxe_tx_mq_start_locked_exit; > } >- next = drbr_dequeue(ifp, tx_br); > } else { > /* new work only and nothing pending */ > next = m; >@@ -5815,6 +5816,9 @@ > > bxe_tx_mq_start_locked_exit: > >+ if (rc_save != 0) { >+ return (rc_save); >+ } > return (rc); > } > >Only in src/sys/dev/bxe: bxe.c.debug
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 211962
: 173818