From patchwork Tue Sep 6 16:11:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 666656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sTBhB4NMxz9s5g for ; Wed, 7 Sep 2016 02:22:18 +1000 (AEST) Received: from localhost ([::1]:34877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhJ8Z-0007AX-8P for incoming@patchwork.ozlabs.org; Tue, 06 Sep 2016 12:22:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhIy2-00077z-NU for qemu-devel@nongnu.org; Tue, 06 Sep 2016 12:11:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhIxw-000768-Ev for qemu-devel@nongnu.org; Tue, 06 Sep 2016 12:11:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhIxw-000763-93 for qemu-devel@nongnu.org; Tue, 06 Sep 2016 12:11:16 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F34114E4D8 for ; Tue, 6 Sep 2016 16:11:15 +0000 (UTC) Received: from max-t460s.redhat.com (vpn1-7-235.ams2.redhat.com [10.36.7.235]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u86GBCoU024070; Tue, 6 Sep 2016 12:11:14 -0400 From: Maxime Coquelin To: mst@redhat.com, qemu-devel@nongnu.org Date: Tue, 6 Sep 2016 18:11:06 +0200 Message-Id: <1473178269-16718-2-git-send-email-maxime.coquelin@redhat.com> In-Reply-To: <1473178269-16718-1-git-send-email-maxime.coquelin@redhat.com> References: <1473178269-16718-1-git-send-email-maxime.coquelin@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 06 Sep 2016 16:11:16 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 1/4] virtio-net: reuse MTU related bits from Linux 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, Aaron Conole , Maxime Coquelin Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" VIRTIO_NET_F_MTU has been introduced in Linux v4.8-rc1. Reuse its define and the related virtio_net_config struct update. Cc: Michael S. Tsirkin Cc: Aaron Conole Signed-off-by: Maxime Coquelin --- include/standard-headers/linux/virtio_net.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/standard-headers/linux/virtio_net.h b/include/standard-headers/linux/virtio_net.h index a78f33e..30ff249 100644 --- a/include/standard-headers/linux/virtio_net.h +++ b/include/standard-headers/linux/virtio_net.h @@ -35,6 +35,7 @@ #define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */ #define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */ #define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Dynamic offload configuration. */ +#define VIRTIO_NET_F_MTU 3 /* Initial MTU advice */ #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */ #define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */ #define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */ @@ -73,6 +74,8 @@ struct virtio_net_config { * Legal values are between 1 and 0x8000 */ uint16_t max_virtqueue_pairs; + /* Default maximum transmit unit advice */ + uint16_t mtu; } QEMU_PACKED; /*