public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine•com>
To: edward.cree@amd•com
Cc: linux-net-drivers@amd•com, davem@davemloft•net, kuba@kernel•org,
	pabeni@redhat•com, edumazet@google•com,
	Edward Cree <ecree.xilinx@gmail•com>,
	netdev@vger•kernel.org, habetsm.xilinx@gmail•com,
	michal.swiatkowski@linux•intel.com
Subject: Re: [PATCH net-next v2 6/6] sfc: add offloading of 'foreign' TC (decap) rules
Date: Sun, 26 Mar 2023 11:15:26 +0200	[thread overview]
Message-ID: <ZCANLhn5QygaA3m4@corigine.com> (raw)
In-Reply-To: <10dfddca2008ee4c2fab6407af4dc3722f4ff384.1679603051.git.ecree.xilinx@gmail.com>

On Thu, Mar 23, 2023 at 08:45:14PM +0000, edward.cree@amd•com wrote:
> From: Edward Cree <ecree.xilinx@gmail•com>
> 
> A 'foreign' rule is one for which the net_dev is not the sfc netdevice
>  or any of its representors.  The driver registers indirect flow blocks
>  for tunnel netdevs so that it can offload decap rules.  For example:
> 
>     tc filter add dev vxlan0 parent ffff: protocol ipv4 flower \
>         enc_src_ip 10.1.0.2 enc_dst_ip 10.1.0.1 \
>         enc_key_id 1000 enc_dst_port 4789 \
>         action tunnel_key unset \
>         action mirred egress redirect dev $REPRESENTOR
> 
> When notified of a rule like this, register an encap match on the IP
>  and dport tuple (creating an Outer Rule table entry) and insert an MAE
>  action rule to perform the decapsulation and deliver to the representee.
> 
> Moved efx_tc_delete_rule() below efx_tc_flower_release_encap_match() to
>  avoid the need for a forward declaration.
> 
> Signed-off-by: Edward Cree <ecree.xilinx@gmail•com>

Looks good to me.


Reviewed-by: Simon Horman <simon.horman@corigine•com>

...

> +			list_add_tail(&act->list, &rule->acts.list);
> +			act = NULL;
> +			if (fa->id == FLOW_ACTION_REDIRECT)
> +				break; /* end of the line */

nit: 'act = NULL;' could go inside this if clause.

> +			/* Mirror, so continue on with saved act */
> +			act = kzalloc(sizeof(*act), GFP_USER);
> +			if (!act) {
> +				rc = -ENOMEM;
> +				goto release;
> +			}
> +			*act = save;
> +			break;

...

      reply	other threads:[~2023-03-26  9:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 20:45 [PATCH net-next v2 0/6] sfc: support TC decap rules edward.cree
2023-03-23 20:45 ` [PATCH net-next v2 1/6] sfc: document TC-to-EF100-MAE action translation concepts edward.cree
2023-03-25 12:05   ` Simon Horman
2023-03-23 20:45 ` [PATCH net-next v2 2/6] sfc: add notion of match on enc keys to MAE machinery edward.cree
2023-03-25 12:03   ` Simon Horman
2023-03-27  8:20     ` Edward Cree
2023-03-27  8:47       ` Simon Horman
2023-03-23 20:45 ` [PATCH net-next v2 3/6] sfc: handle enc keys in efx_tc_flower_parse_match() edward.cree
2023-03-25 12:07   ` Simon Horman
2023-03-23 20:45 ` [PATCH net-next v2 4/6] sfc: add functions to insert encap matches into the MAE edward.cree
2023-03-25 12:04   ` Simon Horman
2023-03-27  8:28     ` Edward Cree
2023-03-27  8:48       ` Simon Horman
2023-03-23 20:45 ` [PATCH net-next v2 5/6] sfc: add code to register and unregister encap matches edward.cree
2023-03-24  5:05   ` Jakub Kicinski
2023-03-24  9:10     ` Martin Habets
2023-03-24 18:37       ` Edward Cree
2023-03-24 17:16   ` kernel test robot
2023-03-26  9:18   ` Simon Horman
2023-03-23 20:45 ` [PATCH net-next v2 6/6] sfc: add offloading of 'foreign' TC (decap) rules edward.cree
2023-03-26  9:15   ` Simon Horman [this message]

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=ZCANLhn5QygaA3m4@corigine.com \
    --to=simon.horman@corigine$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=ecree.xilinx@gmail$(echo .)com \
    --cc=edumazet@google$(echo .)com \
    --cc=edward.cree@amd$(echo .)com \
    --cc=habetsm.xilinx@gmail$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux-net-drivers@amd$(echo .)com \
    --cc=michal.swiatkowski@linux$(echo .)intel.com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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