lkml.org 
[lkml]   [2023]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH iwl-next v3 3/5] i40e: Add helpers to find VSI and VEB by SEID and use them
From


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,

\
 
 \ /
  Last update: 2023-11-22 00:05    [W:0.113 / U:3.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site