[PATCH net-next 1/3] net: hns3: remove a duplicate pf reset counting

2021-04-17 Thread Huazhong Tan
When enter suspend mode the counter of pf reset will be increased twice, since both hclge_prepare_general() and hclge_prepare_wait() increase this counter. So remove the duplicate counting in hclge_prepare_general(). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 3/3] net: hns3: change the value of the SEPARATOR_VALUE macro in hclgevf_main.c

2021-04-17 Thread Huazhong Tan
The SEPARATOR_VALUE macro is used as separator when getting the register value, but the value of this macro is different between pf and vf, it is a bit confusing for the user, so synchronize the value of vf with pf. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3vf

[PATCH net-next 0/3] net: hns3: misc updates for -next

2021-04-17 Thread Huazhong Tan
This series includes some misc updates for the HNS3 ethernet driver. Huazhong Tan (3): net: hns3: remove a duplicate pf reset counting net: hns3: cleanup inappropriate spaces in struct hlcgevf_tqp_stats net: hns3: change the value of the SEPARATOR_VALUE macro in hclgevf_main.c drivers

[PATCH net-next 2/3] net: hns3: cleanup inappropriate spaces in struct hlcgevf_tqp_stats

2021-04-17 Thread Huazhong Tan
Modify some inappropriate spaces in comments of struct hlcgevf_tqp_stats. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h

[PATCH RESEND net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-14 Thread Huazhong Tan
status to VFs when its link status is updated. And to let VF know PF supports this new feature, the link status changed mailbox command adds one bit to indicate it. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h| 3

[PATCH RESEND net-next 0/2] net: hns3: updates for -next

2021-04-14 Thread Huazhong Tan
This series adds support for pushing link status to VFs for the HNS3 ethernet driver. Guangbin Huang (2): net: hns3: PF add support for pushing link status to VFs net: hns3: VF not request link status when PF support push link status feature drivers/net/ethernet/hisilicon/hns3/hclge_mbx.

[PATCH RESEND net-next 2/2] net: hns3: VF not request link status when PF support push link status feature

2021-04-14 Thread Huazhong Tan
From: Guangbin Huang To reduce the processing of unnecessary mailbox command when PF supports actively push its link status to VFs, VFs stop sending request link status command in periodic service task in this case. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net

Re: [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-14 Thread Huazhong Tan
On 2021/4/15 9:53, Jakub Kicinski wrote: On Thu, 15 Apr 2021 09:11:03 +0800 Huazhong Tan wrote: They are in different contexts. here will be called to update the link status of all VFs when the underlying link status is changed, while the below one is called when the admin set up the specific

Re: [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-14 Thread Huazhong Tan
On 2021/4/15 0:42, Jakub Kicinski wrote: On Wed, 14 Apr 2021 09:51:38 +0800 Huazhong Tan wrote: On 2021/4/14 1:18, Jakub Kicinski wrote: On Tue, 13 Apr 2021 14:17:00 +0800 Huazhong Tan wrote: +static void hclge_push_link_status(struct hclge_dev *hdev) +{ + struct hclge_vport *vport

Re: [PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-13 Thread Huazhong Tan
On 2021/4/14 1:18, Jakub Kicinski wrote: On Tue, 13 Apr 2021 14:17:00 +0800 Huazhong Tan wrote: +static void hclge_push_link_status(struct hclge_dev *hdev) +{ + struct hclge_vport *vport; + int ret; + u16 i; + + for (i = 0; i < pci_num_vf(hdev->pd

[PATCH net-next 2/2] net: hns3: VF not request link status when PF support push link status feature

2021-04-12 Thread Huazhong Tan
From: Guangbin Huang To reduce the processing of unnecessary mailbox command when PF supports actively push its link status to VFs, VFs stop sending request link status command in periodic service task in this case. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net

[PATCH net-next 0/2] net: hns3: updates for -next

2021-04-12 Thread Huazhong Tan
This series adds support for pushing link status to VFs for the HNS3 ethernet driver. Guangbin Huang (2): net: hns3: PF add support for pushing link status to VFs net: hns3: VF not request link status when PF support push link status feature drivers/net/ethernet/hisilicon/hns3/hclge_mbx.

[PATCH net-next 1/2] net: hns3: PF add support for pushing link status to VFs

2021-04-12 Thread Huazhong Tan
status to VFs when its link status is updated. And to let VF know PF supports this new feature, the link status changed mailbox command adds one bit to indicate it. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h| 3

[PATCH net-next 2/2] net: hns3: add suspend and resume pm_ops

2021-04-07 Thread Huazhong Tan
function reset process. When the PFs are suspending/resuming, VFs also enter the suspend/resume state because the PFs trigger the VFs to reset, therefore no operation is required when the VF pci_driver is suspending or resuming. Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan

[PATCH net-next 1/2] net: hns3: change flr_prepare/flr_done function names

2021-04-07 Thread Huazhong Tan
Zhang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 5 ++-- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 8 +++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 27 -- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

[PATCH net-next 0/2] net: hns3: add support for pm_ops

2021-04-07 Thread Huazhong Tan
This series adds support for pm_ops in the HNS3 ethernet driver. Jiaran Zhang (2): net: hns3: change flr_prepare/flr_done function names net: hns3: add suspend and resume pm_ops drivers/net/ethernet/hisilicon/hns3/hnae3.h| 5 +-- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c|

[PATCH net] net: hns3: clear VF down state bit before request link status

2021-04-06 Thread Huazhong Tan
link status to down. To fix this problem, clear VF down state bit before VF requests link status. Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/h

[RESEND net-next 4/4] net: ipa: remove repeated words

2021-03-30 Thread Huazhong Tan
From: Peng Li Remove repeated words "that" and "the". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/ipa/ipa_endpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endp

[RESEND net-next 2/4] net: bonding: remove repeated word

2021-03-30 Thread Huazhong Tan
From: Peng Li Remove repeated word "that". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/bonding/bond_alb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index c3091e0..3455

[RESEND net-next 3/4] net: phy: remove repeated word

2021-03-30 Thread Huazhong Tan
From: Peng Li Remove repeated word "to". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/phy/mdio_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 8235185..dadf75f 100644 ---

[RESEND net-next 1/4] net: i40e: remove repeated words

2021-03-30 Thread Huazhong Tan
From: Peng Li Remove repeated words "to" and "try". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/

[RESEND net-next 0/4] net: remove repeated words

2021-03-30 Thread Huazhong Tan
This patch-set removes some repeated words in comments. Peng Li (4): net: i40e: remove repeated words net: bonding: remove repeated word net: phy: remove repeated word net: ipa: remove repeated words drivers/net/bonding/bond_alb.c | 2 +- drivers/net/ethernet/intel/i40e/i40e

Re: [PATCH net-next 0/4] net: remove repeated words

2021-03-30 Thread Huazhong Tan
Sorry, please ignore this series, will resend later. On 2021/3/30 15:04, Huazhong Tan wrote: This patch-set removes some repeated words in comments. Peng Li (4): net: i40e: remove repeated words net: bonding: remove repeated word net: phy: remove repeated word net: ipa: remove

[PATCH net-next 4/4] net: ipa: remove repeated words

2021-03-30 Thread Huazhong Tan
From: Peng Li Remove repeated words "that" and "the". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/ipa/ipa_endpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endp

[PATCH net-next 1/4] net: i40e: remove repeated words

2021-03-30 Thread Huazhong Tan
From: Peng Li Remove repeated words "to" and "try". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/

[PATCH net-next 2/4] net: bonding: remove repeated word

2021-03-30 Thread Huazhong Tan
From: Peng Li Remove repeated word "that". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/bonding/bond_alb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index c3091e0..3455

[PATCH net-next 0/4] net: remove repeated words

2021-03-30 Thread Huazhong Tan
This patch-set removes some repeated words in comments. Peng Li (4): net: i40e: remove repeated words net: bonding: remove repeated word net: phy: remove repeated word net: ipa: remove repeated words drivers/net/bonding/bond_alb.c | 2 +- drivers/net/ethernet/intel/i40e/i40e

[PATCH net-next 3/4] net: phy: remove repeated word

2021-03-30 Thread Huazhong Tan
From: Peng Li Remove repeated word "to". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/phy/mdio_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 8235185..dadf75f 100644 ---

[PATCH net-next 6/9] net: hns3: add handling for xmit skb with recursive fraglist

2021-03-28 Thread Huazhong Tan
d-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 115 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 2 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 + 3 files changed, 78 insertions(+), 41 dele

[PATCH net-next 7/9] net: hns3: add tx send size handling for tso skb

2021-03-28 Thread Huazhong Tan
the desc_cb to record the actual send size for a skb. And send_bytes is only for tx desc_cb and page_offset is only for rx desc, so reuse the same space for both of them. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 25

[PATCH net-next 8/9] net: hns3: expand the tc config command

2021-03-28 Thread Huazhong Tan
the exponent with base 2 of queues supported on TC, which needs to expand from 3 bits to 4 bits. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h | 7 +-- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +++ 2

[PATCH net-next 9/9] net: hns3: add stats logging when skb padding fails

2021-03-28 Thread Huazhong Tan
From: Yunsheng Lin skb_put_padto() may fails because of memory failure, sw_err_cnt is already used to log memory failure in hns3_skb_linearize(), so use it to log the memory failure for skb_put_padto() too. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet

[PATCH net-next 5/9] net: hns3: optimize the process of queue reset

2021-03-28 Thread Huazhong Tan
same function at a time, in order to optimize the queue reset process. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 2 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 8 +- .../net/ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 2/9] net: hns3: fix use-after-free issue for hclge_add_fd_entry_common()

2021-03-28 Thread Huazhong Tan
("net: hns3: refactor flow director configuration") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

[PATCH net-next 1/9] net: hns3: fix missing rule state assignment

2021-03-28 Thread Huazhong Tan
From: Jian Shen Currently, when adding flow director rule, it missed to set rule state. Which may cause the rule state in software is unconsistent with hardware. Fixes: fc4243b8de8b ("net: hns3: refactor flow director configuration") Signed-off-by: Jian Shen Signed-off-by: Hu

[PATCH net-next 0/9] net: hns3: misc updates for -next

2021-03-28 Thread Huazhong Tan
This series include some updates for the HNS3 ethernet driver. #1 & #2 fix two bugs in commit fc4243b8de8b ("net: hns3: refactor flow director configuration"). #3 modifies a potential overflow risk. #4 remove the rss_size limitation when updating rss size. #5 optimizes the resetting of tqp. #6

[PATCH net-next 4/9] net: hns3: remove the rss_size limitation by vector num

2021-03-28 Thread Huazhong Tan
s. So remove this limitation. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/h

[PATCH net-next 3/9] net: hns3: remediate a potential overflow risk of bd_num_list

2021-03-28 Thread Huazhong Tan
. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 27 -- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon

[PATCH net-next 3/9] net: hns3: remove redundant query in hclge_config_tm_hw_err_int()

2021-03-25 Thread Huazhong Tan
From: Jiaran Zhang According to the HW manual, the query operation is unnecessary when the TM QCN error event is enabled, so remove it. Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 8 +--- 1 file changed, 1 insertion

[PATCH net-next 2/9] net: hns3: remove redundant blank lines

2021-03-25 Thread Huazhong Tan
From: Peng Li Remove some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 7 --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c| 1 - drivers/net/ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 4/9] net: hns3: remove unused parameter from hclge_set_vf_vlan_common()

2021-03-25 Thread Huazhong Tan
From: Peng Li Parameter vf in hclge_set_vf_vlan_common() is unused now, so remove it. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 1/9] net: hns3: remove unused code of vmdq

2021-03-25 Thread Huazhong Tan
From: Jian Shen Vmdq is not supported yet, the num_vmdq_vport is always 0, it's a bit confusing when using the num_vport, so remove these unused codes of vmdq. Reported-by: Dan Carpenter Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/h

[PATCH net-next 9/9] net: hns3: split out hclge_tm_vport_tc_info_update()

2021-03-25 Thread Huazhong Tan
From: Guojia Liao hclge_tm_vport_tc_info_update() is bloated, so split it into separate functions for readability and maintainability. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 11 +-- 1 file changed, 9

[PATCH net-next 7/9] net: hns3: fix some typos in hclge_main.c

2021-03-25 Thread Huazhong Tan
s/sucessful/successful/ s/serivce/service/ and remove a redundant new. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b

[PATCH net-next 5/9] net: hns3: remove unused parameter from hclge_dbg_dump_loopback()

2021-03-25 Thread Huazhong Tan
Parameter cm_buf is never used, so remove it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c b/drivers/net/ethernet

[PATCH net-next 6/9] net: hns3: fix prototype warning

2021-03-25 Thread Huazhong Tan
Correct a report warning in hns3_ethtool.c Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 8/9] net: hns3: split function hclge_reset_rebuild()

2021-03-25 Thread Huazhong Tan
From: Yufeng Mo hclge_reset_rebuild() is a bit too long. So add a new function hclge_update_reset_level() to improve readability. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 26 +- 1 file changed, 16

[PATCH net-next 0/9] net: hns3: add some cleanups

2021-03-25 Thread Huazhong Tan
This series includes some cleanups for the HNS3 ethernet driver. Guojia Liao (1): net: hns3: split out hclge_tm_vport_tc_info_update() Huazhong Tan (3): net: hns3: remove unused parameter from hclge_dbg_dump_loopback() net: hns3: fix prototype warning net: hns3: fix some typos in

[PATCH net-next 7/8] net: hns: remove unnecessary !! operation in hns_mac_config_sds_loopback_acpi()

2021-03-23 Thread Huazhong Tan
From: Yonglong Liu The !! operation of variable en in hns_mac_config_sds_loopback_acpi() is redundant, so remove it. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH net-next 8/8] net: hns: remove redundant variable initialization

2021-03-23 Thread Huazhong Tan
From: Yonglong Liu There are some variables in HNS driver will not being referenced before assigned, so there is no need to init them. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 2 +- drivers/net/ethernet/hisilicon/hns

[PATCH net-next 2/8] net: hns: remove unused set_autoneg()

2021-03-23 Thread Huazhong Tan
Since set_autoneg() in struct hnae_ae_ops is unused, so remove it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns/hnae.h | 3 --- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 8 2 files changed, 11 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 6/8] net: hns: remove unused HNS_LED_PC_REG

2021-03-23 Thread Huazhong Tan
HNS_LED_PC_REG is not used and can be removed. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c index 177ce06

[PATCH net-next 4/8] net: hns: remove unused config_half_duplex()

2021-03-23 Thread Huazhong Tan
Since config_half_duplex() in struct mac_driver is unused, so remove it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 9 - drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 2 -- drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c | 1 - 3

[PATCH net-next 1/8] net: hns: remove unused get_autoneg()

2021-03-23 Thread Huazhong Tan
Since get_autoneg() in struct hnae_ae_ops is unused, so remove it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns/hnae.h | 3 --- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 12 2 files changed, 15 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 3/8] net: hns: remove unused set_rx_ignore_pause_frames()

2021-03-23 Thread Huazhong Tan
Since set_rx_ignore_pause_frames() in struct mac_driver is unused, so remove it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 9 - drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 2 -- drivers/net/ethernet/hisilicon/hns/hns_dsaf_xgmac.c

[PATCH net-next 5/8] net: hns: remove unused NIC_LB_TEST_RX_PKG_ERR

2021-03-23 Thread Huazhong Tan
NIC_LB_TEST_RX_PKG_ERR is not used and can be removed. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns

[PATCH net-next 0/8] net: hns: add some cleanups

2021-03-23 Thread Huazhong Tan
This series includes some cleanups for the HNS ethernet driver. Huazhong Tan (6): net: hns: remove unused get_autoneg() net: hns: remove unused set_autoneg() net: hns: remove unused set_rx_ignore_pause_frames() net: hns: remove unused config_half_duplex() net: hns: remove unused

[PATCH V2 net-next 7/7] net: hns3: add support for user-def data of flow director

2021-03-21 Thread Huazhong Tan
r-def offset in HNS3 driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- V1->V2: change the usecnt of user-def rule checking --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 14 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 323 - .../ethernet/h

[PATCH V2 net-next 6/7] net: hns3: refine for hns3_del_all_fd_entries()

2021-03-21 Thread Huazhong Tan
d-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 -- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 -- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 +++--- 3 files changed, 3 insertions(+), 19 deletions(-) diff

[PATCH V2 net-next 3/7] net: hns3: refactor for function hclge_fd_convert_tuple

2021-03-21 Thread Huazhong Tan
-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 189 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 12 ++ 2 files changed, 97 insertions(+), 104 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers

[PATCH V2 net-next 1/7] net: hns3: refactor out hclge_add_fd_entry()

2021-03-21 Thread Huazhong Tan
From: Jian Shen The process of function hclge_add_fd_entry() is complex and prolix. To make it more readable, extract the process of fs->ring_cookie to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c|

[PATCH V2 net-next 0/7] net: hns3: refactor and new features for flow director

2021-03-21 Thread Huazhong Tan
This patchset refactor some functions and add some new features for flow director. patch 1~3: refactor large functions patch 4, 7: add traffic class and user-def field support for ethtool patch 5: refactor flow director configuration patch 6: clean up for hns3_del_all_fd_entries() change log: V1-

[PATCH V2 net-next 5/7] net: hns3: refactor flow director configuration

2021-03-21 Thread Huazhong Tan
ronous way, when receive a new request to add or delete flow director rule by ethtool or tc flower, configure hardware directly, then update the rule list if success. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- V1->V2: Keep configuring ethtool/tc flower rules synchronously ---

[PATCH V2 net-next 2/7] net: hns3: refactor out hclge_fd_get_tuple()

2021-03-21 Thread Huazhong Tan
From: Jian Shen The process of function hclge_fd_get_tuple() is complex and prolix. To make it more readable, extract the process of each flow-type tuple to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 220

[PATCH V2 net-next 4/7] net: hns3: add support for traffic class tuple support for flow director by ethtool

2021-03-21 Thread Huazhong Tan
From: Jian Shen The hardware supports to parse and match the traffic class field of IPv6 packet for flow director, uses the same tuple as ip tos. So removes the limitation of configure 'tclass' by driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisi

Re: [PATCH net-next 8/9] net: hns3: add support for queue bonding mode of flow director

2021-03-17 Thread Huazhong Tan
On 2021/3/16 4:04, Jakub Kicinski wrote: On Mon, 15 Mar 2021 20:23:50 +0800 Huazhong Tan wrote: From: Jian Shen For device version V3, it supports queue bonding, which can identify the tuple information of TCP stream, and create flow director rules automatically, in order to keep the tx and

Re: [PATCH net-next 5/9] net: hns3: refactor flow director configuration

2021-03-16 Thread Huazhong Tan
On 2021/3/16 4:00, Jakub Kicinski wrote: On Mon, 15 Mar 2021 20:23:47 +0800 Huazhong Tan wrote: From: Jian Shen Currently, there are 3 flow director work modes in HNS3 driver, include EP(ethtool), tc flower and aRFS. The flow director rules are configured synchronously and need holding spin

[PATCH net-next 8/9] net: hns3: add support for queue bonding mode of flow director

2021-03-15 Thread Huazhong Tan
From: Jian Shen For device version V3, it supports queue bonding, which can identify the tuple information of TCP stream, and create flow director rules automatically, in order to keep the tx and rx packets are in the same queue pair. The driver set FD_ADD field of TX BD for TCP SYN packet, and s

[PATCH net-next 9/9] net: hns3: add queue bonding mode support for VF

2021-03-15 Thread Huazhong Tan
From: Jian Shen For device version V3, the hardware supports queue bonding mode. VF can not enable queue bond mode unless PF enables it. So VF needs to query whether PF support queue bonding mode when initializing, and query whether PF enables queue bonding mode periodically. For the resource lim

[PATCH net-next 7/9] net: hns3: add support for user-def data of flow director

2021-03-15 Thread Huazhong Tan
r-def offset in HNS3 driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 14 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 301 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 36 +++ 3

[PATCH net-next 3/9] net: hns3: refactor for function hclge_fd_convert_tuple

2021-03-15 Thread Huazhong Tan
-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 189 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 12 ++ 2 files changed, 97 insertions(+), 104 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers

[PATCH net-next 1/9] net: hns3: refactor out hclge_add_fd_entry()

2021-03-15 Thread Huazhong Tan
From: Jian Shen The process of function hclge_add_fd_entry() is complex and prolix. To make it more readable, extract the process of fs->ring_cookie to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c|

[PATCH net-next 5/9] net: hns3: refactor flow director configuration

2021-03-15 Thread Huazhong Tan
added in hardware When receive a new request to add or delete flow director rule, check whether the rule location is existent, update the rule content and state, and request to schedule the service task to finish the configuration. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan

[PATCH net-next 2/9] net: hns3: refactor out hclge_fd_get_tuple()

2021-03-15 Thread Huazhong Tan
From: Jian Shen The process of function hclge_fd_get_tuple() is complex and prolix. To make it more readable, extract the process of each flow-type tuple to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 220

[PATCH net-next 6/9] net: hns3: refine for hns3_del_all_fd_entries()

2021-03-15 Thread Huazhong Tan
d-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 -- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 -- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 +++--- 3 files changed, 3 insertions(+), 19 deletions(-) diff

[PATCH net-next 4/9] net: hns3: add support for traffic class tuple support for flow director by ethtool

2021-03-15 Thread Huazhong Tan
From: Jian Shen The hardware supports to parse and match the traffic class field of IPv6 packet for flow director, uses the same tuple as ip tos. So removes the limitation of configure 'tclass' by driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisi

[PATCH net-next 0/9] net: hns3: refactor and new features for flow director

2021-03-15 Thread Huazhong Tan
This patchset refactor some functions and add some new features for flow director. patch 1~3: refactor large functions patch 4, 7: add traffic class and user-def field support for ethtool patch 5: use asynchronously configuration patch 6: clean up for hns3_del_all_fd_entries() patch 8, 9: add supp

[PATCH net-next 1/4] net: hns3: add support for imp-controlled PHYs

2021-03-12 Thread Huazhong Tan
re by firmware compatible command if it is supported. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 4 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 2 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c

[PATCH net-next 4/4] net: hns3: add phy loopback support for imp-controlled PHYs

2021-03-12 Thread Huazhong Tan
this command. As this command is not only for serdes loopback anymore, rename this command to "xxx_COMMON_LOOPBACK", and modify function name, macro name and logs related to it. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_

[PATCH net-next 2/4] net: hns3: add get/set pause parameters support for imp-controlled PHYs

2021-03-12 Thread Huazhong Tan
media type to check whether device is TP port. And when user set pause parameters, these parameters need to always set to mac, no matter whether autoneg is off. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 9 + 1

[PATCH net-next 0/4] net: hns3: support imp-controlled PHYs

2021-03-12 Thread Huazhong Tan
This series adds support for imp-controlled PHYs in the HNS3 ethernet driver. Guangbin Huang (4): net: hns3: add support for imp-controlled PHYs net: hns3: add get/set pause parameters support for imp-controlled PHYs net: hns3: add ioctl support for imp-controlled PHYs net: hns3: add p

[PATCH net-next 3/4] net: hns3: add ioctl support for imp-controlled PHYs

2021-03-12 Thread Huazhong Tan
. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 8 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 25 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c| 39 ++ .../ethernet

[PATCH net-next 0/2] net: hns3: two updates for -next

2021-03-10 Thread Huazhong Tan
This series includes two updates for the HNS3 ethernet driver. Yufeng Mo (2): net: hns3: use FEC capability queried from firmware net: hns3: use pause capability queried from firmware drivers/net/ethernet/hisilicon/hns3/hnae3.h| 4 drivers/net/ethernet/hisilicon/hns3/hns3_debug

[PATCH net-next 2/2] net: hns3: use pause capability queried from firmware

2021-03-10 Thread Huazhong Tan
From: Yufeng Mo For maintainability and compatibility, add support to use pause capability queried from firmware, and add debugfs support to dump this capability. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 4

[PATCH net-next 1/2] net: hns3: use FEC capability queried from firmware

2021-03-10 Thread Huazhong Tan
From: Yufeng Mo For maintainability and compatibility, add support to use FEC capability queried from firmware. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 6 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h

[RFC net-next 5/9] net: hns3: refactor flow director configuration

2021-03-02 Thread Huazhong Tan
added in hardware When receive a new request to add or delete flow director rule, check whether the rule location is existent, update the rule content and state, and request to schedule the service task to finish the configuration. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan

[RFC net-next 9/9] net: hns3: add queue bonding mode support for VF

2021-03-02 Thread Huazhong Tan
limited, to avoid a VF occupy to many FD rule space, only trust VF is allowed to enable queue bonding mode. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h| 8 +++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 46

[RFC net-next 3/9] net: hns3: refactor for function hclge_fd_convert_tuple

2021-03-02 Thread Huazhong Tan
-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 189 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 12 ++ 2 files changed, 97 insertions(+), 104 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers

[RFC net-next 2/9] net: hns3: refactor out hclge_fd_get_tuple()

2021-03-02 Thread Huazhong Tan
From: Jian Shen The process of function hclge_fd_get_tuple() is complex and prolix. To make it more readable, extract the process of each flow-type tuple to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 220

[RFC net-next 4/9] net: hns3: add support for traffic class tuple support for flow director by ethtool

2021-03-02 Thread Huazhong Tan
From: Jian Shen The hardware supports to parse and match the traffic class field of IPv6 packet for flow director, uses the same tuple as ip tos. So removes the limitation of configure 'tclass' by driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisi

[RFC net-next 7/9] net: hns3: add support for user-def data of flow director

2021-03-02 Thread Huazhong Tan
r-def offset in HNS3 driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 14 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 301 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 36 +++ 3

[RFC net-next 8/9] net: hns3: add support for queue bonding mode of flow director

2021-03-02 Thread Huazhong Tan
: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 7 ++ drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 4 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 81 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 14

[RFC net-next 1/9] net: hns3: refactor out hclge_add_fd_entry()

2021-03-02 Thread Huazhong Tan
From: Jian Shen The process of function hclge_add_fd_entry() is complex and prolix. To make it more readable, extract the process of fs->ring_cookie to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c|

[RFC net-next 6/9] net: hns3: refine for hns3_del_all_fd_entries()

2021-03-02 Thread Huazhong Tan
d-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 -- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 -- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 +++--- 3 files changed, 3 insertions(+), 19 deletions(-) diff

[RFC net-next 0/9] net: hns3: refactor and new features for flow director

2021-03-02 Thread Huazhong Tan
This patchset refactor some functions and add some new features for flow director. patch 1~3: refactor large functions patch 4, 7: add traffic class and user-def field support for ethtool patch 5: use asynchronously configuration patch 6: clean up for hns3_del_all_fd_entries() patch 8, 9: add supp

[RESEND net 1/3] net: hns3: fix error mask definition of flow director

2021-02-26 Thread Huazhong Tan
onfig support for flow director") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h b/drivers/ne

[RESEND net 3/3] net: hns3: fix bug when calculating the TCAM table info

2021-02-26 Thread Huazhong Tan
hns3: Add input key and action config support for flow director") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/h

[RESEND net 0/3] net: hns3: fixes fot -net

2021-02-26 Thread Huazhong Tan
The patchset includes some fixes for the HNS3 ethernet driver. Jian Shen (3): net: hns3: fix error mask definition of flow director net: hns3: fix query vlan mask value error for flow director net: hns3: fix bug when calculating the TCAM table info drivers/net/ethernet/hisilicon/hns3/hns3p

[RESEND net 2/3] net: hns3: fix query vlan mask value error for flow director

2021-02-26 Thread Huazhong Tan
eue 3 Fix it by return 0. Fixes: 05c2314fe6a8 ("net: hns3: Add support for rule query of flow director") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --gi

Re: [PATCH net 0/3] net: hns3: fixes fot -net

2021-02-26 Thread Huazhong Tan
Sorry, please ignore this series, will resend it later. On 2021/2/27 11:34, Huazhong Tan wrote: The patchset includes some fixes for the HNS3 ethernet driver. Jian Shen (3): net: hns3: fix error mask definition of flow director net: hns3: fix query vlan mask value error for flow director

  1   2   3   4   5   6   7   >