public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	Simon Horman <simon.horman@corigine.com>
Subject: Re: [Intel-wired-lan] [PATCH net-next v2 4/4] ice: use src VSI instead of src MAC in slow-path
Date: Tue, 4 Apr 2023 13:44:56 +0200	[thread overview]
Message-ID: <ZCwNuAOy7Okk66C0@localhost.localdomain> (raw)
In-Reply-To: <43a33d1a-3b04-86a1-b538-d906b517b7d0@intel.com>

On Tue, Apr 04, 2023 at 12:30:42PM +0200, Alexander Lobakin wrote:
> From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Date: Tue,  4 Apr 2023 09:28:33 +0200
> 
> > The use of a source  MAC to direct packets from the VF to the
> > corresponding port representor is only ok if there is only one
> > MAC on a VF. To support this functionality when the number
> > of MACs on a VF is greater, it is necessary to match a source
> > VSI instead of a source MAC.
> 
> [...]
> 
> > @@ -32,11 +31,9 @@
> >  	if·(!list)
> >  		return·-ENOMEM;
> >
> > -	list[0].type·=·ICE_MAC_OFOS;
> > -	ether_addr_copy(list[0].h_u.eth_hdr.src_addr,·mac);
> > -	eth_broadcast_addr(list[0].m_u.eth_hdr.src_addr);
> > +	ice_rule_add_src_vsi_metadata(&list[0]);
> 
> &list[0] == list.
> 

Will do

> > -	rule_info.sw_act.flag·|=·ICE_FLTR_TX;
> > +	rule_info.sw_act.flag·=·ICE_FLTR_TX;
> >  	rule_info.sw_act.vsi_handle·=·ctrl_vsi->idx;
> 
> [...]
> 
> > @@ -269,10 +235,18 @@ static int ice_eswitch_setup_reprs(struct ice_pf *pf)
> >  			goto err;
> >  		}
> >  
> > +		if (ice_eswitch_add_vf_sp_rule(pf, vf)) {
> > +			ice_fltr_add_mac_and_broadcast(vsi,
> > +						       vf->hw_lan_addr,
> 
> Fits into the previous line :p
>

Yeah, will move it.

> > +						       ICE_FWD_TO_VSI);
> > +			goto err;
> > +		}
> > +
> 
> [...]
> 
> > diff --git a/drivers/net/ethernet/intel/ice/ice_protocol_type.h b/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> > index ed0ab8177c61..664e2f45e249 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> > +++ b/drivers/net/ethernet/intel/ice/ice_protocol_type.h
> > @@ -256,7 +256,9 @@ struct ice_nvgre_hdr {
> >   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> >   *
> >   * Source VSI = Source VSI of packet loopbacked in switch (for egress) (10b).
> > - *
> > + */
> > +#define ICE_MDID_SOURCE_VSI_MASK 0x3ff
> 
> GENMASK()?
>

Sorry, it should be there (Simon pointed it), but I forgot about
amending :( . Thanks for catching it.

> > +/*
> 
> A newline before this line maybe to improve readability a bit?
>

Will add

> >   * MDID 20
> >   * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> >   * |A|B|C|D|E|F|R|R|G|H|I|J|K|L|M|N|
> 
> [...]
> 
> > --- a/drivers/net/ethernet/intel/ice/ice_repr.h
> > +++ b/drivers/net/ethernet/intel/ice/ice_repr.h
> > @@ -13,9 +13,8 @@ struct ice_repr {
> >  	struct net_device *netdev;
> >  	struct metadata_dst *dst;
> >  #ifdef CONFIG_ICE_SWITCHDEV
> > -	/* info about slow path MAC rule  */
> > -	struct ice_rule_query_data *mac_rule;
> > -	u8 rule_added;
> > +	/* info about slow path rule  */
> 
> Two spaces after 'rule' here :s
>

Will fix

> > +	struct ice_rule_query_data sp_rule;
> >  #endif
> >  };
> [...]
> 
> Thanks,
> Olek

Thanks for the review
Michal

  reply	other threads:[~2023-04-04 11:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04  7:28 [PATCH net-next v2 0/4] ice: allow matching on meta data Michal Swiatkowski
2023-04-04  7:28 ` [PATCH net-next v2 1/4] ice: define meta data to match in switch Michal Swiatkowski
2023-04-04  7:28 ` [PATCH net-next v2 2/4] ice: remove redundant Rx field from rule info Michal Swiatkowski
2023-04-04 10:07   ` [Intel-wired-lan] " Alexander Lobakin
2023-04-04 11:40     ` Michal Swiatkowski
2023-04-04  7:28 ` [PATCH net-next v2 3/4] ice: allow matching on meta data Michal Swiatkowski
2023-04-04 10:22   ` [Intel-wired-lan] " Alexander Lobakin
2023-04-04 11:43     ` Michal Swiatkowski
2023-04-04  7:28 ` [PATCH net-next v2 4/4] ice: use src VSI instead of src MAC in slow-path Michal Swiatkowski
2023-04-04 10:30   ` [Intel-wired-lan] " Alexander Lobakin
2023-04-04 11:44     ` Michal Swiatkowski [this message]
2023-04-04 11:38   ` Paul Menzel
2023-04-05  8:07     ` Michal Swiatkowski

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=ZCwNuAOy7Okk66C0@localhost.localdomain \
    --to=michal.swiatkowski@linux.intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=simon.horman@corigine.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