1*152f98e7SDanielle Ratson# SPDX-License-Identifier: GPL-2.0 2*152f98e7SDanielle Ratsonsource ../rif_mac_profile_scale.sh 3*152f98e7SDanielle Ratson 4*152f98e7SDanielle Ratsonrif_mac_profile_get_target() 5*152f98e7SDanielle Ratson{ 6*152f98e7SDanielle Ratson local should_fail=$1 7*152f98e7SDanielle Ratson local target 8*152f98e7SDanielle Ratson 9*152f98e7SDanielle Ratson target=$(devlink_resource_size_get rif_mac_profiles) 10*152f98e7SDanielle Ratson 11*152f98e7SDanielle Ratson if ((! should_fail)); then 12*152f98e7SDanielle Ratson echo $target 13*152f98e7SDanielle Ratson else 14*152f98e7SDanielle Ratson echo $((target + 1)) 15*152f98e7SDanielle Ratson fi 16*152f98e7SDanielle Ratson} 17