Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3886817rwe; Mon, 17 Apr 2023 05:11:43 -0700 (PDT) X-Google-Smtp-Source: AKy350bOGHVeVUpTdz/mAvT1MQI/vCAozsrN7knYWILlyr0u9hF6IwzNpmNXakkFtqt2STwD5kS2 X-Received: by 2002:a05:6a00:2441:b0:63a:ea82:b7b7 with SMTP id d1-20020a056a00244100b0063aea82b7b7mr20777409pfj.28.1681733502939; Mon, 17 Apr 2023 05:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681733502; cv=none; d=google.com; s=arc-20160816; b=TeGt1I5SqHOeFd7U6H9taQvFK5AmBxks/qVH5CJdZJ1WtT2VvtHEClB3t+QhpL4BCt jMbDDP9TnGdyQa9wGqzkhmZbYoUhqQF3DWXItkisycaz+bVxVrope6bA79bbuTaqb1P+ FgXl4MueSFIpPxZcwOYt7s2HYEEMmz78GXpncEseQvdTOUv8TVZZ9E5UvER919N0wKt9 BYblQk/Ucx3LoX0QMBHLBCLVHPrLfm7a5dCCnPA1PM52/N+onDxZfvLSDG3fF969LWUS +kitNsN3B8Kw8nY9WFg9oEfmgGrjnP5HW5fE0mnyPNWtSY+63b2/6rj4/nv4/j9JAUDB Zytw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2LRp3zjh0DOhKKwcTJt+220dZY+oP35RdJVHgXAQvQE=; b=1BiFRy0aMNf9A71PTxJEfpKF3Evt5ESFuY0Cw/z10mFRlHmcDoZ8Ow9M2fZnl3bAAz FJdQ+RdEs4HTD/xNTGkhAIBBQ4d7ej44yv92yLN0cXeeoaEz8xzT09Dy8lePIVxAg/QJ jlX2oUMcy/EUC4rNZX2nkFCDLvhyt9B7EbB8vpZc3mFI3jLQ0C6TNVkui62AMyFxr39t lhiy4+pOzSII7zwl8nuK5JMT72zkr2U+xN4rm9yiJzQbNo3IpVhIqXXhsm+qLuaR4xko 5xFXP2DHVTECWGueleVoToQWIAus2TB6D+Ami5U1WjWvzWPICrXRyVYOT4mePU4lf8Az cZqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D0p9hffp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a056a0000d100b0063b88c406c4si4547643pfj.171.2023.04.17.05.11.31; Mon, 17 Apr 2023 05:11:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D0p9hffp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229802AbjDQMDC (ORCPT + 99 others); Mon, 17 Apr 2023 08:03:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229738AbjDQMDB (ORCPT ); Mon, 17 Apr 2023 08:03:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14FE765AF for ; Mon, 17 Apr 2023 05:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681732863; 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=2LRp3zjh0DOhKKwcTJt+220dZY+oP35RdJVHgXAQvQE=; b=D0p9hffpr7Xeolr36BHrIuSoscnEuTY5KIyW9Dvka5g3IZV04rFiL4+Qh6GR1z5s7wGYal PKMaa0TXD8d5S/E+goXrbS/NeocUNOOiIby6GJk+LD75aceKNZ1ab2Zn9mMxJDsqyBi7NA WH3N2cvm65nfdosn8eE7OaBPDXnSLYg= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-81-gmexpUbVNQauECkjwQoiVQ-1; Mon, 17 Apr 2023 07:57:29 -0400 X-MC-Unique: gmexpUbVNQauECkjwQoiVQ-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-94a34e35f57so284958666b.3 for ; Mon, 17 Apr 2023 04:57:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681732649; x=1684324649; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2LRp3zjh0DOhKKwcTJt+220dZY+oP35RdJVHgXAQvQE=; b=OlImrRLbSLbXZtYasLhGvnnQjyxg+I4lmFi3YP29toC5aaoILMmdOqGGrUSEKPS8wX 7YdMwDxXOOMS32Ii6/AkaPNA3OEbhX1YPX0PXus+ufUCUo6KdsH+voFZyj6xrtRnr1Aa MO35X3bHGQU0Od+7SKl6qWcZPN9OpneCqaEWkp6HbCHplcOVdl8MF+GddjL+SMUcqxSR AKlHr6CE2DRjknwKLFwIcbD6w6m0JPwGdKdmxZol9q37ocYdBWJCnY0eHPZdSQuBrr/I je2SrZXpf1CQwjFSrtgToLSYGLdM00tcJBAxjUM0gDiCAw7la9u3UfnwCGKIDt7VbFCe MTSQ== X-Gm-Message-State: AAQBX9d43Q6Et51vk5cZQ3ur4+l9A5/zK+c3LJBZaKCsn1Ay5P2UZSrM 4RYdeYe0cTIY/+R0XxExJEyOe9jTyqdaqBcHZEV/WXVDKTh5HpS23jba+ZSFSrB1DZ3jq3iS1H8 o0GqlUOv5r47gJ2jQIymBSqxX X-Received: by 2002:a05:6402:1154:b0:506:83f7:157b with SMTP id g20-20020a056402115400b0050683f7157bmr10206151edw.10.1681732648814; Mon, 17 Apr 2023 04:57:28 -0700 (PDT) X-Received: by 2002:a05:6402:1154:b0:506:83f7:157b with SMTP id g20-20020a056402115400b0050683f7157bmr10206139edw.10.1681732648606; Mon, 17 Apr 2023 04:57:28 -0700 (PDT) Received: from redhat.com ([2.52.136.129]) by smtp.gmail.com with ESMTPSA id n23-20020a056402061700b005068f46064asm3426009edv.33.2023.04.17.04.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 04:57:28 -0700 (PDT) Date: Mon, 17 Apr 2023 07:57:24 -0400 From: "Michael S. Tsirkin" To: Alvaro Karsz Cc: Jason Wang , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "virtualization@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net] virtio-net: reject small vring sizes Message-ID: <20230417075645-mutt-send-email-mst@kernel.org> References: <20230417021725-mutt-send-email-mst@kernel.org> <20230417023911-mutt-send-email-mst@kernel.org> <20230417030713-mutt-send-email-mst@kernel.org> <20230417051816-mutt-send-email-mst@kernel.org> <20230417073830-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 17, 2023 at 11:51:22AM +0000, Alvaro Karsz wrote: > > > I see your point. > > > Regardless, we'll need to fail probe in some cases. > > > ring size of 1 for example (if I'm not mistaken) > > > > Hmm. We can make it work if we increase hard header size, then > > there will always be room for vnet header. > > > > > control vq even needs a bigger ring. > > > > Why does it? > > At the moment, most of the commands chain 3 descriptors: > 1 - class + command > 2 - command specific > 3 - ack > > We could merge 1 and 2 into a single one, both are read only for the device, so I take it back, it won't need a bigger ring. > But it will need 2 descriptors at least(1 read only for the device and 1 write only for the device), so we still need to fail probe sometimes. > Yes that makes sense, it's architetural. We can disable ctrl vq though. -- MST