Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142446902
D5325.id13423.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
D5325.id13423.diff
View Options
Index: sys/dev/vnic/nicvf_main.c
===================================================================
--- sys/dev/vnic/nicvf_main.c
+++ sys/dev/vnic/nicvf_main.c
@@ -663,11 +663,18 @@
mbuf = mtmp;
}
}
+
+ if (NICVF_TX_TRYLOCK(sq) != 0) {
+ err = nicvf_tx_mbuf_locked(sq, mbuf);
+ NICVF_TX_UNLOCK(sq);
+ return (err);
+ } else {
err = drbr_enqueue(ifp, sq->br, mbuf);
if (err != 0)
return (err);
- taskqueue_enqueue(sq->snd_taskq, &sq->snd_task);
+ taskqueue_enqueue(sq->snd_taskq, &sq->snd_task);
+ }
return (0);
}
Index: sys/dev/vnic/nicvf_queues.h
===================================================================
--- sys/dev/vnic/nicvf_queues.h
+++ sys/dev/vnic/nicvf_queues.h
@@ -385,6 +385,8 @@
void nicvf_clear_intr(struct nicvf *, int, int);
int nicvf_is_intr_enabled(struct nicvf *, int, int);
+int nicvf_tx_mbuf_locked(struct snd_queue *, struct mbuf *);
+
/* Register access APIs */
void nicvf_reg_write(struct nicvf *, uint64_t, uint64_t);
uint64_t nicvf_reg_read(struct nicvf *, uint64_t);
Index: sys/dev/vnic/nicvf_queues.c
===================================================================
--- sys/dev/vnic/nicvf_queues.c
+++ sys/dev/vnic/nicvf_queues.c
@@ -98,7 +98,6 @@
MALLOC_DECLARE(M_NICVF);
static void nicvf_free_snd_queue(struct nicvf *, struct snd_queue *);
-static int nicvf_tx_mbuf_locked(struct snd_queue *, struct mbuf *);
static struct mbuf * nicvf_get_rcv_mbuf(struct nicvf *, struct cqe_rx_t *);
static void nicvf_sq_disable(struct nicvf *, int);
static void nicvf_sq_enable(struct nicvf *, struct snd_queue *, int);
@@ -1856,7 +1855,7 @@
}
/* Put an mbuf to a SQ for packet transfer. */
-static int
+int
nicvf_tx_mbuf_locked(struct snd_queue *sq, struct mbuf *mbuf)
{
bus_dma_segment_t segs[256];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 21, 1:27 AM (5 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27785685
Default Alt Text
D5325.id13423.diff (1 KB)
Attached To
Mode
D5325: Improve VNIC performance on Tx path by immediate packet transmission
Attached
Detach File
Event Timeline
Log In to Comment