aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc_ethtool.c
diff options
context:
space:
mode:
authorFaizal Rahim <[email protected]>2025-03-18 03:07:39 +0000
committerTony Nguyen <[email protected]>2025-04-18 16:17:14 +0000
commit55ececab98856be35e8a418a25e1081df931f1eb (patch)
treeefb2c4e2b0087f670eb6c4b4efed21617d04c0b1 /drivers/net/ethernet/intel/igc/igc_ethtool.c
parentigc: add support for frame preemption verification (diff)
downloadkernel-55ececab98856be35e8a418a25e1081df931f1eb.tar.gz
kernel-55ececab98856be35e8a418a25e1081df931f1eb.zip
igc: add support to set tx-min-frag-size
Add support for setting tx-min-frag-size via the set_mm callback in igc. If the requested value is unsupported, round it up to the smallest supported i226 size (64, 128, 192, 256) and send a netlink message to inform the user. Co-developed-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Vinicius Costa Gomes <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: Faizal Rahim <[email protected]> Tested-by: Mor Bar-Gabay <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_ethtool.c')
-rw-r--r--drivers/net/ethernet/intel/igc/igc_ethtool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index b64d5c6c1d20..529654ccd83f 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -1789,6 +1789,11 @@ static int igc_ethtool_set_mm(struct net_device *netdev,
struct igc_adapter *adapter = netdev_priv(netdev);
struct igc_fpe_t *fpe = &adapter->fpe;
+ fpe->tx_min_frag_size = igc_fpe_get_supported_frag_size(cmd->tx_min_frag_size);
+ if (fpe->tx_min_frag_size != cmd->tx_min_frag_size)
+ NL_SET_ERR_MSG_MOD(extack,
+ "tx-min-frag-size value set is unsupported. Rounded up to supported value (64, 128, 192, 256)");
+
if (fpe->mmsv.pmac_enabled != cmd->pmac_enabled) {
if (cmd->pmac_enabled)
static_branch_inc(&igc_fpe_enabled);