From patchwork Sat Jul 4 18:30:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 1322900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cEjwfFeP; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49zggc107Mz9s1x for ; Sun, 5 Jul 2020 04:42:52 +1000 (AEST) Received: from localhost ([::1]:48864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrn7h-00007N-SF for incoming@patchwork.ozlabs.org; Sat, 04 Jul 2020 14:42:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrmwC-0004pg-DK for qemu-devel@nongnu.org; Sat, 04 Jul 2020 14:30:56 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52803 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jrmwA-0001gI-PH for qemu-devel@nongnu.org; Sat, 04 Jul 2020 14:30:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593887454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YYDftXcBQrqsgbkpJ5iu6MhYnQVu4atwyoFfOVtYo8s=; b=cEjwfFePD/j2dB6/fBeSombGns3Q0yhP3U0jQwT31PkEZcCTfaxs2WRaJdohrjJSyCYQo0 uYkNqYtTT431eHJqXxeRfq43jxRcFkxNEZA8dIKAfgNt2lerFC3ytEpM/nAmibDGeWGsGK OkMe35sqWgWbDi5B/Su0r03GYTB76hk= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-381-ErJfnVj8OHG84cYCtRcQgA-1; Sat, 04 Jul 2020 14:30:52 -0400 X-MC-Unique: ErJfnVj8OHG84cYCtRcQgA-1 Received: by mail-wr1-f69.google.com with SMTP id y13so36374361wrp.13 for ; Sat, 04 Jul 2020 11:30:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YYDftXcBQrqsgbkpJ5iu6MhYnQVu4atwyoFfOVtYo8s=; b=ieLq9vmrtnjQBEKjB5IR/V0WUYTXu8j2oeGZG+4DjarZRYU65l0zwtkWAIrzLoA5u1 P/ns0Vz0UEcU++WDYRUzgbZfg95Yc2fTeAVJNPE5sp+XF4cq6BikLgtfREa2J2nNbZUu v20eE3O5YNKoAGby+TS7EHKfVSXSnlSGkrw32XF4mmZSInGm5ghN544SttXeReQ/nO4Z yJlgTU9eQNYseMGFdYgO0JFgAw+7BSgHxpSdFRrwJg6AuYo0Pn8arP/tVr/L7pkvbkwf URp/VYxgLfiBllzaTBlj2ctdAq7o7RIxq7Oa6u8i/l4oR47WOhl/E9aAm2MHQBwu3Zdf 8tSA== X-Gm-Message-State: AOAM532niuD3EYPYLXdvKjfpDPX+X8priWEzgMbOQukhKbdzhRez05kw Z8z1h5lVPZa5kWat6xJIeN/83SngbRtfykW0HM352FfWGVms3DM4hcU2KaXdp2m7Yy8jG15H0Rg oc8LL3PqXNEr/45Y= X-Received: by 2002:a1c:29c6:: with SMTP id p189mr38530685wmp.70.1593887451071; Sat, 04 Jul 2020 11:30:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEWruZyg5Ir5vuXKr7DhssaD6SH8GIaifOSnuAAXGN1CCkskJTSCjQoqMuy6MpOiu1D8RjkQ== X-Received: by 2002:a1c:29c6:: with SMTP id p189mr38530674wmp.70.1593887450876; Sat, 04 Jul 2020 11:30:50 -0700 (PDT) Received: from redhat.com (bzq-79-182-31-92.red.bezeqint.net. [79.182.31.92]) by smtp.gmail.com with ESMTPSA id y77sm7176284wmd.36.2020.07.04.11.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 11:30:50 -0700 (PDT) Date: Sat, 4 Jul 2020 14:30:48 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v2 33/41] vhost: introduce new VhostOps vhost_dev_start Message-ID: <20200704182750.1088103-34-mst@redhat.com> References: <20200704182750.1088103-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200704182750.1088103-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=207.211.31.120; envelope-from=mst@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 11:39:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Peter Maydell , Jason Wang , Cindy Lu Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Cindy Lu This patch introduces new VhostOps vhost_dev_start callback which allows the vhost_net set the start/stop status to backend Signed-off-by: Cindy Lu Message-Id: <20200701145538.22333-7-lulu@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang --- include/hw/virtio/vhost-backend.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index 6f6670783f..b80f344cd6 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -112,6 +112,7 @@ typedef int (*vhost_get_inflight_fd_op)(struct vhost_dev *dev, typedef int (*vhost_set_inflight_fd_op)(struct vhost_dev *dev, struct vhost_inflight *inflight); +typedef int (*vhost_dev_start_op)(struct vhost_dev *dev, bool started); typedef struct VhostOps { VhostBackendType backend_type; vhost_backend_init vhost_backend_init; @@ -152,6 +153,7 @@ typedef struct VhostOps { vhost_backend_mem_section_filter_op vhost_backend_mem_section_filter; vhost_get_inflight_fd_op vhost_get_inflight_fd; vhost_set_inflight_fd_op vhost_set_inflight_fd; + vhost_dev_start_op vhost_dev_start; } VhostOps; extern const VhostOps user_ops;