aboutsummaryrefslogtreecommitdiff
path: root/net/tap-linux.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2024-04-28 16:00:44 +0900
committerJason Wang <jasowang@redhat.com>2024-06-04 15:14:25 +0800
commit52a7ff526964e7810ec1ccc71efbdd60952dd20b (patch)
tree8cef0a19baaeade8ecfac931edcbc3c2497c0574 /net/tap-linux.c
parent3ab42e46acf867c45bc929fcc37693e327a35a24 (diff)
downloadqemu-52a7ff526964e7810ec1ccc71efbdd60952dd20b.zip
qemu-52a7ff526964e7810ec1ccc71efbdd60952dd20b.tar.gz
qemu-52a7ff526964e7810ec1ccc71efbdd60952dd20b.tar.bz2
tap: Remove tap_probe_vnet_hdr_len()
It was necessary since an Linux older than 2.6.35 may implement the virtio-net header but may not allow to change its length. Remove it since such an old Linux is no longer supported. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'net/tap-linux.c')
-rw-r--r--net/tap-linux.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/net/tap-linux.c b/net/tap-linux.c
index c7e514e..1226d5f 100644
--- a/net/tap-linux.c
+++ b/net/tap-linux.c
@@ -185,26 +185,6 @@ int tap_probe_has_uso(int fd)
return 1;
}
-/* Verify that we can assign given length */
-int tap_probe_vnet_hdr_len(int fd, int len)
-{
- int orig;
- if (ioctl(fd, TUNGETVNETHDRSZ, &orig) == -1) {
- return 0;
- }
- if (ioctl(fd, TUNSETVNETHDRSZ, &len) == -1) {
- return 0;
- }
- /* Restore original length: we can't handle failure. */
- if (ioctl(fd, TUNSETVNETHDRSZ, &orig) == -1) {
- fprintf(stderr, "TUNGETVNETHDRSZ ioctl() failed: %s. Exiting.\n",
- strerror(errno));
- abort();
- return -errno;
- }
- return 1;
-}
-
void tap_fd_set_vnet_hdr_len(int fd, int len)
{
if (ioctl(fd, TUNSETVNETHDRSZ, &len) == -1) {