Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4355020rwr; Sun, 23 Apr 2023 04:10:50 -0700 (PDT) X-Google-Smtp-Source: AKy350ZcuGoDQQnt79hc4n1P8qPptNQffMvUClBdJVuK3TnXk6QRuaYg/fZW6UrVeETjtYIOaSv8 X-Received: by 2002:a05:6a20:7fa5:b0:f0:714c:e76a with SMTP id d37-20020a056a207fa500b000f0714ce76amr13989176pzj.4.1682248250328; Sun, 23 Apr 2023 04:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682248250; cv=none; d=google.com; s=arc-20160816; b=l6wdi9KDUr0lMMYVo28kaoNA/MZgAYgRik9rdEzcd8MvECs0Td9toR8N0rMdyFtrTl l7QCGCdz1tO/rJCfPMf9g6OfiruWUwUQjKZwgqrdjMhBDWrlEvj/1pwU0D8YHrNRCL1b Ae3SJukNp9chjs+Vmd2rC00DlkI5+xCQNCfMCQPUxQgOTPuclmUCK9o77Nsuu54G5pMJ AlwR4s3JeyM0oqS98N7tA3msf7Y9oD9m6ELPUK1bdFMD/GxxFhOwPpaWN3Z9d8mM+S62 F5/OH2ZpjUdIE479B1DPfkkjs2D8C6qg5GoZag3p38cHaG/0hbSgA7eblz1wcafnF8gr WVuw== 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=YJ86ZVDYRM9CotkEiqPEtZYHk4qaL2Mn/oKfEYumLFI=; b=EZCQmf7zRKMB3mjSy/mEqL7sLkqkhnLHL/oJiKqAK3hDNx1fVVMLTu40q1+kKUILxB n6uJmYTTSoUaYVCEd2ureyfG9vpLQveAOzlq8jzd2T1fyBPNa7eUw/C1BvFWQTyjScW2 OAj+/dfJPxwUe960S//WHnUmeMp6W9aeiMT3cgI6glUzJqYN9HeYUpnkolsU+r+O+MCl gP2CB1t0cF8bOXoEOo4rC2BrbjF8MQBrKEQ00JYL0luwln6Lk2lZp7SfokBuMsZiaojt SKqtkvZ8qXFuk6PtnfWvcCHC8nDEY50XUObrOqTa/XRsYJ7aS+5Tf80+jcYq91+K0nlZ W/CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f5SAWhtt; 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 l64-20020a638843000000b0051f7a139276si8677310pgd.634.2023.04.23.04.10.37; Sun, 23 Apr 2023 04:10:50 -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=f5SAWhtt; 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 S229614AbjDWLJW (ORCPT + 99 others); Sun, 23 Apr 2023 07:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjDWLJU (ORCPT ); Sun, 23 Apr 2023 07:09:20 -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 64A3E10E2 for ; Sun, 23 Apr 2023 04:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682248112; 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=YJ86ZVDYRM9CotkEiqPEtZYHk4qaL2Mn/oKfEYumLFI=; b=f5SAWhttc4AiAw759Ji7WL4BpPSZ7VbyQfikV3oYvT3O1euRyjVpZReRgpa5K2vIyk9h17 9m5KIC4UOF7qCzjE/eqXcC6EJJzeTQlddoL0JJGQ5s+iBSwaRUCciYRtojIvHw+4cgDErv f8BZoIrYHwUM6SKFAdEDa2isDKQ3SGU= 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-589-wVDm5j4oP3-y8qVww0HYAQ-1; Sun, 23 Apr 2023 07:08:31 -0400 X-MC-Unique: wVDm5j4oP3-y8qVww0HYAQ-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f08900db79so11202525e9.2 for ; Sun, 23 Apr 2023 04:08:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682248110; x=1684840110; 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=YJ86ZVDYRM9CotkEiqPEtZYHk4qaL2Mn/oKfEYumLFI=; b=YeqHUEY+oFf0Uv/G/6954WI5rdPm66YIG3etzMmHBjXmb6zlRJD1DR1S4P1+ZUCCQr 8WR2a7akaMtHsQZb+LxG1ibjH/j3pWw+tqATjfcZxoRj3B2xVNfp1m4HCtsrl+qDNWGN Hygr8TJAEj5bgMs7hcScQ5Vk08uULcwI8TE0ipNslfmuTT8mH8ZUZHLewTeuOHS0GjSW E3Grhm6aLQLj5jUS7sbU+Mw6DL/hgDrzwhosAbP7AiHqqYTidVSS67OQP3TgGfV9nZiu LDFI3bSqnjhgnLLysZG4kgseR9gQJ1mD1T0l3zsxNNoU0ekQppm5vYw8j4rm02BJL42u 4v1A== X-Gm-Message-State: AAQBX9eOxQXrlPP8LisbKPXb/uEIfywY2TKx1p8TTadLZLFGZKCMUXpz 3teQIHDbIesMIrbgjOIVvKk+yWsofncuYDyallhNxlB1AoC/eWvXpZJutzRXJ0NqRdBa7hsPRsC FsrtIGDbP16isuwXJhRKoc6DwKqrcDQMw X-Received: by 2002:a7b:c393:0:b0:3f1:6458:99a7 with SMTP id s19-20020a7bc393000000b003f1645899a7mr5314662wmj.38.1682248109914; Sun, 23 Apr 2023 04:08:29 -0700 (PDT) X-Received: by 2002:a7b:c393:0:b0:3f1:6458:99a7 with SMTP id s19-20020a7bc393000000b003f1645899a7mr5314651wmj.38.1682248109608; Sun, 23 Apr 2023 04:08:29 -0700 (PDT) Received: from redhat.com ([2.55.61.39]) by smtp.gmail.com with ESMTPSA id k36-20020a05600c1ca400b003f1733feb3dsm12878417wms.0.2023.04.23.04.08.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 04:08:29 -0700 (PDT) Date: Sun, 23 Apr 2023 07:08:25 -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: <20230423070705-mutt-send-email-mst@kernel.org> References: <20230417030713-mutt-send-email-mst@kernel.org> <20230417051816-mutt-send-email-mst@kernel.org> <20230417073830-mutt-send-email-mst@kernel.org> <20230417075645-mutt-send-email-mst@kernel.org> <20230423031308-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.3 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 Sun, Apr 23, 2023 at 08:01:35AM +0000, Alvaro Karsz wrote: > We could add a new virtio_config_ops: peek_vqs. > We can call it during virtnet_validate, and then fixup the features in case of small vrings. > > If peek_vqs is not implemented by the transport, we can just fail probe later in case of small vrings. > Nope, we can't. Driver is not supposed to discover vqs before FEATURES_OK, the vq size might depend on features.