Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3876759rwe; Mon, 17 Apr 2023 05:04:08 -0700 (PDT) X-Google-Smtp-Source: AKy350ZLdGfmdhI1ESpVp+O/51GSzBNkpTeh4Bab1yM0VPQaMiIg+yTB6HjkbV88e1JU78dyZuYP X-Received: by 2002:a17:902:c950:b0:1a6:a7d4:7474 with SMTP id i16-20020a170902c95000b001a6a7d47474mr12780132pla.44.1681733048126; Mon, 17 Apr 2023 05:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681733048; cv=none; d=google.com; s=arc-20160816; b=yZKlWGth63aFtckKW9CQ0hCH3Z09hH/9sDPBiwHvFtcDg7L5thFiOMJixh9o5CH97y ovkw/8TOeRuERXk1bFt47k67KZOL1wk4wF/uKmEyWoEcCFw+6SqbzizGEUheVat/2PCZ LfKINrDny9yqYk/ex0isUuolXQi7Ij1i05K62BWGZmurzXclAYA3ph0TLpS4oWgT4f87 cqr7xaS0nvCgqCtjKOP0fA5GOnQraYsBCedaCYGAIrYMBmbZpUe76tOnYhr2rG/w/oc9 PCYmsnJG2IXZcy6Q97RLQ3/byDR5BJW3GjW9gG4Udf7BZ7t8mk5hcS6a862gUDWq4bC8 W+Yg== 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=L56R2gu/x3s7dqlmSUQPJXypT34J4O84wjA7Kd+V4c4=; b=TMJOpX7Tj7TrtMfe6XioYxornddoTXD14nSyhfn7YmKund1DvzUf78l+QdAit2/r7Z nTWnhBEiSPJiVXsR119zC+TM2WeMFPcGWALEi4pygqeBzmEp/3tRfzGdGVLtRGC6W4ye GsBIeTOzeQ5zv9Ufd2JhLItccVX+oUicJ5ZK90EUk+av3MUwNcABYfLIaCD8v7vweWGA czoogCWD2Bm/mR/gY+jiSyU9n5Ps4XHck05aw5xEdrUINhMINwIGU2au4fQVpGpSfVZL lBHuoY9JAXS6dxjN4JF3Jmbp3P4L4rL8H6yFvKh9W+xFLRfmJN1wBTmUrDc/MUklAk0x pvyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dKNqYx7Y; 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 ix9-20020a170902f80900b001a220a984f9si11311393plb.546.2023.04.17.05.03.45; Mon, 17 Apr 2023 05:04:08 -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=dKNqYx7Y; 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 S229930AbjDQLqX (ORCPT + 99 others); Mon, 17 Apr 2023 07:46:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbjDQLqV (ORCPT ); Mon, 17 Apr 2023 07:46:21 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8E5F189 for ; Mon, 17 Apr 2023 04:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681731841; 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=L56R2gu/x3s7dqlmSUQPJXypT34J4O84wjA7Kd+V4c4=; b=dKNqYx7YHJZgKEhr1N0nlsJjwjjZSGnEHtsxqzyQysDjIfF4d7SXcin826jM10rNhXR0da NJqf7ga3/J5OiXANGDpCaWhSeKCATaE2OsghXTEYOypuLkI2I1wXAJ79sebJxE6Gox2isV /LpxNWv7pqDvbHdh4jBHTzTfGr91t1M= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-ogE5U6E3M6eGBDrg5U39oQ-1; Mon, 17 Apr 2023 07:40:24 -0400 X-MC-Unique: ogE5U6E3M6eGBDrg5U39oQ-1 Received: by mail-wm1-f69.google.com with SMTP id t17-20020a05600c451100b003f1754e69e2so645149wmo.5 for ; Mon, 17 Apr 2023 04:40:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681731623; x=1684323623; 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=L56R2gu/x3s7dqlmSUQPJXypT34J4O84wjA7Kd+V4c4=; b=J3JDNIpyBmwXyW2/PA22ETef8XRap7XyuaLAUv4U+Cokz1kJya7yTXd51IlivtRtL8 EGPEEiwxBOgAZkKg/VepqxXHIBvzkD21SJqGPDtfSw0lPl95oZg97fSII31fuKcUus8F Q1p6FjYI+I/q5CVd6erQdyV/iGKmLMa+tGUAjaKeCLcLUloWeNXbVGG98opzbJzux//P PYRLenUzzr9duDw7MhbXwQKwcErsGZrFFME87tZ/DC8Ho7cewGA0rBx/qt+uBJ0M2L4j UxzwLoyWcEKBZVDUp8XGev3FHQm4pYIkWqyQDpGqhKgNb3JHFvZvt+qkO1cmftFYaer0 DFbQ== X-Gm-Message-State: AAQBX9eKzP/uBNKNpf1EiVK59ZvIRqXHC/IgwJCkMZ9fo7ry+/kKJNg+ BAjR/QJj0Av6INFXWA2eYddxfBUbgoWiO1p8JEDtjMKc7QJa0fGPSMRMUw34N9gIkojKEAbqf+t Ov4igxDJLuGr1oSOHIFnrKFnm X-Received: by 2002:a7b:cc94:0:b0:3f0:5beb:6f0 with SMTP id p20-20020a7bcc94000000b003f05beb06f0mr10675207wma.18.1681731623565; Mon, 17 Apr 2023 04:40:23 -0700 (PDT) X-Received: by 2002:a7b:cc94:0:b0:3f0:5beb:6f0 with SMTP id p20-20020a7bcc94000000b003f05beb06f0mr10675192wma.18.1681731623309; Mon, 17 Apr 2023 04:40:23 -0700 (PDT) Received: from redhat.com ([2.52.136.129]) by smtp.gmail.com with ESMTPSA id y25-20020a05600c365900b003f0aeac475esm9692979wmq.44.2023.04.17.04.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 04:40:22 -0700 (PDT) Date: Mon, 17 Apr 2023 07:40:19 -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: <20230417073830-mutt-send-email-mst@kernel.org> References: <20230416164453-mutt-send-email-mst@kernel.org> <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> 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=ham 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 10:04:56AM +0000, Alvaro Karsz wrote: > > > So, what do you think, we should fix virtio-net to work with smaller rings? we should fail probe? > > > > > > I think that since this never came up until now, there is no big demand to such small rings. > > > > The worry is that once we start failing probe there's just a tiny chance > > hosts begin to rely on us failing probe then we won't be able to fix it. > > So it depends on the size of the patch I think. So far it seems small enough > > that wasting code on failing probe isn't worth it. > > > > 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? > Maybe we can fix virtnet to allow smaller rings + fail probe in some cases, all in the same patch/patchset. If we can't make it work then yes. -- MST