Re: Re: [PATCH net-next v03 4/6] hinic3: Add ethtool rss ops

From: Fan Gong

Date: Thu Apr 02 2026 - 03:25:19 EST


On 4/1/2026 3:53 PM, Mohsin Bashir wrote:

> > + err = hinic3_update_rss_hash_opts(netdev, cmd, rss_type);
> > + if (err)
> > + return err;
> > +
> > + err = hinic3_set_rss_type(nic_dev->hwdev, *rss_type);
>
> So if we fail here, we have already modified the rss_type in-place. From this on-wards, the HW state would diverge from in-memory state. How about use a local copy and only update if no error?
>
> > + if (err) {
> > + netdev_err(netdev, "Failed to set rss type\n");
> > + return err;
> > + }
> > +
> > + return 0;
> > +}
> > +

Thanks for your four patch reviews.

For patch 01, we'll add nic_info to inform the user that depth is timmed and restore q_params.

For patch 02, we'll remove const.

For patch 03, we'll change errcode and modify rx_max_coalesced_frames_high judgement condition.
As tx and rx share interrupt, we only use ETHTOOL_COALESCE_RX_USECS to avoid user misunderstanding.
So we do not add ETHTOOL_COALESCE_TX_USECS.

For patch 04, we overlooked the recovery of rss_type in error handling and we'll fix it.

We will fix them in next version.

Fan gong