Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159472848
D38577.id117164.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
D38577.id117164.diff
View Options
diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -1404,7 +1404,6 @@
void t4_register_cpl_handler(int, cpl_handler_t);
void t4_register_shared_cpl_handler(int, cpl_handler_t, int);
#ifdef RATELIMIT
-int ethofld_transmit(struct ifnet *, struct mbuf *);
void send_etid_flush_wr(struct cxgbe_rate_tag *);
#endif
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -3062,16 +3062,16 @@
rc = parse_pkt(&m, vi->flags & TX_USES_VM_WR);
if (__predict_false(rc != 0)) {
+ if (__predict_true(rc == EINPROGRESS)) {
+ /* queued by parse_pkt */
+ MPASS(m != NULL);
+ return (0);
+ }
+
MPASS(m == NULL); /* was freed already */
atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is ok */
return (rc);
}
-#ifdef RATELIMIT
- if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) {
- if (m->m_pkthdr.snd_tag->sw->type == IF_SND_TAG_TYPE_RATE_LIMIT)
- return (ethofld_transmit(ifp, m));
- }
-#endif
/* Select a txq. */
sc = vi->adapter;
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -345,6 +345,7 @@
#endif
static int ethofld_fw4_ack(struct sge_iq *, const struct rss_header *,
struct mbuf *);
+static int ethofld_transmit(struct ifnet *, struct mbuf *);
#endif
static counter_u64_t extfree_refs;
@@ -2962,6 +2963,10 @@
set_mbuf_eo_nsegs(m0, nsegs);
set_mbuf_eo_len16(m0,
txpkt_eo_len16(nsegs, immhdrs, needs_tso(m0)));
+ rc = ethofld_transmit(mst->ifp, m0);
+ if (rc != 0)
+ goto fail;
+ return (EINPROGRESS);
}
#endif
#endif
@@ -6849,7 +6854,7 @@
}
}
-int
+static int
ethofld_transmit(struct ifnet *ifp, struct mbuf *m0)
{
struct cxgbe_rate_tag *cst;
@@ -6905,8 +6910,6 @@
done:
mtx_unlock(&cst->lock);
- if (__predict_false(rc != 0))
- m_freem(m0);
return (rc);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 15, 2:49 PM (15 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33970624
Default Alt Text
D38577.id117164.diff (1 KB)
Attached To
Mode
D38577: cxgbe: Allow parse_pkt to internally queue a packet.
Attached
Detach File
Event Timeline
Log In to Comment