Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144316878
D29907.id89234.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29907.id89234.diff
View Options
diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c
--- a/sys/dev/cxgbe/tom/t4_cpl_io.c
+++ b/sys/dev/cxgbe/tom/t4_cpl_io.c
@@ -1081,8 +1081,34 @@
return;
}
- if (drop)
+ if (drop) {
+ struct socket *so = inp->inp_socket;
+ struct sockbuf *sb = &so->so_snd;
+ int sbu;
+
+ /*
+ * An unlocked read is ok here as the data should only
+ * transition from a non-zero value to either another
+ * non-zero value or zero. Once it is zero it should
+ * stay zero.
+ */
+ if (__predict_false(sbused(sb)) > 0) {
+ SOCKBUF_LOCK(sb);
+ sbu = sbused(sb);
+ if (sbu > 0) {
+ /*
+ * The data transmitted before the
+ * tid's ULP mode changed to ISCSI is
+ * still in so_snd. Incoming credits
+ * should account for so_snd first.
+ */
+ sbdrop_locked(sb, min(sbu, drop));
+ drop -= min(sbu, drop);
+ }
+ sowwakeup_locked(so); /* unlocks so_snd */
+ }
rqdrop_locked(&toep->ulp_pdu_reclaimq, drop);
+ }
while ((sndptr = mbufq_first(pduq)) != NULL) {
wr = write_iscsi_mbuf_wr(toep, sndptr);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 8, 7:44 PM (17 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28490785
Default Alt Text
D29907.id89234.diff (1 KB)
Attached To
Mode
D29907: cxgbe tom: Account for pre-iSCSI mode data on suspended connections.
Attached
Detach File
Event Timeline
Log In to Comment