Comments (9)
Are you sure the issue is not on the TX side? This would happen if you write to a buffer not in the range [head, tail[
.
Also, you may try to use emulated netmap on the RX side (dev.netmap.admode=2
), in such a way that you rule out (or confirm) that the issue depends on the i40 patched driver.
from netmap.
Hello,
Many thanks for the help.
I do not observe the issue when using the emulated adapter (dev.netmap.admode=2
).
The TX side is just a for loop that uses pcap.h to send one packet per iteration. It is not using Netmap. Also, if on the RX side I set the ring size to e.g. 1024, the problematic packet would be the 1024th and not the 512th.
from netmap.
OK so that definitely points to some bug with i40e.
Does the following patch make any difference?
diff --git a/LINUX/i40e_netmap_linux.h b/LINUX/i40e_netmap_linux.h
index 55df4cd2..74a6e757 100644
--- a/LINUX/i40e_netmap_linux.h
+++ b/LINUX/i40e_netmap_linux.h
@@ -497,6 +497,7 @@ i40e_netmap_rxsync(struct netmap_kring *kring, int flags)
u_int nm_i; /* index into the netmap ring */
u_int nic_i; /* index into the NIC ring */
u_int ntail; /* new tail for the user */
+ u_int stop_i;
u_int n;
u_int const lim = kring->nkr_num_slots - 1;
u_int const head = kring->rhead;
@@ -544,11 +545,13 @@ i40e_netmap_rxsync(struct netmap_kring *kring, int flags)
nic_i = rxr->next_to_clean; // or also k2n(kring->nr_hwtail)
nm_i = netmap_idx_n2k(kring, nic_i);
+ stop_i = nm_prev(kring->nr_hwcur, lim);
+ BUG_ON(nm_i != kring->nr_hwtail);
/* we advance tail only when we see a complete packet */
ntail = lim + 1;
complete = 0;
- for (n = 0; ; n++) {
+ for (n = 0; nm_i != stop_i; n++) {
union i40e_rx_desc *curr = I40E_RX_DESC(rxr, nic_i);
uint64_t qword = le64toh(curr->wb.qword1.status_error_len);
uint32_t staterr = (qword & I40E_RXD_QW1_STATUS_MASK)
from netmap.
Hi,
Thanks for the help. Unfortunately, it doesn't seem to make any difference.
Just for clarification, I have applied it, and then run again:
make distclean
./configure --drivers=i40e --select-version=i40e:2.22.8
make
sudo make install
Please let me know if you need any further information.
I will let you know if I make any progress.
from netmap.
Is this any better?
diff --git a/LINUX/i40e_netmap_linux.h b/LINUX/i40e_netmap_linux.h
index 55df4cd25..9acdc106b 100644
--- a/LINUX/i40e_netmap_linux.h
+++ b/LINUX/i40e_netmap_linux.h
@@ -176,7 +176,7 @@ i40e_netmap_configure_rx_ring(struct i40e_ring *ring)
kring = na->rx_rings[ring_nr];
lim = na->num_rx_desc - 1 - nm_kr_rxspace(kring);
- for (i = 0; i < lim; i++) {
+ for (i = 0; i <= lim; i++) {
int si = netmap_idx_n2k(kring, i);
uint64_t paddr;
union i40e_rx_desc *rx = I40E_RX_DESC(ring, i);
from netmap.
By the way, I assume that, after sudo make install
, you have also run
rmmod i40e
modprobe i40e
from netmap.
Hi,
Yes, that fixes the problem.
(I ran rmmod i40e
, rmmod netmap
, insmod netmap.ko
and insmod i40e/i40e.ko
. Sorry for not writing it before.)
Thank you very much!
Mario
from netmap.
pushed to mater, thanks!
from netmap.
Thanks for describing and fixing this issue.
We observed the same behaviour on an igb based system which works now as expected.
from netmap.
Related Issues (20)
- kernel updated, pkt-gen cause kernel panic HOT 4
- pkt-gen IP randomization differs for jumbo vs. standard frames
- 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 1
- Speed limited to 10Mbps when using virtio_net interfaces 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.