Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09603eaa authored by Akeem G Abodunrin's avatar Akeem G Abodunrin Committed by Jeff Kirsher
Browse files

i40e: Fix VEB/VEPA bridge mode mismatch issue



Fix i40e_is_vsi_uplink_mode_veb to check if bridge is actually
in VEB mode before allowing LB in the add VSI routine, instead of
unconditionally returning VEB bridge mode.

Change-ID: I162397b1bdd02367735fe9baaeb51465be2a3ce9
Signed-off-by: default avatarAkeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 10dc0358
Loading
Loading
Loading
Loading
+13 −3
Original line number Original line Diff line number Diff line
@@ -8741,14 +8741,24 @@ int i40e_is_vsi_uplink_mode_veb(struct i40e_vsi *vsi)
		return 1;
		return 1;


	veb = pf->veb[vsi->veb_idx];
	veb = pf->veb[vsi->veb_idx];
	if (!veb) {
		dev_info(&pf->pdev->dev,
			 "There is no veb associated with the bridge\n");
		return -ENOENT;
	}

	/* Uplink is a bridge in VEPA mode */
	/* Uplink is a bridge in VEPA mode */
	if (veb && (veb->bridge_mode & BRIDGE_MODE_VEPA))
	if (veb->bridge_mode & BRIDGE_MODE_VEPA) {
		return 0;
		return 0;

	} else {
		/* Uplink is a bridge in VEB mode */
		/* Uplink is a bridge in VEB mode */
		return 1;
		return 1;
	}
	}


	/* VEPA is now default bridge, so return 0 */
	return 0;
}

/**
/**
 * i40e_add_vsi - Add a VSI to the switch
 * i40e_add_vsi - Add a VSI to the switch
 * @vsi: the VSI being configured
 * @vsi: the VSI being configured