luigirizzo / netmap

Automatically exported from code.google.com/p/netmap
BSD 2-Clause "Simplified" License
1.85k stars 534 forks source link

Make VLAN tags visible to Linux generic adapter #926

Closed msaare123 closed 1 year ago

msaare123 commented 1 year ago

Push tag in skb metadata back to payload so it will be visible in rx ring

vmaffione commented 1 year ago

Looks like a good idea, but we would need to check that it compiles for all the earlier versions on Linux. @giuseppelettieri ?

msaare123 commented 1 year ago

Looks like a good idea, but we would need to check that it compiles for all the earlier versions on Linux. @giuseppelettieri ?

What is range of supported kernels? With quick glance this should be compatible from v4.x kernels.

vmaffione commented 1 year ago

We actually support Linux since 2.6.34.

The configure script LINUX/configure has many tests to check for internal kernel functions and signatures. The script will produce a netmap_linux_config.h with all the #define that allow the code to support many versions. Then there is a LINUX/scripts/np that automates the build across all the possible versions, but it's not so easy to setup.

giuseppelettieri commented 1 year ago

We actually support Linux since 2.6.34.

yes, we do, but we should really stop doing that. Anyway, I'll check compilation and report back.

giuseppelettieri commented 1 year ago

OK, we can merge this. Then I will push some commits that will fix compilation for all kernels. For very old kernels, however, the vlan feature will simply be disabled, since emulating the missing pieces becomes too cumbersome.