From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44911BE6D for ; Fri, 4 Aug 2023 13:43:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD59BC433C8; Fri, 4 Aug 2023 13:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691156599; bh=WF+BCfLicDbntAVz2V7em89LVOAKPuE4WtSKVjLWPp0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BGF1+v9PCUe2Zzfi+iVuN1cX2feHXgyJ1qHJN5JH0kxk4xloDRIIiPhL3I/33RZc0 UbRE/dLNiBEnHb7VSEQImvncNKc2yhnzShlhm+VYzqdVesIWihmhmQ9W6vE47Z4J63 ig0gwN/eMOPWpCR500PJlwaGGktLYQ2Q9UmCNdB+rj24awqcn2jdpiLStEj9evFTL0 ssJ+xydvZDktiRc+tCc20AmsMPwjWLgvcjAqu2D7tLTvHOtC6xVwE8bG+VldF5a9wX wtmnH79sJxVNOg/qtDyQhUQ6sFKBsF4DpMKDGOICbaPXA+xPpoOOG3jGEKP0ToUuJJ 0FdWjQAJa5NIQ== Date: Fri, 4 Aug 2023 15:43:15 +0200 From: Simon Horman To: edward.cree@amd.com Cc: linux-net-drivers@amd.com, davem@davemloft.net, kuba@kernel.org, edumazet@google.com, pabeni@redhat.com, Edward Cree , netdev@vger.kernel.org, habetsm.xilinx@gmail.com, Pieter Jansen van Vuuren Subject: Re: [PATCH net-next 7/7] sfc: offload left-hand side rules for conntrack Message-ID: References: <9794c4fd9a32138fb5b30c7b4944f4b09e026ac2.1691063676.git.ecree.xilinx@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9794c4fd9a32138fb5b30c7b4944f4b09e026ac2.1691063676.git.ecree.xilinx@gmail.com> On Thu, Aug 03, 2023 at 12:56:23PM +0100, edward.cree@amd.com wrote: ... > +static bool efx_tc_rule_is_lhs_rule(struct flow_rule *fr, > + struct efx_tc_match *match) > +{ > + const struct flow_action_entry *fa; > + int i; > + > + flow_action_for_each(i, fa, &fr->action) { > + switch (fa->id) { > + case FLOW_ACTION_GOTO: > + return true; > + case FLOW_ACTION_CT: > + /* If rule is -trk, or doesn't mention trk at all, then > + * a CT action implies a conntrack lookup (hence it's an > + * LHS rule). If rule is +trk, then a CT action could > + * just be ct(nat) or even ct(commit) (though the latter > + * can't be offloaded). > + */ > + if (!match->mask.ct_state_trk || !match->value.ct_state_trk) > + return true; Hi Ed, I think that to keep static analysers happy there ought to be a break statement, or a fallthrough annotation here. Otherwise the series looks good to me. > + default: > + break; > + } > + } > + return false; > +} ...