Re: [PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-22 Thread luobin (L)
On 2020/6/23 6:08, Jakub Kicinski wrote: >> +if (coal->tx_max_coalesced_frames > COALESCE_MAX_PENDING_LIMIT) { >> +netif_err(nic_dev, drv, netdev, >> + "Tx_max_coalesced_frames out of range[%d-%d]\n", 0, >> + COALESCE_MAX_PENDING_LIMIT); >>

Re: [PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-22 Thread luobin (L)
On 2020/6/23 6:07, Jakub Kicinski wrote: > On Sat, 20 Jun 2020 17:42:55 +0800 Luo bin wrote: >> @@ -1144,8 +1190,16 @@ static int nic_dev_init(struct pci_dev *pdev) >> goto err_reg_netdev; >> } >> >> +err = hinic_init_intr_coalesce(nic_dev); >> +if (err) { >> +

Re: [PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-22 Thread Jakub Kicinski
On Sat, 20 Jun 2020 17:42:55 +0800 Luo bin wrote: > +static int is_coalesce_exceed_limit(struct net_device *netdev, > + const struct ethtool_coalesce *coal) > +{ > + struct hinic_dev *nic_dev = netdev_priv(netdev); > + > + if (coal->rx_coalesce_usecs > COALES

Re: [PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-22 Thread Jakub Kicinski
On Sat, 20 Jun 2020 17:42:55 +0800 Luo bin wrote: > @@ -1144,8 +1190,16 @@ static int nic_dev_init(struct pci_dev *pdev) > goto err_reg_netdev; > } > > + err = hinic_init_intr_coalesce(nic_dev); > + if (err) { > + netif_err(nic_dev, drv, netdev, "Failed to

[PATCH net-next v1 2/5] hinic: add support to set and get irq coalesce

2020-06-20 Thread Luo bin
add support to set TX/RX irq coalesce params with ethtool -C and get these params with ethtool -c. Signed-off-by: Luo bin --- drivers/net/ethernet/huawei/hinic/hinic_dev.h | 8 + .../net/ethernet/huawei/hinic/hinic_ethtool.c | 294 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.