netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Cree <ecree.xilinx@gmail.com>
To: Simon Horman <horms@kernel.org>, edward.cree@amd.com
Cc: linux-net-drivers@amd.com, davem@davemloft.net, kuba@kernel.org,
	edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org,
	habetsm.xilinx@gmail.com,
	Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Subject: Re: [PATCH net-next 7/7] sfc: offload left-hand side rules for conntrack
Date: Mon, 7 Aug 2023 14:12:24 +0100	[thread overview]
Message-ID: <a6510880-1617-84e7-f5f2-e417feb65285@gmail.com> (raw)
In-Reply-To: <ZM0Ac2MZxamaS0bG@kernel.org>

On 04/08/2023 14:43, Simon Horman wrote:
> 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.

Yeah, I see on patchwork that clang complained about this.
Since the fallthrough is only into a break statement (which is
 presumably why gcc doesn't mind), I'll just add a break here.

> Otherwise the series looks good to me.

Thanks, will respin v2 shortly with your tag included.

  reply	other threads:[~2023-08-07 13:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03 11:56 [PATCH net-next 0/7] sfc: basic conntrack offload edward.cree
2023-08-03 11:56 ` [PATCH net-next 1/7] sfc: add MAE table machinery for conntrack table edward.cree
2023-08-03 11:56 ` [PATCH net-next 2/7] sfc: functions to register for conntrack zone offload edward.cree
2023-08-03 11:56 ` [PATCH net-next 3/7] sfc: functions to insert/remove conntrack entries to MAE hardware edward.cree
2023-08-03 11:56 ` [PATCH net-next 4/7] sfc: offload conntrack flow entries (match only) from CT zones edward.cree
2023-08-03 11:56 ` [PATCH net-next 5/7] sfc: handle non-zero chain_index on TC rules edward.cree
2023-08-03 11:56 ` [PATCH net-next 6/7] sfc: conntrack state matches in " edward.cree
2023-08-03 11:56 ` [PATCH net-next 7/7] sfc: offload left-hand side rules for conntrack edward.cree
2023-08-04 13:43   ` Simon Horman
2023-08-07 13:12     ` Edward Cree [this message]
2023-08-07 14:44       ` Simon Horman
2023-08-04 13:44 ` [PATCH net-next 0/7] sfc: basic conntrack offload Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a6510880-1617-84e7-f5f2-e417feb65285@gmail.com \
    --to=ecree.xilinx@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=edward.cree@amd.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pieter.jansen-van-vuuren@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).