From nobody Wed Sep 24 07:43:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584523084; cv=none; d=zohomail.com; s=zohoarc; b=A2dcyaFzfWEDB906JIhoI+i/M9RO8Y3XRCFFG85J20+chfWqHJuH5C526LK6F/aQTelukbGyExqqRstpPTWxGK1zXZTjWb5LAFgnnhQLAmlORNYHOpjguos6QhbJ8aE9Id1oZg9xiwzKrPnO+ZCh0d7QeFXlJzsqIcThG716n9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584523084; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=6H29QJg5B7bgS/AMKBONCsgkT/bfdiwpiQn7qsNuQ08=; b=JeybrQMfKel5qT6NHo2aWrwN0XoZg/YWtzIn6rJzrhsiHvt8z8I6wNCIWn39kkMrSJPFbqxOY/Wb7IsUe/ZReYsqBegBKbehoPq5JRADz6FG2/t/3nlMPgw5g/VgbJjXkpAMp9ecjldxLckxiK430BAoWgU5RIPfqISqkPvnjbY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584523084621984.2817016953132; Wed, 18 Mar 2020 02:18:04 -0700 (PDT) Received: from localhost ([::1]:47422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEUpv-0005iG-BI for importer@patchew.org; Wed, 18 Mar 2020 05:18:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39611) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEUnl-0003Cr-Km for qemu-devel@nongnu.org; Wed, 18 Mar 2020 05:15:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEUnj-0004ZW-Ue for qemu-devel@nongnu.org; Wed, 18 Mar 2020 05:15:49 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:46665) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEUnj-0004Vf-NC for qemu-devel@nongnu.org; Wed, 18 Mar 2020 05:15:47 -0400 Received: by mail-wr1-x442.google.com with SMTP id w16so12878435wrv.13 for ; Wed, 18 Mar 2020 02:15:47 -0700 (PDT) Received: from f2.redhat.com (bzq-79-183-43-120.red.bezeqint.net. [79.183.43.120]) by smtp.gmail.com with ESMTPSA id z22sm3062342wmi.1.2020.03.18.02.15.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Mar 2020 02:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6H29QJg5B7bgS/AMKBONCsgkT/bfdiwpiQn7qsNuQ08=; b=H5BXjcLvnHEd8F94FZZPv9SVa9ngDmG5O3TxqCfbNOmXNpfM/30W95f0hyPjLxlFdz xYCaT45MUJc/cWZdkxEdgG3C9dHWJRsdIBuOF1y78R7ZnrOGMtO8cqb3T1SpceqK2DPu jY1p0o2QJi3iBD5GpP0KsxGV7TVTa2YlVbkemy3cMVjBeMRLs8l1cvfEjSNJWI2+IyGs pCoorzBKxuAlUTxUwxTk8swAfvgj6UmaxayS1zduCdD0j62j2MZx9b1pP53yKLrVpfyg uJAo11Zhst2HpfXeiktT4HhXn7CXPwu9XckvdSwp5IKLocTw3myMeBDczbAhaUdNFF3+ gUaw== 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:in-reply-to :references; bh=6H29QJg5B7bgS/AMKBONCsgkT/bfdiwpiQn7qsNuQ08=; b=momyeEe2k567PW1Mnir6L1c6HgliBDDnKeWFxzN/PeIVJufrvBxOi3uH0eMuB/ibqP U32TAfrXLyHFFhhaLiJtwXU46PKX2QOyKpXVgr3t2QvnyaxY1GOTn41RTUrNdEFNajZG l7G2CqexJ9XYSK7V0N60fU7phT27lt9kWqOiZ3HC3UxSX9IScE1fZKI7xYnmCsoDIDmj 1ePFh8i75EUhpWaIgUmh37S0J9mvmKuVfI2Spydi2MwxllZPRiElU73nnufEuYHzp0b4 I6+ZFwEvi/jkzVktXcwYIzHOyMGahzSXu66H7bjErTgI0eXcEtvskQe5ZW8mxUFDcdbb tKIQ== X-Gm-Message-State: ANhLgQ0FxGlI5B3dNKm9KCI+8oCqllsZQW7rnZRij7/HF7TEPiU00QuL twDYlPRvnpU7h/XIId02M9NV+7qmc2xClw== X-Google-Smtp-Source: ADFU+vuaXt6VoNU6fpSxWwzynf8kWmbWVihE5qxnQdQjzdIKsXKsDgQujMh7M8cj/EzVRqZAAJLkKg== X-Received: by 2002:adf:e5d2:: with SMTP id a18mr4583929wrn.334.1584522946494; Wed, 18 Mar 2020 02:15:46 -0700 (PDT) From: Yuri Benditovich To: qemu-devel@nongnu.org, mst@redhat.com, jasowang@redhat.com, quintela@redhat.com, dgilbert@redhat.com Subject: [PATCH v5 4/7] tap: allow extended virtio header with hash info Date: Wed, 18 Mar 2020 11:15:22 +0200 Message-Id: <20200318091525.27044-5-yuri.benditovich@daynix.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200318091525.27044-1-yuri.benditovich@daynix.com> References: <20200318091525.27044-1-yuri.benditovich@daynix.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yan@daynix.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @daynix-com.20150623.gappssmtp.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Yuri Benditovich --- net/tap.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/net/tap.c b/net/tap.c index 6207f61f84..47de7fdeb6 100644 --- a/net/tap.c +++ b/net/tap.c @@ -63,6 +63,14 @@ typedef struct TAPState { Notifier exit; } TAPState; =20 +/* TODO: remove when virtio_net.h updated */ +struct virtio_net_hdr_v1_hash { + struct virtio_net_hdr_v1 hdr; + uint32_t hash_value; + uint16_t hash_report; + uint16_t padding; +}; + static void launch_script(const char *setup_script, const char *ifname, int fd, Error **errp); =20 @@ -254,7 +262,8 @@ static void tap_set_vnet_hdr_len(NetClientState *nc, in= t len) =20 assert(nc->info->type =3D=3D NET_CLIENT_DRIVER_TAP); assert(len =3D=3D sizeof(struct virtio_net_hdr_mrg_rxbuf) || - len =3D=3D sizeof(struct virtio_net_hdr)); + len =3D=3D sizeof(struct virtio_net_hdr) || + len =3D=3D sizeof(struct virtio_net_hdr_v1_hash)); =20 tap_fd_set_vnet_hdr_len(s->fd, len); s->host_vnet_hdr_len =3D len; --=20 2.17.1