[PATCH net-next 0/9] net: hns3: add support for reset

2017-11-01 Thread Lipeng
expiration, the same range with core reset. PF reset will reset whole physical function. This patchset adds reset support for hns3 driver and fix some related bugs. Lipeng (2): net: hns3: Add timeout process in hns3_enet net: hns3: Add reset interface implementation in client qumingguang (7): net

[PATCH net-next 1/9] net: hns3: Refactor the mapping of tqp to vport

2017-11-01 Thread Lipeng
From: qumingguang This patch refactor the mapping of tqp to vport, making the maping function can be used both in the reset process and initialization process. Signed-off-by: qumingguang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 61

[PATCH net-next 2/9] net: hns3: Refactor mac_init function

2017-11-01 Thread Lipeng
. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 3/9] net: hns3: Refactor the initialization of command queue

2017-11-01 Thread Lipeng
patch moved out the descriptor allocate and memory maping from interface cmdq_init. Signed-off-by: qumingguang Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 39 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 + .../ethernet/hisilicon

[PATCH net-next 5/9] net: hns3: Add reset process in hclge_main

2017-11-01 Thread Lipeng
watchdog timer expiration, the same range with core reset. PF reset will reset whole physical function. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 19 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 7 + .../ethernet/hisilicon

[PATCH net-next 7/9] net: hns3: Add reset interface implementation in client

2017-11-01 Thread Lipeng
This patch implement the interface of reset notification in hns3_enet it will do resetting business which include shutdown nic device, free and initialize client side resource. Signed-off-by: qumingguang Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 153

[PATCH net-next 9/9] net: hns3: hns3:fix a bug about statistic counter in reset process

2017-11-01 Thread Lipeng
tistic counters to zero after reset. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilico

[PATCH net-next 4/9] net: hns3: Add support for misc interrupt

2017-11-01 Thread Lipeng
From: qumingguang This patch adds initialization and deinitialization for misc interrupt. This interrupt will be used to handle reset message(IRQ). Signed-off-by: qumingguang Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 ++ .../ethernet/hisilicon/hns3

[PATCH net-next 6/9] net: hns3: Add timeout process in hns3_enet

2017-11-01 Thread Lipeng
This patch add timeout handler in hns3_enet.c to handle TX side timeout event, when TX timeout event occur, it will triger NIC driver into reset process. Signed-off-by: qumingguang Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 86 ++ .../net

[PATCH net-next 8/9] net: hns3: Fix a misuse to devm_free_irq

2017-11-01 Thread Lipeng
From: qumingguang we should use free_irq to free the nic irq during the unloading time. because we use request_irq to apply it when nic up. It will crash if up net device after reset the port. This patch fixes the issue. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net

[PATCH V2 net-next 0/9] net: hns3: add support for reset

2017-11-02 Thread Lipeng
expiration, the same range with core reset. PF reset will reset whole physical function. This patchset adds reset support for hns3 driver and fix some related bugs. --- Change log: V1 -> V2: 1, fix some comments from Yunsheng Lin. --- Lipeng (6): net: hns3: Refactor the mapping of tqp to vport

[PATCH V2 net-next 9/9] net: hns3: hns3:fix a bug about statistic counter in reset process

2017-11-02 Thread Lipeng
of the statistic counters to zero after reset. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mai

[PATCH V2 net-next 8/9] net: hns3: Fix a misuse to devm_free_irq

2017-11-02 Thread Lipeng
From: qumingguang we should use free_irq to free the nic irq during the unloading time. because we use request_irq to apply it when nic up. It will crash if up net device after reset the port. This patch fixes the issue. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng

[PATCH V2 net-next 1/9] net: hns3: Refactor the mapping of tqp to vport

2017-11-02 Thread Lipeng
This patch refactor the mapping of tqp to vport, making the maping function can be used both in the reset process and initialization process. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 61

[PATCH V2 net-next 2/9] net: hns3: Refactor mac_init function

2017-11-02 Thread Lipeng
. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net

[PATCH V2 net-next 5/9] net: hns3: Add reset process in hclge_main

2017-11-02 Thread Lipeng
, the same with core reset in the reset flow. PF reset will reset whole physical function. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 19 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 7

[PATCH V2 net-next 3/9] net: hns3: Refactor the initialization of command queue

2017-11-02 Thread Lipeng
descriptor allocate and memory maping from interface cmdq_init. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 39 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 + .../ethernet

[PATCH V2 net-next 4/9] net: hns3: Add support for misc interrupt

2017-11-02 Thread Lipeng
This patch adds initialization and deinitialization for misc interrupt. This interrupt will be used to handle reset message(IRQ). Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 ++ .../ethernet/hisilicon

[PATCH V2 net-next 6/9] net: hns3: Add timeout process in hns3_enet

2017-11-02 Thread Lipeng
This patch add timeout handler in hns3_enet.c to handle TX side timeout event, when TX timeout event occur, it will triger NIC driver into reset process. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 86

[PATCH V2 net-next 7/9] net: hns3: Add reset interface implementation in client

2017-11-02 Thread Lipeng
This patch implement the interface of reset notification in hns3_enet, it will do resetting business which include shutdown nic device, free and initialize client side resource. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- .../net/ethernet/hisilicon/hns3

[PATCH net-next 2/4] net: hns3: add nic_client check when initialize roce base information

2017-10-24 Thread Lipeng
gned-off-by: Lipeng --- 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 b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 4431241..2c22d3c 100644 -

[PATCH net-next 3/4] net: hns3: fix a bug in hclge_uninit_client_instance

2017-10-24 Thread Lipeng
mmod hns3.ko after rmmod hns-roce-hw-v2.ko and hns-roce.ko. This patch fixes the issue. Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 -- 1 file chang

[PATCH net-next 4/4] net: hns3: fix the bug when reuse command description in hclge_add_mac_vlan_tbl

2017-10-24 Thread Lipeng
. [ 135.270983] hns3 :7d:00.0: add mac addr failed for cmd_send, ret =-5. This patch fixes the bug. Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +++--- 1 file change

[PATCH net-next 1/4] net: hns3: fix the bug of hns3_set_txbd_baseinfo

2017-10-24 Thread Lipeng
conmunicate with its own PF need forwarding table. This patch sets SC bits of TX BD 0 and use forwarding table. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 +- 1 file changed, 1 insertion

[PATCH net-next 0/4] net: hns3: fix some bugs for HNS3 driver

2017-10-24 Thread Lipeng
This patchset fixes some bugs reported by Hisilicon test team. Lipeng (4): net: hns3: fix the bug of hns3_set_txbd_baseinfo net: hns3: add nic_client check when initialize roce base information net: hns3: fix a bug in hclge_uninit_client_instance net: hns3: fix the bug when reuse command

[PATCH net-next 6/6] net: hns3: fix a bug for phy supported feature initialization

2017-11-02 Thread Lipeng
ns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c b/driv

[PATCH net-next 1/6] net: hns3: fix for getting autoneg in hns3_get_link_ksettings

2017-11-02 Thread Lipeng
Fuyun Liang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c

[PATCH net-next 0/6] net: hns3: support set_link_ksettings and for nway_reset ethtool command

2017-11-02 Thread Lipeng
This patch-set adds support for set_link_ksettings && for nway_resets ethtool command and fixes some related ethtool bugs. 1, patch[4/6] adds support for ethtool_ops.set_link_ksettings. 2, patch[5/6] adds support ethtool_ops.for nway_reset. 3, patch[1/6,2/6,3/6,6/6] fix some bugs for getting port i

[PATCH net-next 2/6] net: hns3: fix for getting advertised_caps in hns3_get_link_ksettings

2017-11-02 Thread Lipeng
Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c index 367b20c..0e10a43 100644 --- a/dr

[PATCH net-next 5/6] net: hns3: add support for nway_reset

2017-11-02 Thread Lipeng
From: Fuyun Liang This patch adds nway_reset support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 3/6] net: hns3: fix a bug in hns3_driv_to_eth_caps

2017-11-02 Thread Lipeng
: Add Ethtool support to HNS3 driver) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c b/drivers/net

[PATCH net-next 4/6] net: hns3: add support for set_link_ksettings

2017-11-02 Thread Lipeng
From: Fuyun Liang This patch adds set_link_ksettings support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3

[PATCH V3 net-next 07/17] net: hns3: Add vlan offload config command

2017-12-20 Thread Lipeng
This patch adds vlan offload config commands, initializes the rules of tx/rx vlan tag handle for hw. Signed-off-by: Shenjian Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 45 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 158

[PATCH V3 net-next 11/17] net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg

2017-12-20 Thread Lipeng
: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3p

[PATCH V3 net-next 06/17] net: hns3: Add a mask initialization for mac_vlan table

2017-12-20 Thread Lipeng
This patch sets vlan masked, in order to avoid the received packets being filtered. Signed-off-by: Shenjian Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 10 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 39 +- 2 files changed

[PATCH V3 net-next 03/17] net: hns3: change the returned tqp number by ethtool -x

2017-12-20 Thread Lipeng
This patch modifies the return data of get_rxnfc, it will return the current handle's rss_size but not the total tqp number. because the tc_size has been change to the log2 of roundup power of two of rss_size. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisi

[PATCH V3 net-next 00/17] add some features and fix some bugs for HNS3 driver

2017-12-20 Thread Lipeng
g auto-negotiation state in hclge_get_autoneg net: hns3: add Asym Pause support to phy default features Lipeng (13): net: hns3: add support to query tqps number net: hns3: add support to modify tqps number net: hns3: change the returned tqp number by ethtool -x net: hns3: Free the ring_da

[PATCH V3 net-next 01/17] net: hns3: add support to query tqps number

2017-12-20 Thread Lipeng
This patch adds the support to query tqps number for PF driver by using ehtool -l command. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 10 ++ .../net/ethernet

[PATCH V3 net-next 12/17] net: hns3: add support for set_pauseparam

2017-12-20 Thread Lipeng
This patch adds set_pauseparam support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 13 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 83 ++ .../net/ethernet/hisilicon/hns3/hns3pf

[PATCH V3 net-next 02/17] net: hns3: add support to modify tqps number

2017-12-20 Thread Lipeng
This patch adds the support to change tqps number for PF driver by using ehtool -L command. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 3 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 122 + drivers

[PATCH V3 net-next 05/17] net: hns3: Get rss_size_max from configuration but not hardcode

2017-12-20 Thread Lipeng
From: qumingguang Add configuration for rss_size_max in hdev but not hardcode it. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +- drivers/net/ethernet

[PATCH V3 net-next 16/17] net: hns3: Increase the default depth of bucket for TM shaper

2017-12-20 Thread Lipeng
Burstiness of a flow is determined by the depth of a bucket, When the upper rate of shaper is large, the current depth of a bucket is not enough. The default upper rate of shaper is 100G, so increase the depth of a bucket according to UM. Signed-off-by: Yunsheng Lin Signed-off-by: Lipeng

[PATCH V3 net-next 08/17] net: hns3: Add ethtool related offload command

2017-12-20 Thread Lipeng
This patch adds offload command related to "ethtool -K". Signed-off-by: Shenjian Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 16 drivers/net/ethernet/hisilicon/h

[PATCH V3 net-next 17/17] net: hns3: change TM sched mode to TC-based mode when SRIOV enabled

2017-12-20 Thread Lipeng
TC-based sched mode supports SRIOV enabled and SRIOV disabled. This patch change the TM sched mode to TC-based mode in initialization process. Fixes: cc9bb43ab394 ("net: hns3: Add tc-based TM support for sriov enabled port") Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/h

[PATCH V3 net-next 13/17] net: hns3: add support to update flow control settings after autoneg

2017-12-20 Thread Lipeng
Liang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 36 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 1 + .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c| 4 +++ 3 files changed, 41 insertions(+) diff --git a/drivers/net

[PATCH V3 net-next 09/17] net: hns3: Add handling vlan tag offload in bd

2017-12-20 Thread Lipeng
This patch deals with the vlan tag information between sk_buff and rx/tx bd. Signed-off-by: Shenjian Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 83 +++-- 1 file changed, 78 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet

[PATCH V3 net-next 10/17] net: hns3: cleanup mac auto-negotiation state query

2017-12-20 Thread Lipeng
-negotiation state query. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 24 -- 1 file changed, 24 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon

[PATCH V3 net-next 14/17] net: hns3: add Asym Pause support to phy default features

2017-12-20 Thread Lipeng
tised when the phy negotiates flow control. Fixes: c4fb2cdf575d ("net: hns3: fix a bug for phy supported feature initialization") Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH V3 net-next 15/17] net: hns3: add support for querying advertised pause frame by ethtool ethx

2017-12-20 Thread Lipeng
This patch adds support for querying advertised pause frame by using ethtool command(ethtool ethx). Fixes: 496d03e960ae ("net: hns3: Add Ethtool support to HNS3 driver") Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h

[PATCH V3 net-next 04/17] net: hns3: Free the ring_data structrue when change tqps

2017-12-20 Thread Lipeng
This patch fixes a memory leak problems in change tqps process, the function hns3_uninit_all_ring and hns3_init_all_ring may be called many times. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 1 file changed, 4 insertions

[PATCH V4 net-next 03/17] net: hns3: change the returned tqp number by ethtool -x

2017-12-20 Thread Lipeng
This patch modifies the return data of get_rxnfc, it will return the current handle's rss_size but not the total tqp number. because the tc_size has been change to the log2 of roundup power of two of rss_size. Signed-off-by: Lipeng Signed-off-by: Mingguang Qu --- drivers/net/ethernet/hisi

[PATCH V4 net-next 12/17] net: hns3: add support for set_pauseparam

2017-12-20 Thread Lipeng
This patch adds set_pauseparam support for ethtool cmd. Signed-off-by: Lipeng Signed-off-by: Fuyun Liang --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 13 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 83 ++ .../net/ethernet/hisilicon/hns3/hns3pf

[PATCH V4 net-next 04/17] net: hns3: free the ring_data structrue when change tqps

2017-12-20 Thread Lipeng
This patch fixes a memory leak problems in change tqps process, the function hns3_uninit_all_ring and hns3_init_all_ring may be called many times. Signed-off-by: Lipeng Signed-off-by: Mingguang Qu --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 1 file changed, 4 insertions

[PATCH V4 net-next 15/17] net: hns3: add support for querying advertised pause frame by ethtool ethx

2017-12-20 Thread Lipeng
This patch adds support for querying advertised pause frame by using ethtool command(ethtool ethx). Fixes: 496d03e960ae ("net: hns3: Add Ethtool support to HNS3 driver") Signed-off-by: Lipeng Signed-off-by: Fuyun Liang --- drivers/net/ethernet/hisilicon/hns3/hnae3.h

[PATCH V4 net-next 09/17] net: hns3: add handling vlan tag offload in bd

2017-12-20 Thread Lipeng
This patch deals with the vlan tag information between sk_buff and rx/tx bd. Signed-off-by: Lipeng Signed-off-by: Jian Shen --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 83 +++-- 1 file changed, 78 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet

[PATCH V4 net-next 14/17] net: hns3: add Asym Pause support to phy default features

2017-12-20 Thread Lipeng
tised when the phy negotiates flow control. Fixes: c4fb2cdf575d ("net: hns3: fix a bug for phy supported feature initialization") Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH V4 net-next 07/17] net: hns3: add vlan offload config command

2017-12-20 Thread Lipeng
This patch adds vlan offload config commands, initializes the rules of tx/rx vlan tag handle for hw. Signed-off-by: Lipeng Signed-off-by: Jian Shen --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 45 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 158

[PATCH V4 net-next 10/17] net: hns3: cleanup mac auto-negotiation state query

2017-12-20 Thread Lipeng
-negotiation state query. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 24 -- 1 file changed, 24 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon

[PATCH V4 net-next 11/17] net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg

2017-12-20 Thread Lipeng
: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3p

[PATCH V4 net-next 06/17] net: hns3: add a mask initialization for mac_vlan table

2017-12-20 Thread Lipeng
This patch sets vlan masked, in order to avoid the received packets being filtered. Signed-off-by: Lipeng Signed-off-by: Jian Shen --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 10 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 39 +- 2 files changed

[PATCH V4 net-next 16/17] net: hns3: Increase the default depth of bucket for TM shaper

2017-12-20 Thread Lipeng
Burstiness of a flow is determined by the depth of a bucket, When the upper rate of shaper is large, the current depth of a bucket is not enough. The default upper rate of shaper is 100G, so increase the depth of a bucket according to UM. Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin

[PATCH V4 net-next 17/17] net: hns3: change TM sched mode to TC-based mode when SRIOV enabled

2017-12-20 Thread Lipeng
TC-based sched mode supports SRIOV enabled and SRIOV disabled. This patch change the TM sched mode to TC-based mode in initialization process. Fixes: cc9bb43ab394 ("net: hns3: Add tc-based TM support for sriov enabled port") Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/h

[PATCH V4 net-next 05/17] net: hns3: get rss_size_max from configuration but not hardcode

2017-12-20 Thread Lipeng
Add configuration for rss_size_max in hdev but not hardcode it. Signed-off-by: Lipeng Signed-off-by: Mingguang Qu --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +- drivers/net/ethernet/hisilicon/hns3/hns3pf

[PATCH V4 net-next 02/17] net: hns3: add support to modify tqps number

2017-12-20 Thread Lipeng
This patch adds the support to change tqps number for PF driver by using ehtool -L command. Signed-off-by: Lipeng Signed-off-by: Mingguang Qu --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 3 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 122 + drivers

[PATCH V4 net-next 08/17] net: hns3: add ethtool related offload command

2017-12-20 Thread Lipeng
This patch adds offload command related to "ethtool -K". Signed-off-by: Lipeng Signed-off-by: Jian Shen --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 16 drivers/net/ethernet/hisi

[PATCH V4 net-next 00/17] add some features and fix some bugs for HNS3 driver

2017-12-20 Thread Lipeng
net: hns3: cleanup mac auto-negotiation state query net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg net: hns3: add Asym Pause support to phy default features Lipeng (14): net: hns3: add support to query tqps number net: hns3: add support to modify tqps number net: hn

[PATCH V4 net-next 13/17] net: hns3: add support to update flow control settings after autoneg

2017-12-20 Thread Lipeng
When auto-negotiation is enabled, the MAC flow control settings is based on the flow control negotiation result. And it should be configured after a valid link has been established. This patch adds support to update flow control settings after auto-negotiation has completed. Signed-off-by: Lipeng

[PATCH V4 net-next 01/17] net: hns3: add support to query tqps number

2017-12-20 Thread Lipeng
This patch adds the support to query tqps number for PF driver by using ehtool -l command. Signed-off-by: Lipeng Signed-off-by: Mingguang Qu --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 10 ++ .../net/ethernet

[PATCH V2 net-next 13/17] net: hns3: add support to update flow control settings after autoneg

2017-12-18 Thread Lipeng
Liang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 36 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 1 + .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c| 4 +++ 3 files changed, 41 insertions(+) diff --git a/drivers/net

[PATCH V2 net-next 00/17] add some features and fix some bugs for HNS3 driver

2017-12-18 Thread Lipeng
V1 -> V2: 1, fix the comments from Sergei Shtylyov. --- Fuyun Liang (3): net: hns3: cleanup mac auto-negotiation state query net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg net: hns3: add Asym Pause support to phy default features Lipeng (13): net: hns3: add suppo

[PATCH V2 net-next 03/17] net: hns3: change the returned tqp number by ethtool -x

2017-12-18 Thread Lipeng
This patch modifies the return data of get_rxnfc, it will return the current handle's rss_size but not the total tqp number. because the tc_size has been change to the log2 of roundup power of two of rss_size. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisi

[PATCH V2 net-next 05/17] net: hns3: Get rss_size_max from configuration but not hardcode

2017-12-18 Thread Lipeng
From: qumingguang Add configuration for rss_size_max in hdev but not hardcode it. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +- drivers/net/ethernet

[PATCH V2 net-next 04/17] net: hns3: Free the ring_data structrue when change tqps

2017-12-18 Thread Lipeng
This patch fixes a memory leak problems in change tqps process, the function hns3_uninit_all_ring and hns3_init_all_ring may be called many times. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 1 file changed, 4 insertions

[PATCH V2 net-next 01/17] net: hns3: add support to query tqps number

2017-12-18 Thread Lipeng
This patch adds the support to query tqps number for PF driver by using ehtool -l command. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 10 ++ .../net/ethernet

[PATCH V2 net-next 02/17] net: hns3: add support to modify tqps number

2017-12-18 Thread Lipeng
This patch add the support to change tqps number for PF driver by using ehtool -L command. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 3 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 122 + drivers

[PATCH V2 net-next 07/17] net: hns3: Add vlan offload config command

2017-12-18 Thread Lipeng
This patch adds vlan offload config commands, initializes the rules of tx/rx vlan tag handle for hw. Signed-off-by: Shenjian Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 45 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 158

[PATCH V2 net-next 11/17] net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg

2017-12-18 Thread Lipeng
: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3p

[PATCH V2 net-next 12/17] net: hns3: add support for set_pauseparam

2017-12-18 Thread Lipeng
This patch adds set_pauseparam support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 13 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 83 ++ .../net/ethernet/hisilicon/hns3/hns3pf

[PATCH V2 net-next 16/17] net: hns3: Increase the default depth of bucket for TM shaper

2017-12-18 Thread Lipeng
Burstiness of a flow is determined by the depth of a bucket, When the upper rate of shaper is large, the current depth of a bucket is not enough. The default upper rate of shaper is 100G, so increase the depth of a bucket according to UM. Signed-off-by: Yunsheng Lin Signed-off-by: Lipeng

[PATCH V2 net-next 08/17] net: hns3: Add ethtool related offload command

2017-12-18 Thread Lipeng
This patch adds offload command related to "ethtool -K". Signed-off-by: Shenjian Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 16 drivers/net/ethernet/hisilicon/h

[PATCH V2 net-next 15/17] net: hns3: add support for querying advertised pause frame by ethtool ethx

2017-12-18 Thread Lipeng
This patch adds support for querying advertised pause frame by using ethtool command(ethtool ethx). Fixes: 496d03e960ae ("net: hns3: Add Ethtool support to HNS3 driver") Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h

[PATCH V2 net-next 09/17] net: hns3: Add handling vlan tag offload in bd

2017-12-18 Thread Lipeng
This patch deals with the vlan tag information between sk_buff and rx/tx bd. Signed-off-by: Shenjian Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 83 +++-- 1 file changed, 78 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet

[PATCH V2 net-next 17/17] net: hns3: change TM sched mode to TC-based mode when SRIOV enabled

2017-12-18 Thread Lipeng
TC-based sched mode supports SRIOV enabled and SRIOV disabled. This patch change the TM sched mode to TC-based mode in initialization process. Fixes: cc9bb43ab394 ("net: hns3: Add tc-based TM support for sriov enabled port") Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/h

[PATCH V2 net-next 10/17] net: hns3: cleanup mac auto-negotiation state query

2017-12-18 Thread Lipeng
-negotiation state query. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 24 -- 1 file changed, 24 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon

[PATCH V2 net-next 14/17] net: hns3: add Asym Pause support to phy default features

2017-12-18 Thread Lipeng
tised when the phy negotiates flow control. Fixes: c4fb2cdf575d ("net: hns3: fix a bug for phy supported feature initialization") Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH V2 net-next 06/17] net: hns3: Add a mask initialization for mac_vlan table

2017-12-18 Thread Lipeng
This patch sets vlan masked, in order to avoid the received packets being filtered. Signed-off-by: Shenjian Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 10 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 39 +- 2 files changed

[PATCH net-next 12/17] net: hns3: add support for set_pauseparam

2017-12-18 Thread Lipeng
This patch adds set_pauseparam support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 13 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 83 ++ .../net/ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 05/17] net: hns3: Get rss_size_max from configuration but not hardcode

2017-12-18 Thread Lipeng
From: qumingguang Add configuration for rss_size_max in hdev but not hardcode it. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +- drivers/net/ethernet

[PATCH net-next 17/17] net: hns3: change TM sched mode to TC-based mode when SRIOV enabled

2017-12-18 Thread Lipeng
TC-based sched mode supports SRIOV enabled and SRIOV disabled. This patch change the TM sched mode to TC-based mode in initialization process. Fixes: cc9bb43 (net: hns3: Add tc-based TM support for sriov enabled port) Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf

[PATCH net-next 11/17] net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg

2017-12-18 Thread Lipeng
: 46a3df9f9718 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ma

[PATCH net-next 13/17] net: hns3: add support to update flow control settings after autoneg

2017-12-18 Thread Lipeng
Liang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 36 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 1 + .../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c| 4 +++ 3 files changed, 41 insertions(+) diff --git a/drivers/net

[PATCH net-next 15/17] net: hns3: add support for querying advertised pause frame by ethtool ethx

2017-12-18 Thread Lipeng
This patch adds support for querying advertised pause frame by using ethtool command(ethtool ethx). Fixes: 496d03e960ae (net: hns3: Add Ethtool support to HNS3 driver) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 ++ drivers

[PATCH net-next 16/17] net: hns3: Increase the default depth of bucket for TM shaper

2017-12-18 Thread Lipeng
Burstiness of a flow is determined by the depth of a bucket, When the upper rate of shaper is large, the current depth of a bucket is not enough. The default upper rate of shaper is 100G, so increase the depth of a bucket according to UM. Signed-off-by: Yunsheng Lin Signed-off-by: Lipeng

[PATCH net-next 14/17] net: hns3: add Asym Pause support to phy default features

2017-12-18 Thread Lipeng
the phy negotiates flow control. Fixes: c4fb2cdf575d (net: hns3: fix a bug for phy supported feature initialization) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net

[PATCH net-next 10/17] net: hns3: cleanup mac auto-negotiation state query

2017-12-18 Thread Lipeng
-negotiation state query. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 24 -- 1 file changed, 24 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon

[PATCH net-next 06/17] net: hns3: Add a mask initialization for mac_vlan table

2017-12-18 Thread Lipeng
This patch sets vlan masked, in order to avoid the received packets being filtered. Signed-off-by: Shenjian Signed-off-by: Lipeng --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 10 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 39 +- 2 files changed

[PATCH net-next 00/17] add some features and fix some bugs for HNS3 driver

2017-12-18 Thread Lipeng
): net: hns3: cleanup mac auto-negotiation state query net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg net: hns3: add Asym Pause support to phy default features Lipeng (13): net: hns3: add support to query tqps number net: hns3: add support to modify tqps number n

[PATCH net-next 04/17] net: hns3: Free the ring_data structrue when change tqps

2017-12-18 Thread Lipeng
This patch fix a memory leak problems in change tqps process, the function hns3_uninit_all_ring and hns3_init_all_ring may be called many times. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 1 file changed, 4 insertions(+) diff

[PATCH net-next 08/17] net: hns3: Add ethtool related offload command

2017-12-18 Thread Lipeng
This patch adds offload command related to "ethtool -K". Signed-off-by: Shenjian Signed-off-by: Lipeng --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 3 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 16 drivers/net/ethernet/hisilicon/h

[PATCH net-next 03/17] net: hns3: change the returned tqp number by ethtool -x

2017-12-18 Thread Lipeng
This patch modify the return data of get_rxnfc, it will return the current handle's rss_size but not the total tqp number. because the tc_size has been change to the log2 of roundup power of two of rss_size. Signed-off-by: qumingguang Signed-off-by: Lipeng --- drivers/net/ethernet/hisi

  1   2   >