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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6426EC05027 for ; Fri, 10 Feb 2023 06:19:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230285AbjBJGTL (ORCPT ); Fri, 10 Feb 2023 01:19:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbjBJGTK (ORCPT ); Fri, 10 Feb 2023 01:19:10 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73A315BA71 for ; Thu, 9 Feb 2023 22:19:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0E49D61CB7 for ; Fri, 10 Feb 2023 06:19:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0313FC433EF; Fri, 10 Feb 2023 06:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676009948; bh=buAMJpgVNdlJLSorXT2KIxFdsp45sqq3TSWk3lR/ofE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pvPCSl7h4uLg3QfSg8oKzIVPLesKfZ4xYQtQsBCVDd4Eifp/AYJONtvzkgjmgp7Bp kNASLLCcZTHaM781QccPQ0pLETTBHIagnwOYdJLtzOwtIrBX33j09LMTTb3rJ9wcnY IcJLuKvFUxXV/+sYLqZl/nxaz/Ln6At56OuaK9Ei7j8nI5bdKvQ57a29IbSobGJLMU vvwBhBi08w/zEws98JKy+S+2IW5PrOeQBSzpp0mtmvB3aqRp6KY+UKoDf5Zxgo74F0 VB+pd/Xmgy+dgtFyEg+qTWIt8Sb6t7msxry5GGghktZem/p+51X1iKWCUIHbvddj7o 0VH3JZow9qWqg== Date: Thu, 9 Feb 2023 22:19:06 -0800 From: Jakub Kicinski To: Oz Shlomo Cc: , Saeed Mahameed , Roi Dayan , "Jiri Pirko" , Marcelo Ricardo Leitner , "Simon Horman" , Baowen Zheng , Jamal Hadi Salim , Edward Cree Subject: Re: [PATCH net-next v3 2/9] net/sched: act_pedit, setup offload action for action stats query Message-ID: <20230209221906.6a69c79f@kernel.org> In-Reply-To: <20230206135442.15671-3-ozsh@nvidia.com> References: <20230206135442.15671-1-ozsh@nvidia.com> <20230206135442.15671-3-ozsh@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 6 Feb 2023 15:54:35 +0200 Oz Shlomo wrote: > + for (k = 1; k < tcf_pedit_nkeys(act); k++) { > + last_cmd = cmd; > + cmd = tcf_pedit_cmd(act, k); > + > + if (cmd != last_cmd) { > + NL_SET_ERR_MSG_MOD(extack, "Unsupported pedit command offload"); > + return -EOPNOTSUPP; > + } Is there a reason you're comparing to previous and not just always to the first one - since they all must be the same?