Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150732448
D17868.id50069.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
D17868.id50069.diff
View Options
Index: sys/dev/cxgbe/t4_netmap.c
===================================================================
--- sys/dev/cxgbe/t4_netmap.c
+++ sys/dev/cxgbe/t4_netmap.c
@@ -909,10 +909,9 @@
while (n > 0) {
for (i = 0; i < 8; i++, fl_pidx++, slot++) {
PNMB(na, slot, &ba);
- MPASS(ba != 0);
nm_rxq->fl_desc[fl_pidx] = htobe64(ba | hwidx);
- slot->flags &= ~NS_BUF_CHANGED;
- MPASS(fl_pidx <= nm_rxq->fl_sidx);
+ if (__predict_false(slot->flags & NS_BUF_CHANGED))
+ slot->flags &= ~NS_BUF_CHANGED;
}
n -= 8;
if (fl_pidx == nm_rxq->fl_sidx) {
Index: sys/dev/netmap/netmap_kern.h
===================================================================
--- sys/dev/netmap/netmap_kern.h
+++ sys/dev/netmap/netmap_kern.h
@@ -1876,14 +1876,16 @@
uint32_t i = slot->buf_idx;
struct lut_entry *lut = na->na_lut.lut;
struct plut_entry *plut = na->na_lut.plut;
- void *ret = (i >= na->na_lut.objtotal) ? lut[0].vaddr : lut[i].vaddr;
+ if (unlikely((i >= na->na_lut.objtotal))) {
+ i = 0;
+ }
#ifdef _WIN32
- *pp = (i >= na->na_lut.objtotal) ? (uint64_t)plut[0].paddr.QuadPart : (uint64_t)plut[i].paddr.QuadPart;
+ *pp = (uint64_t)plut[i].paddr.QuadPart;
#else
- *pp = (i >= na->na_lut.objtotal) ? plut[0].paddr : plut[i].paddr;
+ *pp = plut[i].paddr;
#endif
- return ret;
+ return lut[i].vaddr;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 4:53 PM (18 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30830038
Default Alt Text
D17868.id50069.diff (1 KB)
Attached To
Mode
D17868: cxgbe netmap: Micro optimizations of the rxsync function
Attached
Detach File
Event Timeline
Log In to Comment