Comments (9)
It can be done, but it has to be implemented.
This code
https://github.com/luigirizzo/netmap/blob/master/sys/dev/netmap/netmap_generic.c#L985-L1002
must be extended to check if the mbuf m
has a VLAN tag within its metadata. If present, the VLAN header must be inserted while copying data. Alternatively, the VLAN tag can be pushed back from the metadata into the packet data here
https://github.com/luigirizzo/netmap/blob/master/sys/dev/netmap/netmap_generic.c#L845
from netmap.
It can be done, but it has to be implemented.
This code https://github.com/luigirizzo/netmap/blob/master/sys/dev/netmap/netmap_generic.c#L985-L1002 must be extended to check if the mbuf
m
has a VLAN tag within its metadata. If present, the VLAN header must be inserted while copying data. Alternatively, the VLAN tag can be pushed back from the metadata into the packet data here https://github.com/luigirizzo/netmap/blob/master/sys/dev/netmap/netmap_generic.c#L845
Do those fixes also apply to the ixgbe driver? I've been fighting this issue for quite some time with Netmap in trying to access the interface as a trunk port, i.e. multiple VLANs at once on the same interface.
from netmap.
The ixgbe driver has native netmap support, so that's a different story. With native support you should be able to see the VLAN tag if you disable the VLAN hw offloads, as described in the README.md.
If you are using ixgbe with emulated netmap mode (why?) then yes, the fix will apply also in this case.
from netmap.
Thanks. Yes, I am using native and not emulated mode. I also have all VLAN offloads disabled, however, I still do not receive the VLAN tags in the received packets. For performance reasons I am using a 4.4.86 kernel, (newer had much worse performance) and running inside a VM with the interface connected in PCI passthrough mode, where the complete interface is disconnected from the host and connected to the VM. In other words, I am not using VFs I was not able to get VLAN packets out/in using VFs in SR-IOV mode.
from netmap.
There must be something wrong with your offload configuration...
Netmap does not modify the packet contents in any way, so if you don't see the VLAN tag it means that the NIC is stripping it for some reason. There are many VLAN-related offloads, maybe someone is still active and causing the stripping.
from netmap.
Also make sure you are not using emulated mode, by checking in the dmesg
.
If something like this
[ 2865.316685] 256.410317 [1136] generic_netmap_attach Emulated adapter for enp3s2 created (prev was NULL)
[ 2865.340627] 256.434258 [ 320] generic_netmap_register Emulated adapter for enp3s2 activated
[ 2865.340651] 256.434283 [ 864] tc_configure ifp enp3s2 qdisc netmapemu parent 4294967295 handle 0
is present, then you are using emulated mode.
from netmap.
from netmap.
My plan is to use netmap in a system that will be deployed at multiple locations also many years ahead in time. This makes it handy to use netmap in emulated mode to avoid clutter when the computers suddenly has a new nic.
On FreeBSD, this is not a problem, but on Linux (Ubuntu) I cannot see vlan tags, which is a huge drawback. I think I understand the explanation in #259, but I don't understand why it has to be this way.
Do I just have to accept this or is there a way to sneak around this issue somehow?
It sounds like you need a solution that allows you to use netmap in emulated mode with Linux (Ubuntu) while still allowing you to see the VLAN tags. Have you tried using a virtual switch such as Open vSwitch or OpenFlow? This would allow you to configure your network to handle VLAN tags and have the flexibility you need for your system deployment. Let me know if you need any help setting this up!
from netmap.
My plan is to use netmap in a system that will be deployed at multiple locations also many years ahead in time. This makes it handy to use netmap in emulated mode to avoid clutter when the computers suddenly has a new nic.
On FreeBSD, this is not a problem, but on Linux (Ubuntu) I cannot see vlan tags, which is a huge drawback. I think I understand the explanation in #259, but I don't understand why it has to be this way.
Do I just have to accept this or is there a way to sneak around this issue somehow?It sounds like you need a solution that allows you to use netmap in emulated mode with Linux (Ubuntu) while still allowing you to see the VLAN tags. Have you tried using a virtual switch such as Open vSwitch or OpenFlow? This would allow you to configure your network to handle VLAN tags and have the flexibility you need for your system deployment. Let me know if you need any help setting this up!
My intesion is to implement a prp solution, so I need to receive frames on two interfaces with or withouth vlan tags, analyze them in a user space program, drop them or modify and forward them to a tap interface. Is this possible to achieve with Open vSwitch or OpenFlow?
from netmap.
Related Issues (20)
- Netmap could not allocate memory : netmap_config_obj_allocator requested objsize 140032 out of range [256, 131072]
- Time resolution on rx sync HOT 1
- i4oe driver in version 2.19.3 overflow when bitrate get up of peta bytes
- performance problem with emulated mode (Linux 5.15.0 Ubuntu 22.04) HOT 1
- problem in ring of i40e
- error while executing make command (build)
- netmap_poll should check if interface is up
- pkt-gen txseq issues with ixl
- 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
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.