Commit 6cb10c06 authored by Martyna Szapar-Mudlaw's avatar Martyna Szapar-Mudlaw Committed by Tony Nguyen
Browse files

ice: improve error message for insufficient filter space



When adding a rule to switch through tc, if the operation fails
due to not enough free recipes (-ENOSPC), provide a clearer
error message: "Unable to add filter: insufficient space available."

This improves user feedback by distinguishing space limitations from
other generic failures.

Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: default avatarMartyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Tested-by: default avatarSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent e2193f9f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -996,6 +996,9 @@ ice_eswitch_add_tc_fltr(struct ice_vsi *vsi, struct ice_tc_flower_fltr *fltr)
		NL_SET_ERR_MSG_MOD(fltr->extack, "Unable to add filter because it already exist");
		ret = -EINVAL;
		goto exit;
	} else if (ret == -ENOSPC) {
		NL_SET_ERR_MSG_MOD(fltr->extack, "Unable to add filter: insufficient space available.");
		goto exit;
	} else if (ret) {
		NL_SET_ERR_MSG_MOD(fltr->extack, "Unable to add filter due to error");
		goto exit;
@@ -1228,6 +1231,10 @@ ice_add_tc_flower_adv_fltr(struct ice_vsi *vsi,
				   "Unable to add filter because it already exist");
		ret = -EINVAL;
		goto exit;
	} else if (ret == -ENOSPC) {
		NL_SET_ERR_MSG_MOD(tc_fltr->extack,
				   "Unable to add filter: insufficient space available.");
		goto exit;
	} else if (ret) {
		NL_SET_ERR_MSG_MOD(tc_fltr->extack,
				   "Unable to add filter due to error");