mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
net: move UFO support detection to tap-linux.c
Only supported on Linux Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1faac1f7d4
commit
9c282718aa
6 changed files with 29 additions and 6 deletions
|
@ -112,6 +112,18 @@ int tap_probe_vnet_hdr(int fd)
|
|||
return ifr.ifr_flags & IFF_VNET_HDR;
|
||||
}
|
||||
|
||||
int tap_probe_has_ufo(int fd)
|
||||
{
|
||||
unsigned offload;
|
||||
|
||||
offload = TUN_F_CSUM | TUN_F_UFO;
|
||||
|
||||
if (ioctl(fd, TUNSETOFFLOAD, offload) < 0)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void tap_fd_set_offload(int fd, int csum, int tso4,
|
||||
int tso6, int ecn, int ufo)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue