Re: [RESEND PATCH net-next] amd-xgbe: Configure and retrieve 'tx-usecs' for Tx coalescing

From: Badole, Vishal
Date: Sat Jul 26 2025 - 07:08:34 EST




On 7/26/2025 6:37 AM, Jakub Kicinski wrote:
On Sat, 19 Jul 2025 12:56:08 +0530 Vishal Badole wrote:
+ /* Check if both tx_usecs and tx_frames are set to 0 simultaneously */
+ if (!tx_usecs && !tx_frames) {
+ netdev_err(netdev,
+ "tx_usecs and tx_frames must not be 0 together\n");
+ return -EINVAL;
+ }
+
/* Check the bounds of values for Tx */
+ if (tx_usecs > XGMAC_MAX_COAL_TX_TICK) {
+ netdev_err(netdev, "tx-usecs is limited to %d usec\n",
+ XGMAC_MAX_COAL_TX_TICK);
+ return -EINVAL;
+ }

Please use extack to report the error to the user rather than system
logs.

Thank you for your observations. Since this driver is quite old, we have used netdev_err() to report errors to maintain consistency. In the future, we plan to upgrade the driver to use netlink interfaces with extack parameters for returning error information to user-space.