From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 908CDCD4F4E for ; Thu, 5 Sep 2024 01:58:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 50259812D3; Thu, 5 Sep 2024 01:58:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id VJ5TigUA46WA; Thu, 5 Sep 2024 01:58:53 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B376181287 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1725501533; bh=3OjI/MAlMmPGmvWzFZuILvop1U2yTKvlTXJgLKlKFc0=; h=Date:From:To:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=N2E6+44tV6gdSKjB4ssKdwPT9LdPW8bS4jKSgL9VYcVX1H6kjOs8IMRnVAwYslnJo +3/Yq1Dv+eThZn/5iZFYH8P69svXXxzeiXqjh/emTpq+s0nVbu2h18x7v3x8yc7wso W6gFjB/n5/pk7hz5XbESJdd4ogO6bJGJ2P6AojxNVxwYQc1A2NwGQ6H7XTHGNxZ7YJ FigaKH9P7UPUbW13QXr7P7lyoS9+Zxi+6K8qMtxMYt++6PBa2bYyKfUwwVeOnILZGs xLIAwB2KDs7G5zYSDZ7LgqZylR9R4S6E3WY8lQIeCkiErtCfIvaXUa4BLF6co5aN8j Bv2I1YyJoMXuA== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id B376181287; Thu, 5 Sep 2024 01:58:53 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 6B04A1BF3C5 for ; Thu, 5 Sep 2024 01:58:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 63F2381287 for ; Thu, 5 Sep 2024 01:58:52 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 36YRQ1R8UEDf for ; Thu, 5 Sep 2024 01:58:51 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=147.75.193.91; helo=nyc.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org A76398113D DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A76398113D Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by smtp1.osuosl.org (Postfix) with ESMTPS id A76398113D for ; Thu, 5 Sep 2024 01:58:51 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 0A5EDA43E8F; Thu, 5 Sep 2024 01:58:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57238C4CEC2; Thu, 5 Sep 2024 01:58:49 +0000 (UTC) Date: Wed, 4 Sep 2024 18:58:48 -0700 From: Jakub Kicinski To: Paolo Abeni Message-ID: <20240904185848.19a7f588@kernel.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725501529; bh=Dp0uIt19uV8jfyz1blroxyh65yMot6gtYdnqFbeY5Wo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VSSIk2UNCV0ui1IywpeOjyXPH0o6sqeolm49JPArO+VfXLeexPCQSWqoo09RYEF7V rilv4BfCu3N7hL1bEI0Rkhq9Ruo/1RXmGMRDu5RnM4V7JM1tvoaBciXHqedGJL/wah uWZ0zKw51cCv0BsnD3+16sfRNIoPDvhIu5xm7yKAUIHbclj7+47pFY/EMcvCppY+Xu 9O4Tf98ShoyQRGaZEQGPURH6B7sA4+Sszx4zZUEc6Mp3UBJmSWecHiIkh4GgfgP+EJ kvowgyUCeYdkJvVRGcqZ79BVRzAimdjPndcEhYHjDi1u7chQcrgGBVFzen3o32LvMu djDONxxm4dDNw== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=VSSIk2UN Subject: Re: [Intel-wired-lan] [PATCH v6 net-next 14/15] iavf: Add net_shaper_ops support X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiri Pirko , netdev@vger.kernel.org, John Fastabend , Jamal Hadi Salim , edumazet@google.com, Madhu Chittim , anthony.l.nguyen@intel.com, Simon Horman , Sridhar Samudrala , Donald Hunter , intel-wired-lan@lists.osuosl.org, przemyslaw.kitszel@intel.com, Sunil Kovvuri Goutham Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, 4 Sep 2024 15:53:46 +0200 Paolo Abeni wrote: > +static int iavf_verify_handle(struct net_shaper_binding *binding, > + const struct net_shaper_handle *handle, > + struct netlink_ext_ack *extack) > +{ > + struct iavf_adapter *adapter = netdev_priv(binding->netdev); > + int qid = handle->id; > + > + if (qid >= adapter->num_active_queues) { > + NL_SET_ERR_MSG_FMT(extack, "Invalid shaper handle, queued id %d max %d", > + qid, adapter->num_active_queues); > + return -EINVAL; > + } > + return 0; > +} This can go once we have the real_num validation in the core? Otherwise LGTM!