Comments (3)
Thanks, may you try the following patch?
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c
index 744ad2887..874818dc3 100644
--- a/sys/dev/netmap/netmap.c
+++ b/sys/dev/netmap/netmap.c
@@ -1245,16 +1245,17 @@ netmap_grab_packets(struct netmap_kring *kring, struct mbq *q, int force)
for (n = kring->nr_hwcur; n != head; n = nm_next(n, lim)) {
struct mbuf *m;
struct netmap_slot *slot = &kring->ring->slot[n];
+ uint16_t len = NM_ACCESS_ONCE(slot->len);
if ((slot->flags & NS_FORWARD) == 0 && !force)
continue;
- if (slot->len < 14 || slot->len > NETMAP_BUF_SIZE(na)) {
- nm_prlim(5, "bad pkt at %d len %d", n, slot->len);
+ if (len < 14 || len > NETMAP_BUF_SIZE(na)) {
+ nm_prlim(5, "bad pkt at %d len %d", n, len);
continue;
}
slot->flags &= ~NS_FORWARD; // XXX needed ?
/* XXX TODO: adapt to the case of a multisegment packet */
- m = m_devget(NMB(na, slot), slot->len, 0, na->ifp, NULL);
+ m = m_devget(NMB(na, slot), len, 0, na->ifp, NULL);
if (m == NULL)
break;
from netmap.
I've already changed my app, but before that I tried a similar code and it helped.
from netmap.
OK, thanks. I'll push it to master.
from netmap.
Related Issues (20)
- nm_open with range of queues HOT 4
- Failure accessing netmap: Invalid argument HOT 1
- netmap causing hang of kernel worker.
- netmap i40e not support 6.6.4
- ProxMox + VirtIO (KVM)
- igc driver does not seem to work HOT 2
- num_slots on RX rings are zero HOT 2
- igb_netmap_rxsync error HOT 1
- Can't build ICE drivers HOT 5
- netmap_ring_reinit problems when running Zeek with netmap pipes
- Can't build netmap with ice 1.13.7 driver HOT 1
- netmap vm Question
- Is it possible to apply a patch to an external driver before configure checks it? HOT 1
- netmap_ring request size too large HOT 2
- netmap_ring request size 65792 too large HOT 1
- Adding in support for Azure Netvsc. HOT 4
- Build problem: Debian , Kernel 6.1 HOT 2
- Speed limited to 10Mbps when using virtio_net interfaces HOT 1
- e1000e driver cannot capture the packet,always show "Truncate incomplete fragment at" in dmesg
- Multi queue with multiple host rings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netmap.