[ovs-discuss] Small 802.1q-prepended packets not getting through to VM
Gregory Rose
gvrose8192 at gmail.com
Fri Jun 7 21:06:45 UTC 2019
On 6/7/2019 9:08 AM, Ben Pfaff wrote:
> On Thu, Jun 06, 2019 at 09:31:59AM +0200, Steinar H. Gunderson wrote:
>> On Wed, Jun 05, 2019 at 02:45:53PM -0700, Ben Pfaff wrote:
>>> OVS, or at least the OVS kernel module, doesn't generate packets. It
>>> accepts them for processing from some source and then (sometimes)
>>> delivers them to some destination. Generally it expects that anything
>>> that comes in is suitable to be sent back out without further
>>> modification.
>> Yes, I think this is the basic problem. Everybody on the path assumes that
>> if padding is needed, that's someone else's responsibility. :-)
>>
>> I can understand that when just switching packets around internally on the
>> same host, one can take shortcuts like not padding or ignoring the checksum.
>> (I did mention that the packets also reach the VM with the wrong checksums,
>> right?) But when it goes out somewhere external, be it a VM or an external
>> NIC, these things need to be in place.
>>
>>> If the packet comes in on OVS internal port, then that puts the focus
>>> slightly more on OVS. There could be a bug in the internal port
>>> implementation. However, even there OVS doesn't really assemble the
>>> packet, it comes from the Linux TCP/IP stack and the OVS internal port
>>> just accepts it.
>> Yes, but I suppose it sets some sort of flags for what's acceptable?
>> At least in the case of checksums.
>>
>>> I would think that the Linux host driver transmitting the packet would
>>> ensure that it is padded so as to be acceptable for the media it will be
>>> transmitted on (virtual media in this case). I think that drivers for
>>> physical media typically do this (but it's been years since I've been
>>> familiar with the Linux network driver model).
>> I believe physical media drivers do this, yes. Whether hostnet/virtio does
>> it... no idea, but it would seem not. :-)
> Greg, so far everything here is speculation on my part. Do you have any
> facts to inject?
I think switches should just drop undersized packets. They should also
drop packets with bad checksums.
Switches should not be doing any padding or checksum recalculations,
that would impose a lot of overhead. Switches should just switch traffic.
That's what I *think* switches should do. What they actually do can
vary a great deal. I've worked with a lot of hubs and switches in the
past and the behavior in these sorts of cases isn't always well
defined. But generally I think undersized frames and packets with bad
checksums should just be dropped at the switch. If our internal ports
are not dropping undersized/bad checksum frames then that might be
unexpected behavior and maybe we should investigate that more.
I can try to reproduce this scenario and educate myself a bit more about
how OVS is dealing with these packets.
- Greg
More information about the discuss
mailing list