Skip to content

Commit f968c56

Browse files
vladimirolteankuba-moo
authored andcommitted
net: enetc: shorten enetc_setup_xdp_prog() error message to fit NETLINK_MAX_FMTMSG_LEN
NETLINK_MAX_FMTMSG_LEN is currently hardcoded to 80, and we provide an error printf-formatted string having 96 characters including the terminating \0. Assuming each %d (representing a queue) gets replaced by a number having at most 2 digits (a reasonable assumption), the final string is also 96 characters wide, which is too much. Reduce the verbiage a bit by removing some (partially) redundant words, which makes the new printf-formatted string be 73 characters wide with the trailing newline. Fixes: 800db2d ("net: enetc: ensure we always have a minimum number of TXQs for stack") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/lkml/202311061336.4dsWMT1h-lkp@intel.com/ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/20231106160311.616118-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 34c4eff commit f968c56

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/freescale/enetc

1 file changed

+1
-1
lines changed

drivers/net/ethernet/freescale/enetc/enetc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,7 @@ static int enetc_setup_xdp_prog(struct net_device *ndev, struct bpf_prog *prog,
27692769
if (priv->min_num_stack_tx_queues + num_xdp_tx_queues >
27702770
priv->num_tx_rings) {
27712771
NL_SET_ERR_MSG_FMT_MOD(extack,
2772-
"Reserving %d XDP TXQs does not leave a minimum of %d TXQs for network stack (total %d available)",
2772+
"Reserving %d XDP TXQs does not leave a minimum of %d for stack (total %d)",
27732773
num_xdp_tx_queues,
27742774
priv->min_num_stack_tx_queues,
27752775
priv->num_tx_rings);

0 commit comments

Comments
 (0)