On 24/07/17 05:03, Jason Wang wrote: > > > On 2017年07月22日 02:50, Anton Ivanov wrote: >> >> [snip] >> >>>> + "-netdev raw,id=str,ifname=ifname\n" >>>> + " configure a network backend with ID 'str' >>>> connected to\n" >>>> + " an Ethernet interface named ifname via raw >>>> socket.\n" >>>> + " This backend does not change the interface >>>> settings.\n" >>>> + " Most interfaces will require being set into >>>> promisc mode,\n" >>>> + " as well having most offloads (TSO, etc) >>>> turned off.\n" >>>> + " Some virtual interfaces like tap support only >>>> RX.\n" >>> >>> Pay attention that qemu supports vnet header. So any reason to turn >>> off e.g TSO here? >> >> I am not aware of any means to get extra info like checksums, etc >> show up on raw socket read. >> >> If you know a way to make them show up, this is worth investigating. > > See packet_rcv_vnet(). But a known 'issue' for raw socket is that it > forbids change vnet header length after creation, we may need some > workaround in qemu.
There are a couple of other issues - if I understand the situation correctly, probing the vnet header size relies on tap ioctls. I have some support for this working now. I will try to get around to redo the patches as per your last comments + initial vnet header support and re-submit. One definitive advantage of having it is that it allows to detect if GSO/TSO is enabled on the interface as this is not something that gets along very well with fixed buffer size vector IO. A. [snip] >>> > > -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661
