Linux Documentation
 help / color / mirror / Atom feed
From: Mohsin Bashir <mohsin.bashr@gmail.com>
To: Fan Gong <gongfan1@huawei.com>, Wu Di <wudi234@huawei.com>,
	Teng Peisen <tengpeisen@huawei.com>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Dimitri Daskalakis <dimitri.daskalakis1@gmail.com>,
	Harshitha Ramamurthy <hramamurthy@google.com>
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	luosifu <luosifu@huawei.com>, Xin Guo <guoxin09@huawei.com>,
	Zhou Shuai <zhoushuai28@huawei.com>, Wu Like <wulike1@huawei.com>,
	Shi Jing <shijing34@huawei.com>,
	Zheng Jiezhen <zhengjiezhen@h-partners.com>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>
Subject: Re: [PATCH net-next v11 1/5] hinic3: Add ethtool queue ops
Date: Tue, 21 Jul 2026 11:07:47 -0700	[thread overview]
Message-ID: <c4473a79-567a-430b-b463-f45d4ef3ea28@gmail.com> (raw)
In-Reply-To: <9c55508017d53dd642f1a9c864ad8dfd1e3fd500.1784538912.git.root@localhost.localdomain>



On 7/20/26 5:53 AM, Fan Gong wrote:
>    Implement following ethtool callback function:
> .get_ringparam
> .set_ringparam
> 
>    These callbacks allow users to utilize ethtool for detailed
> queue depth configuration and monitoring.
> 
>    Change port_state_mutex to state_lock as a unified mutex lock
> in hinic3_nic_dev.
> 
>    Tightens the success criterion for hinic3_rx_fill_buffers() in
> hinic3_configure_rxqs().
> 
>    Changes hinic3_tx_csum()/hinic3_tx_offload() to propagate
> skb_checksum_help() failures into a TX drop.
> 
>    Renames hinic3_uninit_qps() to hinic3_get_cur_qps().
> 
>    Splits hinic3_open_channel() into hinic3_prepare_channel() and
> hinic3_open_channel().
> 

It may just be me, but I feel like there is a lot going in this single 
patch. Ideally, a patch should carry one logical change. This patch is 
doing 3 things: refactor, new code, bug-fixing in the hinic3_close() path.

> Co-developed-by: Wu Di <wudi234@huawei.com>
> Signed-off-by: Wu Di <wudi234@huawei.com>
> Co-developed-by: Teng Peisen <tengpeisen@huawei.com>
> Signed-off-by: Teng Peisen <tengpeisen@huawei.com>
> Signed-off-by: Fan Gong <gongfan1@huawei.com>
> ---
>   .../ethernet/huawei/hinic3/hinic3_ethtool.c   |  91 +++++++++++++++
>   .../net/ethernet/huawei/hinic3/hinic3_main.c  |   4 +-
>   .../huawei/hinic3/hinic3_netdev_ops.c         | 106 ++++++++++++++++--
>   .../ethernet/huawei/hinic3/hinic3_nic_dev.h   |  11 +-
>   .../ethernet/huawei/hinic3/hinic3_nic_io.c    |   4 +-
>   .../ethernet/huawei/hinic3/hinic3_nic_io.h    |   8 +-
>   .../net/ethernet/huawei/hinic3/hinic3_rx.c    |   2 +-
>   .../net/ethernet/huawei/hinic3/hinic3_tx.c    |   7 +-
>   8 files changed, 216 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_ethtool.c b/drivers/net/ethernet/huawei/hinic3/hinic3_ethtool.c
> index 90fc16288de9..e6dff46a0d00 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_ethtool.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_ethtool.c
> @@ -9,6 +9,7 @@
>   #include <linux/errno.h>
>   #include <linux/etherdevice.h>
>   #include <linux/netdevice.h>
> +#include <linux/netlink.h>
>   #include <linux/ethtool.h>
>   
>   #include "hinic3_lld.h"
> @@ -409,6 +410,94 @@ hinic3_get_link_ksettings(struct net_device *netdev,
>   	return 0;
>   }
>   
> +static void hinic3_get_ringparam(struct net_device *netdev,
> +				 struct ethtool_ringparam *ring,
> +				 struct kernel_ethtool_ringparam *kernel_ring,
> +				 struct netlink_ext_ack *extack)
> +{
> +	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
> +
> +	ring->rx_max_pending = HINIC3_MAX_RX_QUEUE_DEPTH;
> +	ring->tx_max_pending = HINIC3_MAX_TX_QUEUE_DEPTH;
> +	ring->rx_pending = nic_dev->q_params.rq_depth;
> +	ring->tx_pending = nic_dev->q_params.sq_depth;
> +}
> +
> +static void hinic3_update_qp_depth(struct net_device *netdev,
> +				   u32 sq_depth, u32 rq_depth)
> +{
> +	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
> +	u16 i;
> +
> +	nic_dev->q_params.sq_depth = sq_depth;
> +	nic_dev->q_params.rq_depth = rq_depth;
> +	for (i = 0; i < nic_dev->max_qps; i++) {
> +		nic_dev->txqs[i].q_depth = sq_depth;
> +		nic_dev->txqs[i].q_mask = sq_depth - 1;
> +		nic_dev->rxqs[i].q_depth = rq_depth;
> +		nic_dev->rxqs[i].q_mask = rq_depth - 1;
> +	}
> +}
> +
> +static int hinic3_check_ringparam_valid(struct net_device *netdev,
> +					const struct ethtool_ringparam *ring,
> +					struct netlink_ext_ack *extack)
> +{
> +	if (ring->tx_pending < HINIC3_MIN_QUEUE_DEPTH ||
> +	    ring->rx_pending < HINIC3_MIN_QUEUE_DEPTH) {
> +		NL_SET_ERR_MSG_FMT_MOD(extack,
> +				       "Queue depth underflow[%d]: tx[%d], rx[%d]",
> +				       HINIC3_MIN_QUEUE_DEPTH,
> +				       ring->tx_pending, ring->rx_pending);
> +
> +		return -EINVAL;
> +	}
> +
> +	return 0;
> +}
> +
> +static int hinic3_set_ringparam(struct net_device *netdev,
> +				struct ethtool_ringparam *ring,
> +				struct kernel_ethtool_ringparam *kernel_ring,
> +				struct netlink_ext_ack *extack)
> +{
> +	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
> +	struct hinic3_dyna_txrxq_params q_params = {};
> +	u32 new_sq_depth, new_rq_depth;
> +	int err;
> +
> +	err = hinic3_check_ringparam_valid(netdev, ring, extack);
> +	if (err)
> +		return err;
> +
> +	new_sq_depth = rounddown_pow_of_two(ring->tx_pending);
> +	new_rq_depth = rounddown_pow_of_two(ring->rx_pending);
> +	if (new_sq_depth == nic_dev->q_params.sq_depth &&
> +	    new_rq_depth == nic_dev->q_params.rq_depth)
> +		return 0;
> +
> +	if (new_sq_depth != ring->tx_pending ||
> +	    new_rq_depth != ring->rx_pending)
> +		NL_SET_ERR_MSG_FMT_MOD(extack,
> +				       "Requested Tx/Rx ring depth %u/%u trimmed to %u/%u",
> +				       ring->tx_pending, ring->rx_pending,
> +				       new_sq_depth, new_rq_depth);
> +
> +	if (!netif_running(netdev)) {
> +		hinic3_update_qp_depth(netdev, new_sq_depth, new_rq_depth);
> +	} else {
> +		q_params = nic_dev->q_params;
> +		q_params.sq_depth = new_sq_depth;
> +		q_params.rq_depth = new_rq_depth;
> +
> +		err = hinic3_change_channel_settings(netdev, &q_params);
> +		if (err)
> +			return err;
> +	}
> +
> +	return 0;
> +}
> +
>   static const struct ethtool_ops hinic3_ethtool_ops = {
>   	.supported_coalesce_params      = ETHTOOL_COALESCE_USECS |
>   					  ETHTOOL_COALESCE_PKT_RATE_RX_USECS,
> @@ -417,6 +506,8 @@ static const struct ethtool_ops hinic3_ethtool_ops = {
>   	.get_msglevel                   = hinic3_get_msglevel,
>   	.set_msglevel                   = hinic3_set_msglevel,
>   	.get_link                       = ethtool_op_get_link,
> +	.get_ringparam                  = hinic3_get_ringparam,
> +	.set_ringparam                  = hinic3_set_ringparam,
>   };
>   
>   void hinic3_set_ethtool_ops(struct net_device *netdev)
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c b/drivers/net/ethernet/huawei/hinic3/hinic3_main.c
> index 0a888fe4c975..1e7ac3f330d7 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_main.c
> @@ -178,7 +178,7 @@ static int hinic3_sw_init(struct net_device *netdev)
>   	u8 mac_addr[ETH_ALEN];
>   	int err;
>   
> -	mutex_init(&nic_dev->port_state_mutex);
> +	mutex_init(&nic_dev->state_lock);
>   
>   	nic_dev->q_params.sq_depth = HINIC3_SQ_DEPTH;
>   	nic_dev->q_params.rq_depth = HINIC3_RQ_DEPTH;
> @@ -330,6 +330,8 @@ static void hinic3_link_status_change(struct net_device *netdev,
>   		netif_carrier_off(netdev);
>   		netdev_dbg(netdev, "Link is down\n");
>   	}
> +
> +	return;

Unrelated?

>   }
>   
>   static void hinic3_port_module_event_handler(struct net_device *netdev,
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c b/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
> index da73811641a9..7f304d7ac47b 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
> @@ -288,7 +288,8 @@ static void hinic3_free_channel_resources(struct net_device *netdev,
>   	hinic3_free_qps(nic_dev, qp_params);
>   }
>   
> -static int hinic3_open_channel(struct net_device *netdev)
> +static int hinic3_prepare_channel(struct net_device *netdev,
> +				  struct hinic3_dyna_txrxq_params *qp_params)
>   {
>   	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
>   	int err;
> @@ -299,12 +300,25 @@ static int hinic3_open_channel(struct net_device *netdev)
>   		return err;
>   	}
>   
> -	err = hinic3_configure_txrxqs(netdev, &nic_dev->q_params);
> +	err = hinic3_configure_txrxqs(netdev, qp_params);
>   	if (err) {
>   		netdev_err(netdev, "Failed to configure txrxqs\n");
>   		goto err_free_qp_ctxts;
>   	}
>   
> +	return 0;
> +
> +err_free_qp_ctxts:
> +	hinic3_free_qp_ctxts(nic_dev);
> +
> +	return err;
> +}
> +
> +static int hinic3_open_channel(struct net_device *netdev)
> +{
> +	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
> +	int err;
> +
>   	err = hinic3_qps_irq_init(netdev);
>   	if (err) {
>   		netdev_err(netdev, "Failed to init txrxq irq\n");
> @@ -321,6 +335,7 @@ static int hinic3_open_channel(struct net_device *netdev)
>   
>   err_uninit_qps_irq:
>   	hinic3_qps_irq_uninit(netdev);
> +
>   err_free_qp_ctxts:
>   	hinic3_free_qp_ctxts(nic_dev);
>   
> @@ -341,9 +356,7 @@ static int hinic3_maybe_set_port_state(struct net_device *netdev, bool enable)
>   	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
>   	int err;
>   
> -	mutex_lock(&nic_dev->port_state_mutex);
>   	err = hinic3_set_port_enable(nic_dev->hwdev, enable);
> -	mutex_unlock(&nic_dev->port_state_mutex);
>   
>   	return err;
>   }
> @@ -428,6 +441,76 @@ static void hinic3_vport_down(struct net_device *netdev)
>   	}
>   }
>   
> +int
> +hinic3_change_channel_settings(struct net_device *netdev,
> +			       struct hinic3_dyna_txrxq_params *trxq_params)
> +{
> +	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
> +	struct hinic3_dyna_txrxq_params cur_trxq_params = {};
> +	struct hinic3_dyna_qp_params new_qp_params = {};
> +	struct hinic3_dyna_qp_params cur_qp_params = {};
> +	int err;
> +
> +	mutex_lock(&nic_dev->state_lock);
> +	cur_trxq_params = nic_dev->q_params;
> +
> +	hinic3_config_num_qps(netdev, trxq_params);
> +
> +	err = hinic3_alloc_channel_resources(netdev, &new_qp_params,
> +					     trxq_params);
> +	if (err) {
> +		netdev_err(netdev, "Failed to alloc channel resources\n");
> +		hinic3_config_num_qps(netdev, &cur_trxq_params);
> +		mutex_unlock(&nic_dev->state_lock);
> +		return err;
> +	}
> +
> +	hinic3_vport_down(netdev);
> +	hinic3_close_channel(netdev);
> +	hinic3_get_cur_qps(nic_dev, &cur_qp_params);
> +
> +	hinic3_init_qps(nic_dev, &new_qp_params);
> +
> +	err = hinic3_prepare_channel(netdev, trxq_params);
> +	if (err)
> +		goto err_uninit_qps;
> +
> +	if (nic_dev->num_qp_irq > trxq_params->num_qps)
> +		hinic3_qp_irq_change(netdev, trxq_params->num_qps);
> +
> +	nic_dev->q_params = *trxq_params;
> +
> +	err = hinic3_open_channel(netdev);
> +	if (err)
> +		goto err_qp_irq_reset;
> +
> +	err = hinic3_vport_up(netdev);
> +	if (err)
> +		goto err_close_channel;
> +
> +	hinic3_free_channel_resources(netdev, &cur_qp_params, &cur_trxq_params);
> +
> +	mutex_unlock(&nic_dev->state_lock);
> +
> +	return 0;
> +
> +err_close_channel:
> +	hinic3_close_channel(netdev);
> +err_qp_irq_reset:
> +	nic_dev->q_params = cur_trxq_params;
> +
> +	if (trxq_params->num_qps > cur_trxq_params.num_qps)
> +		hinic3_qp_irq_change(netdev, cur_trxq_params.num_qps);
> +err_uninit_qps:
> +	hinic3_get_cur_qps(nic_dev, &new_qp_params);
> +	hinic3_config_num_qps(netdev, &cur_trxq_params);
> +	hinic3_init_qps(nic_dev, &cur_qp_params);
> +	hinic3_free_channel_resources(netdev, &new_qp_params, trxq_params);
> +	mutex_unlock(&nic_dev->state_lock);
> +
> +	return err;
> +}
> +
>   static int hinic3_open(struct net_device *netdev)
>   {
>   	struct hinic3_nic_dev *nic_dev = netdev_priv(netdev);
> @@ -458,6 +541,10 @@ static int hinic3_open(struct net_device *netdev)
>   
>   	hinic3_init_qps(nic_dev, &qp_params);
>   
> +	err = hinic3_prepare_channel(netdev, &nic_dev->q_params);
> +	if (err)
> +		goto err_uninit_qps;
> +
>   	err = hinic3_open_channel(netdev);
>   	if (err)
>   		goto err_uninit_qps;
> @@ -473,7 +560,7 @@ static int hinic3_open(struct net_device *netdev)
>   err_close_channel:
>   	hinic3_close_channel(netdev);
>   err_uninit_qps:
> -	hinic3_uninit_qps(nic_dev, &qp_params);
> +	hinic3_get_cur_qps(nic_dev, &qp_params);
>   	hinic3_free_channel_resources(netdev, &qp_params, &nic_dev->q_params);
>   err_destroy_num_qps:
>   	hinic3_destroy_num_qps(netdev);
> @@ -493,10 +580,15 @@ static int hinic3_close(struct net_device *netdev)
>   		return 0;
>   	}
>   
> +	mutex_lock(&nic_dev->state_lock);
>   	hinic3_vport_down(netdev);
>   	hinic3_close_channel(netdev);
> -	hinic3_uninit_qps(nic_dev, &qp_params);
> -	hinic3_free_channel_resources(netdev, &qp_params, &nic_dev->q_params);
> +	hinic3_get_cur_qps(nic_dev, &qp_params);
> +	hinic3_free_channel_resources(netdev, &qp_params,
> +				      &nic_dev->q_params);
> +	hinic3_free_nicio_res(nic_dev);
> +	hinic3_destroy_num_qps(netdev);

free_nicio_res(), and destroy_num_qps() looks like fixes to me on the 
clean-up path. Should these go to the net tree?


> +	mutex_unlock(&nic_dev->state_lock);
>   
>   	return 0;
>   }
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_dev.h b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_dev.h
> index 9502293ff710..ccef82d57fdd 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_dev.h
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_dev.h
> @@ -10,6 +10,9 @@
>   #include "hinic3_hw_cfg.h"
>   #include "hinic3_hwdev.h"
>   #include "hinic3_mgmt_interface.h"
> +#include "hinic3_nic_io.h"
> +#include "hinic3_tx.h"
> +#include "hinic3_rx.h"
>   
>   #define HINIC3_VLAN_BITMAP_BYTE_SIZE(nic_dev)  (sizeof(*(nic_dev)->vlan_bitmap))
>   #define HINIC3_VLAN_BITMAP_SIZE(nic_dev)  \
> @@ -127,8 +130,8 @@ struct hinic3_nic_dev {
>   	struct workqueue_struct         *workq;
>   	struct delayed_work             periodic_work;
>   	struct work_struct              rx_mode_work;
> -	/* lock for enable/disable port */
> -	struct mutex                    port_state_mutex;
> +	/* Protects Interface state */
> +	struct mutex                    state_lock;
>   
>   	struct list_head                uc_filter_list;
>   	struct list_head                mc_filter_list;
> @@ -143,6 +146,10 @@ struct hinic3_nic_dev {
>   
>   void hinic3_set_netdev_ops(struct net_device *netdev);
>   int hinic3_set_hw_features(struct net_device *netdev);
> +int
> +hinic3_change_channel_settings(struct net_device *netdev,
> +			       struct hinic3_dyna_txrxq_params *trxq_params);
> +
>   int hinic3_qps_irq_init(struct net_device *netdev);
>   void hinic3_qps_irq_uninit(struct net_device *netdev);
>   
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.c b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.c
> index 87e736adba02..0e7a0ccfba98 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.c
> @@ -484,8 +484,8 @@ void hinic3_init_qps(struct hinic3_nic_dev *nic_dev,
>   	}
>   }
>   
> -void hinic3_uninit_qps(struct hinic3_nic_dev *nic_dev,
> -		       struct hinic3_dyna_qp_params *qp_params)
> +void hinic3_get_cur_qps(struct hinic3_nic_dev *nic_dev,
> +			struct hinic3_dyna_qp_params *qp_params)
>   {
>   	struct hinic3_nic_io *nic_io = nic_dev->nic_io;
>   
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.h b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.h
> index 12eefabcf1db..571b34d63950 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.h
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.h
> @@ -14,6 +14,10 @@ struct hinic3_nic_dev;
>   #define HINIC3_RQ_WQEBB_SHIFT      3
>   #define HINIC3_SQ_WQEBB_SIZE       BIT(HINIC3_SQ_WQEBB_SHIFT)
>   
> +#define HINIC3_MAX_TX_QUEUE_DEPTH  65536
> +#define HINIC3_MAX_RX_QUEUE_DEPTH  16384
> +#define HINIC3_MIN_QUEUE_DEPTH     128
> +
>   /* ******************** RQ_CTRL ******************** */
>   enum hinic3_rq_wqe_type {
>   	HINIC3_NORMAL_RQ_WQE = 1,
> @@ -136,8 +140,8 @@ void hinic3_free_qps(struct hinic3_nic_dev *nic_dev,
>   		     struct hinic3_dyna_qp_params *qp_params);
>   void hinic3_init_qps(struct hinic3_nic_dev *nic_dev,
>   		     struct hinic3_dyna_qp_params *qp_params);
> -void hinic3_uninit_qps(struct hinic3_nic_dev *nic_dev,
> -		       struct hinic3_dyna_qp_params *qp_params);
> +void hinic3_get_cur_qps(struct hinic3_nic_dev *nic_dev,
> +			struct hinic3_dyna_qp_params *qp_params);
>   
>   int hinic3_init_qp_ctxts(struct hinic3_nic_dev *nic_dev);
>   void hinic3_free_qp_ctxts(struct hinic3_nic_dev *nic_dev);
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
> index 309ab5901379..389b1c2158be 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
> @@ -541,7 +541,7 @@ int hinic3_configure_rxqs(struct net_device *netdev, u16 num_rq,
>   		rq_associate_cqes(rxq);
>   
>   		pkts = hinic3_rx_fill_buffers(rxq);
> -		if (!pkts) {
> +		if (pkts < rxq->q_mask) {
>   			netdev_err(netdev, "Failed to fill Rx buffer\n");
>   			return -ENOMEM;
>   		}
> diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
> index 9306bf0020ca..53c065194136 100644
> --- a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
> +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
> @@ -261,8 +261,7 @@ static int hinic3_tx_csum(struct hinic3_txq *txq, struct hinic3_sq_task *task,
>   		    ((struct udphdr *)skb_transport_header(skb))->dest !=
>   		    VXLAN_OFFLOAD_PORT_LE) {
>   			/* Unsupported tunnel packet, disable csum offload */
> -			skb_checksum_help(skb);
> -			return 0;
> +			return skb_checksum_help(skb);
>   		}
>   	}
>   
> @@ -412,6 +411,10 @@ static u32 hinic3_tx_offload(struct sk_buff *skb, struct hinic3_sq_task *task,
>   		offload |= HINIC3_TX_OFFLOAD_TSO;
>   	} else {
>   		tso_cs_en = hinic3_tx_csum(txq, task, skb);
> +		if (tso_cs_en < 0) {
> +			offload = HINIC3_TX_OFFLOAD_INVALID;
> +			return offload;
> +		}
>   		if (tso_cs_en)
>   			offload |= HINIC3_TX_OFFLOAD_CSUM;
>   	}


  reply	other threads:[~2026-07-21 18:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 12:53 [PATCH net-next v11 0/5] net: hinic3: PF initialization Fan Gong
2026-07-20 12:53 ` [PATCH net-next v11 1/5] hinic3: Add ethtool queue ops Fan Gong
2026-07-21 18:07   ` Mohsin Bashir [this message]
2026-07-20 12:53 ` [PATCH net-next v11 2/5] hinic3: Add ethtool statistic ops Fan Gong
2026-07-21 19:21   ` Dimitri Daskalakis
2026-07-20 12:53 ` [PATCH net-next v11 3/5] hinic3: Add ethtool coalesce ops Fan Gong
2026-07-20 12:53 ` [PATCH net-next v11 4/5] hinic3: Add ethtool rss ops Fan Gong
2026-07-20 12:53 ` [PATCH net-next v11 5/5] hinic3: Remove unneeded coalesce parameters Fan Gong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4473a79-567a-430b-b463-f45d4ef3ea28@gmail.com \
    --to=mohsin.bashr@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dimitri.daskalakis1@gmail.com \
    --cc=edumazet@google.com \
    --cc=gongfan1@huawei.com \
    --cc=guoxin09@huawei.com \
    --cc=horms@kernel.org \
    --cc=hramamurthy@google.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luosifu@huawei.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shijing34@huawei.com \
    --cc=tengpeisen@huawei.com \
    --cc=wudi234@huawei.com \
    --cc=wulike1@huawei.com \
    --cc=zhengjiezhen@h-partners.com \
    --cc=zhoushuai28@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox