Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Ivan Vecera <ivecera@redhat.com>, <intel-wired-lan@lists.osuosl.org>
Cc: Wojciech Drewek <wojciech.drewek@intel.com>,
	netdev@vger.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
	Simon Horman <horms@kernel.org>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3 3/5] i40e: Add helpers to find VSI and VEB by SEID and use them
Date: Tue, 21 Nov 2023 15:05:11 -0800	[thread overview]
Message-ID: <f90bc4fc-d9e3-468c-8b94-73bea4b2d764@intel.com> (raw)
In-Reply-To: <20231116152114.88515-4-ivecera@redhat.com>



On 11/16/2023 7:21 AM, Ivan Vecera wrote:

> @@ -13197,17 +13193,14 @@ static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
>   	struct i40e_vsi *vsi = np->vsi;
>   	struct i40e_pf *pf = vsi->back;
>   	struct i40e_veb *veb = NULL;
> -	int i;
>   
>   	/* Only for PF VSI for now */
>   	if (vsi->seid != pf->vsi[pf->lan_vsi]->seid)
>   		return -EOPNOTSUPP;
>   
>   	/* Find the HW bridge for the PF VSI */
> -	i40e_pf_for_each_veb(pf, i, veb)
> -		if (veb->seid == vsi->uplink_seid)
> -			break;
> -	if (i == I40E_MAX_VEB)
> +	veb = i40e_pf_get_veb_by_seid(pf, vsi->uplink_seid);
> +	if (!vsi)
>   		return 0;

In addition to the kdoc stuff that Simon pointed out. Should this null 
check be against veb?

>   	return ndo_dflt_bridge_getlink(skb, pid, seq, dev, veb->bridge_mode,
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  parent reply	other threads:[~2023-11-21 23:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 15:21 [Intel-wired-lan] [PATCH iwl-next v3 0/5] i40e: Simplify VSI and VEB handling Ivan Vecera
2023-11-16 15:21 ` [Intel-wired-lan] [PATCH iwl-next v3 1/5] i40e: Use existing helper to find flow director VSI Ivan Vecera
2023-11-16 15:21 ` [Intel-wired-lan] [PATCH iwl-next v3 2/5] i40e: Introduce and use macros for iterating VSIs and VEBs Ivan Vecera
2023-11-16 15:21 ` [Intel-wired-lan] [PATCH iwl-next v3 3/5] i40e: Add helpers to find VSI and VEB by SEID and use them Ivan Vecera
2023-11-20 11:42   ` Simon Horman
2023-11-20 17:55     ` Ivan Vecera
2023-11-21 19:45       ` Simon Horman
2023-11-21 23:05   ` Tony Nguyen [this message]
2023-11-22  9:58     ` Ivan Vecera
2023-11-16 15:21 ` [Intel-wired-lan] [PATCH iwl-next v3 4/5] i40e: Fix broken support for floating VEBs Ivan Vecera
2023-11-16 15:21 ` [Intel-wired-lan] [PATCH iwl-next v3 5/5] i40e: Remove VEB recursion Ivan Vecera

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=f90bc4fc-d9e3-468c-8b94-73bea4b2d764@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=ivecera@redhat.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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