public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcin Szycik <marcin.szycik@linux.intel.com>
To: "Asbjørn Sloth Tønnesen" <ast@fiberby.net>, netdev@vger.kernel.org
Cc: Louis Peens <louis.peens@corigine.com>,
	Davide Caratti <dcaratti@redhat.com>,
	Leon Romanovsky <leon@kernel.org>,
	linux-net-drivers@amd.com, intel-wired-lan@lists.osuosl.org,
	oss-drivers@corigine.com, i.maximets@ovn.org,
	Tariq Toukan <tariqt@nvidia.com>,
	linux-kernel@vger.kernel.org,
	Edward Cree <ecree.xilinx@gmail.com>,
	Eric Dumazet <edumazet@google.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Martin Habets <habetsm.xilinx@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-rdma@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH net-next 5/5] ice: flower: validate encapsulation control flags
Date: Mon, 10 Jun 2024 11:06:13 +0200	[thread overview]
Message-ID: <ef9d16e6-186d-4ee3-9888-1c4aba1b4b88@linux.intel.com> (raw)
In-Reply-To: <20240609173358.193178-6-ast@fiberby.net>



On 09.06.2024 19:33, Asbjørn Sloth Tønnesen wrote:
> Encapsulation control flags are currently not used anywhere,
> so all flags are currently unsupported by all drivers.
> 
> This patch adds validation of this assumption, so that
> encapsulation flags may be used in the future.
> 
> In case any encapsulation control flags are masked,
> flow_rule_match_has_enc_control_flags() sets a NL extended
> error message, and we return -EOPNOTSUPP.
> 
> Only compile tested.

Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>

> Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
> ---
>  drivers/net/ethernet/intel/ice/ice_tc_lib.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
> index 8bd24b33f3a67..e6923f8121a99 100644
> --- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
> @@ -1353,6 +1353,7 @@ ice_parse_tunnel_attr(struct net_device *dev, struct flow_rule *rule,
>  		      struct ice_tc_flower_fltr *fltr)
>  {
>  	struct ice_tc_flower_lyr_2_4_hdrs *headers = &fltr->outer_headers;
> +	struct netlink_ext_ack *extack = fltr->extack;
>  	struct flow_match_control enc_control;
>  
>  	fltr->tunnel_type = ice_tc_tun_get_type(dev);
> @@ -1373,6 +1374,9 @@ ice_parse_tunnel_attr(struct net_device *dev, struct flow_rule *rule,
>  
>  	flow_rule_match_enc_control(rule, &enc_control);
>  
> +	if (flow_rule_has_enc_control_flags(enc_control.mask->flags, extack))
> +		return -EOPNOTSUPP;
> +
>  	if (enc_control.key->addr_type == FLOW_DISSECTOR_KEY_IPV4_ADDRS) {
>  		struct flow_match_ipv4_addrs match;
>  

  reply	other threads:[~2024-06-10  9:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-09 17:33 [PATCH net-next 0/5] net: flower: validate encapsulation control flags Asbjørn Sloth Tønnesen
2024-06-09 17:33 ` [PATCH net-next 1/5] flow_offload: add encapsulation control flag helpers Asbjørn Sloth Tønnesen
2024-06-09 17:33 ` [PATCH net-next 2/5] sfc: use flow_rule_is_supp_enc_control_flags() Asbjørn Sloth Tønnesen
2024-06-10 19:31   ` Edward Cree
2024-06-09 17:33 ` [PATCH net-next 3/5] net/mlx5e: flower: validate encapsulation control flags Asbjørn Sloth Tønnesen
2024-06-09 17:33 ` [PATCH net-next 4/5] nfp: " Asbjørn Sloth Tønnesen
2024-06-11  7:24   ` Louis Peens
2024-06-09 17:33 ` [PATCH net-next 5/5] ice: " Asbjørn Sloth Tønnesen
2024-06-10  9:06   ` Marcin Szycik [this message]
2024-06-11  9:09 ` [PATCH net-next 0/5] net: " Davide Caratti
2024-06-13  1:04 ` Jakub Kicinski
2024-06-13 17:38   ` Asbjørn Sloth Tønnesen
2024-06-13  1:10 ` patchwork-bot+netdevbpf

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=ef9d16e6-186d-4ee3-9888-1c4aba1b4b88@linux.intel.com \
    --to=marcin.szycik@linux.intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ast@fiberby.net \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=i.maximets@ovn.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=louis.peens@corigine.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@corigine.com \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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