Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3195852rwe; Sun, 16 Apr 2023 14:08:57 -0700 (PDT) X-Google-Smtp-Source: AKy350ZJ2DHzlaIPhqHet9HxenP0yleQxx3q+6+tpdEvfe7jK0fc4nUQbLRn9AKSbmlixgtVrPgV X-Received: by 2002:a17:902:f707:b0:1a2:296:9355 with SMTP id h7-20020a170902f70700b001a202969355mr10389886plo.16.1681679336910; Sun, 16 Apr 2023 14:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681679336; cv=none; d=google.com; s=arc-20160816; b=sDsTXqnpJiEJawUPcgfp5MlZHF086fktkyTtPOoJUQGezCL+iPlYmeX9nu8qRL4Up9 WXtS/P2z6TaYv85gQiHi0QkV8KWXHiH9Q34aH/vSgVjRe98zw9dHIort0+lTNvvqmsnB 2TOngjMbIc/IMNbAqCXwss25RJIAf8dcxWPCok2WzcJSzuTNON5sYNxUc3XnKG93EcWX WWLzhZiynbC7gnS3ud1tPMp+c69Zwf534yByivLDh08RE/YPVdNxBOniJNN8aYgk/6I/ 1jVOdxQH/RZQNMXMRYRA7pFuQxAQhiTacnUyeDUhHLhg+73gEqfLEVeSZhujReoGat33 ftdQ== 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=/oEdPmorOX8xiHI6aIlzUXoimXi6nlh8J6/c2SPzObI=; b=LbmrrGt5n0dM0JnrBJmpEknBPNeoLUQQgPUzrqFyUqgvSecAlLBbqlhoFn+gmdxXrH MoVKWv2fwrUgs/GpWOV+PSlHvZDQf51jOzSWN1y2TowaFTCWSoOqFUtD8fPcW1uLJGLm +J98yYVsmCJeN3Jp/9uO5HBisgUpEATTKnr1CndynPIDMhR0Wqo66DU3U3tjIrmlXOLZ GPZ+l46NDlvgZFu8K+Ai9DA8/xYkYA/BVRn6NaIjlgdWgCmgzKor1a5d605LRDa1cAtr bJ218a3rWMCWYNhIOWNPF8s1nYOGvjC+i7hAioq3dYBXvpZFe1U+/f/GxYAGvo6FWYUq 4zZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AuGhmiRe; 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 w16-20020a170902e89000b001a51bb4ad79si11302898plg.42.2023.04.16.14.08.46; Sun, 16 Apr 2023 14:08:56 -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=AuGhmiRe; 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 S229649AbjDPUq0 (ORCPT + 99 others); Sun, 16 Apr 2023 16:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjDPUqY (ORCPT ); Sun, 16 Apr 2023 16:46:24 -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 1F6A01FEE for ; Sun, 16 Apr 2023 13:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681677936; 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=/oEdPmorOX8xiHI6aIlzUXoimXi6nlh8J6/c2SPzObI=; b=AuGhmiReF6NmFIKsLA86RXN2QurMYQi6MXxmH3VTngvdqymPttATRJva+qU2wQzBI//uiw M+g9fgML+GxDnRETsU09HUUguiBDrKHfG///sqfp1QLtcb/K6oggoyL2gYyH72BXD/i+Jl aCDDRwDZ1BiuEF/ZGp2zEBvYYZmYd10= 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-121-cIOSiFQdMnGBekCTZC3L3w-1; Sun, 16 Apr 2023 16:45:27 -0400 X-MC-Unique: cIOSiFQdMnGBekCTZC3L3w-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f0b0c85c4fso15032425e9.0 for ; Sun, 16 Apr 2023 13:45:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681677926; x=1684269926; 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=/oEdPmorOX8xiHI6aIlzUXoimXi6nlh8J6/c2SPzObI=; b=hdDdHb6+YU61iWyIcsMzv46O4lm8YEqgQmFRjM4yDk+Oa9JxQy+DNy3cf22DEbvtII mfdwkTQvJoisPAJKA6G7BnmprNoGoEvjlB6JIya3dVTR40Z79ol/NWgHnI+t0v9dQPK2 3yUMbiZ3cI2d4uUrYRxxqbPSq6W9CHG/p0Z/6XaDfBLV+9EVPS/3aLdiukvcty8vt61n xUFhZUprTrFr0FSjJU/yGuePL9udA74cGFx72kv7eb183AQ22NIdFNwRDuBHw10mb4V2 kEw6UZJagv9jQKJXPU2VRFXGRhc8qP/tKW7V/56hPRWw0du+9Rbp6V6OmJeUyR0CIyCY nAPQ== X-Gm-Message-State: AAQBX9fxDbvTxQCvJ5j9oW0oIk2ySlmTO3j4uN6jvtFbnnABcSLx06s6 sKaAXkGDJC886MltPoqUAaSfsRfkTU3W5T8IHnkLd4nd5IAyjqxqpZIqnGaK2fzZXXjoTDo8WD7 wGKDd3z3f+pH6hzOuV5Tc1rfD X-Received: by 2002:adf:fe8b:0:b0:2f0:2d96:1c5a with SMTP id l11-20020adffe8b000000b002f02d961c5amr4138807wrr.32.1681677926211; Sun, 16 Apr 2023 13:45:26 -0700 (PDT) X-Received: by 2002:adf:fe8b:0:b0:2f0:2d96:1c5a with SMTP id l11-20020adffe8b000000b002f02d961c5amr4138799wrr.32.1681677925915; Sun, 16 Apr 2023 13:45:25 -0700 (PDT) Received: from redhat.com ([2.52.136.129]) by smtp.gmail.com with ESMTPSA id g17-20020adff3d1000000b002f777345d21sm6099498wrp.95.2023.04.16.13.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Apr 2023 13:45:25 -0700 (PDT) Date: Sun, 16 Apr 2023 16:45:22 -0400 From: "Michael S. Tsirkin" To: Alvaro Karsz Cc: "jasowang@redhat.com" , "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: <20230416164453-mutt-send-email-mst@kernel.org> References: <20230416074607.292616-1-alvaro.karsz@solid-run.com> 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 Sun, Apr 16, 2023 at 04:54:57PM +0000, Alvaro Karsz wrote: > After further consideration, other virtio drivers need a minimum limit to the vring size too. > > Maybe this can be more general, for example a new virtio_driver callback that is called (if implemented) during virtio_dev_probe, before drv->probe. > > What do you think? > > Thanks, > Alvaro Let's start with what you did here, when more than 2 drivers do it we'll move it to core. -- MST