From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYWkN-0003RZ-9v for qemu-devel@nongnu.org; Wed, 24 Feb 2016 05:32:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYWkJ-0007Kl-Ae for qemu-devel@nongnu.org; Wed, 24 Feb 2016 05:32:43 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:38349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYWkJ-0007Kd-2k for qemu-devel@nongnu.org; Wed, 24 Feb 2016 05:32:39 -0500 Received: by mail-wm0-x234.google.com with SMTP id a4so23045392wme.1 for ; Wed, 24 Feb 2016 02:32:38 -0800 (PST) From: Vincenzo Maffione Date: Wed, 24 Feb 2016 11:30:40 +0100 Message-Id: Subject: [Qemu-devel] [PATCH v3] net: netmap: implement virtio-net header probe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jasowang@redhat.com, rizzo@iet.unipi.it, g.lettieri@iet.unipi.it, Vincenzo Maffione Current implementation for netmap backend does not really probe the netmap kernel module to know whether virtio-net header is supported for a specific netmap port. This is only correct for VALE ports, but it is not correct for hardware ports, pipes, etc. This patch properly implements the missing probe mechanism, fixing the implementation of the involved hooks (has_vnet_hdr, has_vnet_hdr_len, has_ufo, ...). CHANGELOG: - renamed netmap_do_set_vnet_hdr_len to netmap_fd_set_vnet_hdr_len - abort() when failing to restore previous vnet-hdr length - moved update to s->vnet_hdr_len to netmap_set_vnet_hdr_len Vincenzo Maffione (1): net: netmap: probe netmap interface for virtio-net header net/netmap.c | 59 ++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 21 deletions(-) -- 2.7.1