netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcin Szycik <marcin.szycik@linux.intel.com>
To: Andy Shevchenko <andy@kernel.org>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	wojciech.drewek@intel.com, michal.swiatkowski@linux.intel.com,
	aleksander.lobakin@intel.com, davem@davemloft.net,
	kuba@kernel.org, jiri@resnulli.us, pabeni@redhat.com,
	jesse.brandeburg@intel.com, simon.horman@corigine.com,
	idosch@nvidia.com
Subject: Re: [PATCH iwl-next v3 6/6] ice: Add support for PFCP hardware offload in switchdev
Date: Mon, 24 Jul 2023 15:58:51 +0200	[thread overview]
Message-ID: <24784f80-df7b-a666-a56b-9b4c288978a1@linux.intel.com> (raw)
In-Reply-To: <ZLqfJZi/14dyEzhH@smile.fi.intel.com>



On 21.07.2023 17:07, Andy Shevchenko wrote:
> On Fri, Jul 21, 2023 at 09:15:32AM +0200, Marcin Szycik wrote:
>> Add support for creating PFCP filters in switchdev mode. Add support
>> for parsing PFCP-specific tc options: S flag and SEID.
>>
>> To create a PFCP filter, a special netdev must be created and passed
>> to tc command:
>>
>> ip link add pfcp0 type pfcp
>> tc filter add dev eth0 ingress prio 1 flower pfcp_opts \
>> 1:123/ff:fffffffffffffff0 skip_hw action mirred egress redirect dev pfcp0
> 
> Can you indent this (by 2 spaces?) to differentiate with the commit message
> itself?

Sure.

> 
>> Changes in iproute2 [1] are required to be able to use pfcp_opts in tc.
>>
>> ICE COMMS package is required to create a filter as it contains PFCP
>> profiles.
> 
>> [1] https://lore.kernel.org/netdev/20230614091758.11180-1-marcin.szycik@linux.intel.com
> 
> We have Link: tag for such kind of stuff.

Are you sure this is a valid use of Link: tag? Patch that is linked here is
in another tree, and also I want to have [1] inline for context.

> 
> ...
> 
>> +	if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ENC_OPTS) &&
>> +	    fltr->tunnel_type == TNL_PFCP) {
>> +		struct flow_match_enc_opts match;
>> +
>> +		flow_rule_match_enc_opts(rule, &match);
>> +
>> +		memcpy(&fltr->pfcp_meta_keys, &match.key->data[0],
>> +		       sizeof(struct pfcp_metadata));
> 
> Why not simply
> 
> 		match.key->data
> 
> ?

Will change.

> 
>> +		memcpy(&fltr->pfcp_meta_masks, &match.mask->data[0],
>> +		       sizeof(struct pfcp_metadata));
> 
> Ditto.
> 
>> +		fltr->flags |= ICE_TC_FLWR_FIELD_PFCP_OPTS;
>> +	}
> 
> ...
> 
>>  #ifndef _ICE_TC_LIB_H_
>>  #define _ICE_TC_LIB_H_
> 
> Seems bits.h is missing...

Will add.

> 
>> +#include <net/pfcp.h>
>> +
>>  #define ICE_TC_FLWR_FIELD_DST_MAC		BIT(0)
>>  #define ICE_TC_FLWR_FIELD_SRC_MAC		BIT(1)
>>  #define ICE_TC_FLWR_FIELD_VLAN			BIT(2)
> 
> ...
> 
>>  #define ICE_TC_FLWR_FIELD_VLAN_PRIO		BIT(27)
>>  #define ICE_TC_FLWR_FIELD_CVLAN_PRIO		BIT(28)
>>  #define ICE_TC_FLWR_FIELD_VLAN_TPID		BIT(29)
>> +#define ICE_TC_FLWR_FIELD_PFCP_OPTS		BIT(30)
>>  
>>  #define ICE_TC_FLOWER_MASK_32   0xFFFFFFFF
> 
> ...and (at least) this can utilize GENMASK().

It can, but it's unrelated to this patch.


Thank you for review!
Marcin

  reply	other threads:[~2023-07-24 13:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21  7:15 [PATCH iwl-next v3 0/6] ice: Add PFCP filter support Marcin Szycik
2023-07-21  7:15 ` [PATCH iwl-next v3 1/6] ip_tunnel: use a separate struct to store tunnel params in the kernel Marcin Szycik
2023-07-21 14:21   ` Andy Shevchenko
2023-07-24 14:21     ` Alexander Lobakin
2023-07-21  7:15 ` [PATCH iwl-next v3 2/6] ip_tunnel: convert __be16 tunnel flags to bitmaps Marcin Szycik
     [not found]   ` <ZLqZRFa1VOHHWCqX@smile.fi.intel.com>
2023-07-26 11:09     ` Alexander Lobakin
2023-07-26 12:01       ` Andy Shevchenko
2023-07-26 12:05         ` Andy Shevchenko
2023-07-26 13:16         ` Alexander Lobakin
2023-07-26 14:32           ` Andy Shevchenko
2023-07-21  7:15 ` [PATCH iwl-next v3 3/6] pfcp: add PFCP module Marcin Szycik
2023-07-21 14:54   ` Andy Shevchenko
2023-07-24 10:36     ` Marcin Szycik
2023-07-21  7:15 ` [PATCH iwl-next v3 4/6] pfcp: always set pfcp metadata Marcin Szycik
2023-07-21 15:02   ` Andy Shevchenko
2023-07-24 13:19     ` Marcin Szycik
2023-07-21  7:15 ` [PATCH iwl-next v3 5/6] ice: refactor ICE_TC_FLWR_FIELD_ENC_OPTS Marcin Szycik
2023-07-21  7:15 ` [PATCH iwl-next v3 6/6] ice: Add support for PFCP hardware offload in switchdev Marcin Szycik
2023-07-21 15:07   ` Andy Shevchenko
2023-07-24 13:58     ` Marcin Szycik [this message]
2023-07-24 14:10       ` Andy Shevchenko

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=24784f80-df7b-a666-a56b-9b4c288978a1@linux.intel.com \
    --to=marcin.szycik@linux.intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=andy@kernel.org \
    --cc=davem@davemloft.net \
    --cc=idosch@nvidia.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=simon.horman@corigine.com \
    --cc=wojciech.drewek@intel.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).