luigirizzo / netmap

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

VMXNET3 driver doesn't receive VLAN full sized frames 1518 #780

Open NAYANSEN90 opened 3 years ago

NAYANSEN90 commented 3 years ago

I am trying to receive vlan frames using vmxnet3 drivers. The interface mtu is 1500. The rxvlan and txvlan offloads are turned off. I can see frames that are less than the full sized frames but when I am trying to receive frames of size 1500 or more (fragmented packets) I dont see them. I am using the bridge utility.

NAYANSEN90 commented 3 years ago

It seems that the issue might have to do something with vmxnet3 driver not allowing larger than mtu size packets when "rxvlan off" is present. Is there any way where we can get the vlan id from the metadata and thus allowing "rxvlan on"?

jhk098 commented 3 years ago

These offloads are not supported by netmap. Maybe you can just set a larger MTU on the interface?

NAYANSEN90 commented 3 years ago

I could increase the mtu by say 4 bytes to accomodate the vlan header, but since I would have no control over the mtu of the receiving system which will still be 1500, that system will then have problem receiving packets. I am thinking of a metadata sort of way to carry the tci, just like PACKET_MMAP in kernel carries in the tpacket_headers. But that would require changing the slot structure. Or I am thinking of a local patch where the vlan header can be generated in the "rxsync" by looking at the "rcd->ts" and "rcd->tci" fields and pushing the packet back and creating space for 4 bytes. I dont know if that is possible? Is pushing the packet allowed in that are?

jhk098 commented 3 years ago

This kind of offload processing is out of netmap scope, because it would defeat its purpose. If you need something like that I think you should probably use some more standard mechanism such as libpcap or raw sockets