Re: [PATCH net-next] hinic: add set_channels ethtool_ops support

2020-05-15 Thread luobin (L)
On 2020/5/16 2:13, Michal Kubecek wrote: On Fri, May 15, 2020 at 12:35:47AM +, Luo bin wrote: add support to change TX/RX queue number with ethtool -L Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 67 +-- .../net/ethernet/huawei/hinic/hinic

Re: [PATCH net-next] hinic: add set_channels ethtool_ops support

2020-05-15 Thread Michal Kubecek
On Fri, May 15, 2020 at 08:13:30PM +0200, Michal Kubecek wrote: [...] > > +int hinic_set_channels(struct net_device *netdev, > > + struct ethtool_channels *channels) > > +{ > > + struct hinic_dev *nic_dev = netdev_priv(netdev); > > + unsigned int count = channels->combined_coun

Re: [PATCH net-next] hinic: add set_channels ethtool_ops support

2020-05-15 Thread Michal Kubecek
On Fri, May 15, 2020 at 12:35:47AM +, Luo bin wrote: > add support to change TX/RX queue number with ethtool -L > > Signed-off-by: Luo bin > --- > .../net/ethernet/huawei/hinic/hinic_ethtool.c | 67 +-- > .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 7 ++ > .../net/ethern

Re: [PATCH net-next] hinic: add set_channels ethtool_ops support

2020-05-15 Thread Jakub Kicinski
On Fri, 15 May 2020 00:35:47 + Luo bin wrote: > add support to change TX/RX queue number with ethtool -L > > Signed-off-by: Luo bin > --- > .../net/ethernet/huawei/hinic/hinic_ethtool.c | 67 +-- > .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 7 ++ > .../net/ethernet/huaw

Re: [PATCH net-next] hinic: add set_channels ethtool_ops support

2020-05-15 Thread David Miller
From: Luo bin Date: Fri, 15 May 2020 00:35:47 + > +void hinic_update_num_qps(struct hinic_hwdev *hwdev, u16 num_qp) > +{ > + struct hinic_cap *nic_cap = &hwdev->nic_cap; > + > + nic_cap->num_qps = num_qp; > +} It is excessive to have a helper function that assigns a single struct mem

[PATCH net-next] hinic: add set_channels ethtool_ops support

2020-05-15 Thread Luo bin
add support to change TX/RX queue number with ethtool -L Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 67 +-- .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 7 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 2 + .../net/ethernet/huawei/hinic/h