From patchwork Fri Feb 15 17:46:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Maffione X-Patchwork-Id: 10815639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6EC2D1575 for ; Fri, 15 Feb 2019 17:51:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E2CD2FD88 for ; Fri, 15 Feb 2019 17:51:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C5B82FD9F; Fri, 15 Feb 2019 17:51:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EFDB42FDA5 for ; Fri, 15 Feb 2019 17:51:48 +0000 (UTC) Received: from localhost ([127.0.0.1]:44096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guheO-0001I5-3Q for patchwork-qemu-devel@patchwork.kernel.org; Fri, 15 Feb 2019 12:51:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guhZu-0006gr-4y for qemu-devel@nongnu.org; Fri, 15 Feb 2019 12:47:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guhZt-0002sh-DQ for qemu-devel@nongnu.org; Fri, 15 Feb 2019 12:47:10 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:39495) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guhZs-0002qO-Vg for qemu-devel@nongnu.org; Fri, 15 Feb 2019 12:47:09 -0500 Received: by mail-wm1-x32d.google.com with SMTP id z84so3278440wmg.4 for ; Fri, 15 Feb 2019 09:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c7w9Pbq94F583e/dzEhYR5gyuSx1DrweUAFaS5qVox0=; b=YZzDghSzo7sc4ZNfiEWC/i4v+rZ/02HFwmy0aPYAZT9qYzKSRxme064ixmlrtRBiHq 4LNx8IGiS65BrKNG0dKV3OszPA4qNVYLWS/CgOKJIW6tgR+drW3x8Tvs9GwQi8QSTUL8 IS6eXe0951blKwe+ePNtbeQrYb8jekAPnbwzeuF+b0bvA9Z9/cNNWNI0QkHorzBHBa1K oVpHbfdGayOQY/9NSa8Af5ehxcEGYCyeHMYAWq4I9APD7Lw3HeGZ+nzgkHWVD1/lChKC nFyQMj5nLgAO85ZOJGjCU2G8hGaKMfKl91t1/X6roOnoDrRqv7py6K97oTY1+l24hXdT /Qnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c7w9Pbq94F583e/dzEhYR5gyuSx1DrweUAFaS5qVox0=; b=C2ci/wdMNCMIJpvDsWGaNx1q49nPzp90L/XJS3VWnIYPVdLUWExA1UStHVkIs49aTA 4TSQnLDk5kZexpUvcV0vsj/5LgSWlP/nbPG42CNyHmW+rKSrThdT6cPELh6nu18CbFvH Nw+oFVNjEuLxymSexUA4EAnXTmYuD9lK9S6yISn3G3iV86MvnCDLkOr5w45uixZaCjo+ 0SQzsd7QxSgkw1QHCgeylhPcS6hiGvAujLy9Jhgcd8VCe6U1l55iXysvHrdA9+FV0RhF WY2rEPtanot1uL8AZOdS/C46Uh9JKwP7zcfi8DaCgyaP3g+VydNYp8cW5sdr2iKTbOP/ f2Zg== X-Gm-Message-State: AHQUAuY0vnVAjkQ3U5ltkfzqwPfg7bTs/drgkDiQRzXI9Il5E4QM4lI8 GvdOKCy7neLYvhAl71aWNyJU0Qs/wXM= X-Google-Smtp-Source: AHgI3IY8CJGFbVOiLk0AMc8t/tXYnEcF/1xqtBMqp06Zbp1jBAukTCDJ7+RFuhvV4WbuqUJcXEHsuA== X-Received: by 2002:a1c:f919:: with SMTP id x25mr7220415wmh.61.1550252827013; Fri, 15 Feb 2019 09:47:07 -0800 (PST) Received: from localhost.localdomain (prova.iet.unipi.it. [131.114.58.86]) by smtp.gmail.com with ESMTPSA id f2sm7526191wmb.19.2019.02.15.09.47.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 09:47:06 -0800 (PST) From: Vincenzo Maffione To: qemu-devel@nongnu.org Date: Fri, 15 Feb 2019 18:46:58 +0100 Message-Id: <20190215174659.4007-1-v.maffione@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32d Subject: [Qemu-devel] [PATCH v1 0/1] Allow TAP to unnegotiate virtio-net header X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jasowang@redhat.com, Vincenzo Maffione Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, I was doing experiments with a custom paravirtualized net device, and I ran into a limitation of the TAP backend. I see from the kernel code that it is not possible to set the TAP virtio-net header length to something different from 10 or 12, which means that it is not possible to set it to 0. That's fine. The QEMU implementation of the TAP backend already supports the case where virtio-net header is set to 10 or 12 in kernel, but the emulated/paravirtualized net device is not using that: the TAP backend will just strip/prepend a zeroed header in this case (e.g., see the if statement in tap_receive_iov()). However, the tap_using_vnet_hdr() has an assert() that prevents this situation to happen, and I don't understand why. Maybe it is a leftover? I tried to remove the assert and by doing that my paravirtualized device was able to stop using the virtio-net header. Vincenzo Maffione (1): net: tap: allow net frontends to un-negotiate virtio-net header net/tap.c | 1 - 1 file changed, 1 deletion(-)