|
@@ -8741,12 +8741,22 @@ 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 */
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
|
|
- /* Uplink is a bridge in VEB mode */
|
|
|
|
- return 1;
|
|
|
|
|
|
+ /* VEPA is now default bridge, so return 0 */
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|