[PATCH net-next] net: hns: Fix for variable may be used uninitialized warnings

2018-01-17 Thread Huazhong Tan
When !CONFIG_REGMAP hns throws compiler warnings since dsaf_read_syscon ignores the return result from regmap_read, which allows val to be uninitialized. Fixes: 86897c960b49 ("net: hns: add syscon operation for dsaf") Reported-by: Jason Gunthorpe <j...@ziepe.ca> Signed-off-

[PATCH] arm64: dts: hisi: add hns-dsaf cpld control for the hip07 SoC

2018-01-18 Thread Huazhong Tan
Add cpld-syscon node to support the cpld control for hns-dsaf on the hip07 SoC. Signed-off-by: Huazhong Tan <tanhuazh...@huawei.com> --- arch/arm64/boot/dts/hisilicon/hip07.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hip07.dtsi b/arch

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

2020-09-29 Thread Huazhong Tan
ions and TQP enable status. Guangbin Huang (2): net: hns3: debugfs add new command to query device specifications net: hns3: dump tqp enable status in debugfs Guojia Liao (1): net: hns3: remove unused code in hns3_self_test() Huazhong Tan (4): net: hns3: replace macro HNS3_MAX_NON_TSO_BD

[PATCH net-next 5/7] net: hns3: remove unused code in hns3_self_test()

2020-09-29 Thread Huazhong Tan
From: Guojia Liao NETIF_F_HW_VLAN_CTAG_FILTER is not set in netdev->hw_feature, but set in netdev->features. So the handler of NETIF_F_HW_VLAN_CTAG_FILTER in hns3_self_test() is always true, remove it. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- drivers/net/ethernet/his

[PATCH net-next 6/6] net: hns3: use napi_consume_skb() when cleaning tx desc

2020-09-14 Thread Huazhong Tan
From: Yunsheng Lin Use napi_consume_skb() to batch consuming skb when cleaning tx desc in NAPI polling. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 27 +++--- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

[PATCH net-next 3/6] net: hns3: optimize the tx clean process

2020-09-14 Thread Huazhong Tan
to record the tx desc that has notified to the hw, so that hns3_nic_reclaim_desc() can decide how many tx desc's valid bit need checking when reclaiming tx desc. And io_err_cnt stat is also removed for it is not used anymore. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net

[PATCH net-next 2/6] net: hns3: batch tx doorbell operation

2020-09-14 Thread Huazhong Tan
. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 47 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 2 +- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 3 files changed, 39 insertions(+), 12

[PATCH net-next 4/6] net: hns3: optimize the rx clean process

2020-09-14 Thread Huazhong Tan
moving rx ring's next_to_clean forward to avoid double cleaning a rx desc, also add a dma_rmb() barrier in hns3_handle_rx_bd() to make sure valid bit is set before reading other field in the rx desc. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 5/6] net: hns3: use writel() to optimize the barrier operation

2020-09-14 Thread Huazhong Tan
(). Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 +++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 3 --- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b

[PATCH net-next 1/6] net: hns3: batch the page reference count updates

2020-09-14 Thread Huazhong Tan
From: Yunsheng Lin Batch the page reference count updates instead of doing them one at a time. By doing this we can improve the overall receive performance by avoid some atomic increment operations when the rx page is reused. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan

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

2020-09-14 Thread Huazhong Tan
There are some optimizations related to IO path. Yunsheng Lin (6): net: hns3: batch the page reference count updates net: hns3: batch tx doorbell operation net: hns3: optimize the tx clean process net: hns3: optimize the rx clean process net: hns3: use writel() to optimize the barrier

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

2020-09-16 Thread Huazhong Tan
There are some optimizations related to IO path. Change since V1: - fixes a unsuitable handling in hns3_lb_clear_tx_ring() of #6 which pointed out by Saeed Mahameed. previous version: V1:

[PATCH V2 net-next 4/6] net: hns3: optimize the rx clean process

2020-09-16 Thread Huazhong Tan
moving rx ring's next_to_clean forward to avoid double cleaning a rx desc, also add a dma_rmb() barrier in hns3_handle_rx_bd() to make sure valid bit is set before reading other field in the rx desc. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3

[PATCH V2 net-next 1/6] net: hns3: batch the page reference count updates

2020-09-16 Thread Huazhong Tan
From: Yunsheng Lin Batch the page reference count updates instead of doing them one at a time. By doing this we can improve the overall receive performance by avoid some atomic increment operations when the rx page is reused. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan

[PATCH V2 net-next 6/6] net: hns3: use napi_consume_skb() when cleaning tx desc

2020-09-16 Thread Huazhong Tan
From: Yunsheng Lin Use napi_consume_skb() to batch consuming skb when cleaning tx desc in NAPI polling. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 27 +++--- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

[PATCH V2 net-next 2/6] net: hns3: batch tx doorbell operation

2020-09-16 Thread Huazhong Tan
. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 47 +- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 2 +- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 +- 3 files changed, 39 insertions(+), 12

[PATCH V2 net-next 3/6] net: hns3: optimize the tx clean process

2020-09-16 Thread Huazhong Tan
to record the tx desc that has notified to the hw, so that hns3_nic_reclaim_desc() can decide how many tx desc's valid bit need checking when reclaiming tx desc. And io_err_cnt stat is also removed for it is not used anymore. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net

[PATCH V2 net-next 5/6] net: hns3: use writel() to optimize the barrier operation

2020-09-16 Thread Huazhong Tan
(). Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 +++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 3 --- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b

[PATCH net-next 4/7] net: hns3: add support for hw tc offload of tc flower

2020-12-09 Thread Huazhong Tan
at the same time. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 11 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 70 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 313 - .../ethernet/hisilicon

[PATCH net-next 2/7] net: hns3: add support for tc mqprio offload

2020-12-09 Thread Huazhong Tan
, the queue number of each tc should be power of 2. For the queues is not assigned to each tc by average, so it's should return vport->alloc_tqps for hclge_get_max_channels(). Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 6 +- driv

[PATCH net-next 6/7] net: hns3: adjust rss indirection table configure command

2020-12-09 Thread Huazhong Tan
255. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 7 +-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 20 ++-- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 7/7] net: hns3: adjust rss tc mode configure command

2020-12-09 Thread Huazhong Tan
field from 10 bits to 11 bits, and extend tc size field from 3 bits to 4 bits. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 4 +++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 ++ 2 files changed, 5 insertions

[PATCH net-next 5/7] net: hns3: add support for max 512 rss size

2020-12-09 Thread Huazhong Tan
Liao Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 4 +-- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 36 -- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 8

[PATCH net-next 3/7] net: hns3: add support for forwarding packet to queues of specified TC when flow director rule hit

2020-12-09 Thread Huazhong Tan
From: Jian Shen For some new device, it supports forwarding packet to queues of specified TC when flow director rule hit. So extend the command handle to support it. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 2 ++ .../net

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

2020-12-09 Thread Huazhong Tan
This patchset adds support for tc mqprio offload, hw tc offload of tc flower, and adpation for max rss size changes. Guojia Liao (3): net: hns3: add support for max 512 rss size net: hns3: adjust rss indirection table configure command net: hns3: adjust rss tc mode configure command Jian

[PATCH net-next 1/7] net: hns3: refine the struct hane3_tc_info

2020-12-09 Thread Huazhong Tan
From: Jian Shen Currently, there are multiple members related to tc information in struct hnae3_knic_private_info. Merge them into a new struct hnae3_tc_info. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 17 drivers

Re: [PATCH][next] net: hns3: fix expression that is currently always true

2020-12-14 Thread Huazhong Tan
xpression is always true which is not correct. Fix this by replacing || with && to correct the logic in the expression. Addresses-Coverity: ("Constant expression result") Fixes: 0205ec041ec6 ("net: hns3: add support for hw tc offload of tc flower") Signed-off-by: Colin

[PATCH V3 net-next 03/10] net: hns3: add support for 1us unit GL configuration

2020-11-11 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL configuration can set as 1us unit, so adds support for configuring this field. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 26 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

[PATCH V3 net-next 02/10] net: hns3: add support for querying maximum value of GL

2020-11-11 Thread Huazhong Tan
For maintainability and compatibility, add support for querying the maximum value of GL. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c| 1 + drivers/net/ethernet/hisilicon/hns3

[PATCH V3 net-next 08/10] net: hns3: add a check for ethtool priv-flag interface

2020-11-11 Thread Huazhong Tan
Add a check for hns3_set_priv_flags() since if the capability is unsupported its private flags should not be modified as well. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net

[PATCH V3 net-next 05/10] net: hns3: add support for dynamic interrupt moderation

2020-11-11 Thread Huazhong Tan
Add dynamic interrupt moderation support for the HNS3 driver. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 87 - drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 4 ++ 3 files

[PATCH V3 net-next 00/10] net: hns3: updates for -next

2020-11-11 Thread Huazhong Tan
1-git-send-email-tanhuazh...@huawei.com/ Huazhong Tan (10): net: hns3: add support for configuring interrupt quantity limiting net: hns3: add support for querying maximum value of GL net: hns3: add support for 1us unit GL configuration net: hns3: rename gl_adapt_enable in struct hns3_enet_coal

[PATCH V3 net-next 04/10] net: hns3: rename gl_adapt_enable in struct hns3_enet_coalesce

2020-11-11 Thread Huazhong Tan
Besides GL(Gap Limiting), QL(Quantity Limiting) can be modified dynamically when DIM is supported. So rename gl_adapt_enable as adapt_enable in struct hns3_enet_coalesce. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 12 ++-- drivers/net/ethernet

[PATCH V3 net-next 07/10] net: hns3: add hns3_state_init() to do state initialization

2020-11-11 Thread Huazhong Tan
To improve the readability and maintainability, add hns3_state_init() to initialize the state. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3

[PATCH V3 net-next 06/10] net: hns3: add ethtool priv-flag for DIM

2020-11-11 Thread Huazhong Tan
Add a control private flag in ethtool for enable/disable DIM feature. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 7 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 71

[PATCH V3 net-next 09/10] net: hns3: add support for EQ/CQ mode configuration

2020-11-11 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL can select EQ or CQ mode, so adds support for it. In CQ mode, the coalesced timer will restart when the first new completion occurs, while in EQ mode, the timer will not restart. Signed-off-by: Huazhong Tan --- drivers/net/ethernet

[PATCH V3 net-next 01/10] net: hns3: add support for configuring interrupt quantity limiting

2020-11-11 Thread Huazhong Tan
QL(quantity limiting) means that hardware supports the interrupt coalesce based on the frame quantity. QL can be configured when int_ql_max in device's specification is non-zero, so add support to configure it. Also, rename two coalesce init function to fit their purpose. Signed-off-by: Huazhong

[PATCH V3 net-next 10/10] net: hns3: add ethtool priv-flag for EQ/CQ

2020-11-11 Thread Huazhong Tan
Add a control private flag in ethtool for switching EQ/CQ mode. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 19 +++-- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 2

[RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-18 Thread Huazhong Tan
Since the information whether the adaptive behavior is implemented by DIM or driver custom is useful, so add new attribute to ETHTOOL_MSG_COALESCE_GET/ETHTOOL_MSG_COALESCE_SET commands to control the type of adaptive coalescing. Suggested-by: Jakub Kicinski Signed-off-by: Huazhong Tan

[RFC net-next 0/2] net: updates for -next

2020-11-18 Thread Huazhong Tan
#2 will add DIM for the HNS3 ethernet driver, then there will be two implemation of IRQ adaptive coalescing (DIM and driver custiom, so #1 adds a new netlink attribute to the ETHTOOL_MSG_COALESCE_GET/ETHTOOL_MSG_COALESCE_SET commands which controls the type of adaptive coalescing. Huazhong Tan (2

[RFC net-next 2/2] net: hns3: add support for dynamic interrupt moderation

2020-11-18 Thread Huazhong Tan
Add dynamic interrupt moderation support for the HNS3 driver, and add ethtool support for controlling the type of adaptive. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 87

[RFC V2 net-next 0/2] net: updates for -next

2020-11-19 Thread Huazhong Tan
: fixes some problems in #1 reported by Andrew Lunn & Michal Kubecek. previous version: V1: https://patchwork.ozlabs.org/project/netdev/cover/1605758050-21061-1-git-send-email-tanhuazh...@huawei.com/ Huazhong Tan (2): ethtool: add support for controling the type of adaptive coalescing

[RFC V2 net-next 2/2] net: hns3: add support for dynamic interrupt moderation

2020-11-19 Thread Huazhong Tan
Add dynamic interrupt moderation support for the HNS3 driver, and add ethtool support for controlling the type of adaptive. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 87

[RFC V2 net-next 1/2] ethtool: add support for controling the type of adaptive coalescing

2020-11-19 Thread Huazhong Tan
handler to deal with it in the netlink API, then other new extended coalescing parameters can utiliaze it as well. Suggested-by: Jakub Kicinski Signed-off-by: Huazhong Tan --- Documentation/networking/ethtool-netlink.rst | 1 + include/linux/ethtool.h | 14

[PATCH net-next 5/5] net: hns3: adds debugfs to dump more info of shaping parameters

2020-11-20 Thread Huazhong Tan
From: Yonglong Liu Adds debugfs to dump new shaping parameters: rate and flag. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH net-next 2/5] net: hns3: add support for mapping device memory

2020-11-20 Thread Huazhong Tan
For device who has device memory accessed through the PCI BAR4, IO descriptor push of NIC and direct WQE(Work Queue Element) of RoCE will use this device memory, so add support for mapping this device memory, and add this info to the RoCE client whose new feature needs. Signed-off-by: Huazhong

[PATCH net-next 3/5] net: hns3: add support for pf querying new interrupt resources

2020-11-20 Thread Huazhong Tan
off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 3 - .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 16 ++-- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 100 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h| 3 +- 4 files changed,

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

2020-11-20 Thread Huazhong Tan
This series includes some misc updates for the HNS3 ethernet driver. #1 adds support for 1280 queues #2 adds mapping for BAR45 which is needed by RoCE client. #3 extend the interrupt resources. #4 add support to query firmware's calculated shaping parameters. Huazhong Tan (1): net: hns3: add

[PATCH net-next 4/5] net: hns3: add support to utilize the firmware calculated shaping parameters

2020-11-20 Thread Huazhong Tan
-by: Yonglong Liu Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 43 -- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 15 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 1/5] net: hns3: add support for 1280 queues

2020-11-20 Thread Huazhong Tan
into two part: tqp_num(range 0~1023) and ext_tqp_num(range 1024~1279). Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 7 ++-- .../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 30 +++--- .../ethernet/hisilicon/hns3

[PATCH V4 net-next 1/4] net: hns3: add support for configuring interrupt quantity limiting

2020-11-16 Thread Huazhong Tan
QL(quantity limiting) means that hardware supports the interrupt coalesce based on the frame quantity. QL can be configured when int_ql_max in device's specification is non-zero, so add support to configure it. Also, rename two coalesce init function to fit their purpose. Signed-off-by: Huazhong

[PATCH V4 net-next 3/4] net: hns3: add support for 1us unit GL configuration

2020-11-16 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL configuration can set as 1us unit, so adds support for configuring this field. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 26 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

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

2020-11-16 Thread Huazhong Tan
: https://patchwork.ozlabs.org/project/netdev/cover/1604892159-19990-1-git-send-email-tanhuazh...@huawei.com/ V1: https://patchwork.ozlabs.org/project/netdev/cover/1604730681-32559-1-git-send-email-tanhuazh...@huawei.com/ Huazhong Tan (4): net: hns3: add support for configuring interrupt quantity limiting n

[PATCH V4 net-next 4/4] net: hns3: rename gl_adapt_enable in struct hns3_enet_coalesce

2020-11-16 Thread Huazhong Tan
Besides GL(Gap Limiting), QL(Quantity Limiting) can be modified dynamically when DIM is supported. So rename gl_adapt_enable as adapt_enable in struct hns3_enet_coalesce. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 12 ++-- drivers/net/ethernet

[PATCH V4 net-next 2/4] net: hns3: add support for querying maximum value of GL

2020-11-16 Thread Huazhong Tan
For maintainability and compatibility, add support for querying the maximum value of GL. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c| 1 + drivers/net/ethernet/hisilicon/hns3

[PATCH V2 net-next 1/3] net: hns3: add support for extended promiscuous command

2020-12-05 Thread Huazhong Tan
and rx broadcast promiscuous can be enabled separately. So add support for the new promiscuous command. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 31 +++- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 59

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

2020-12-05 Thread Huazhong Tan
There are some updates for the HNS3 ethernet driver. #1 supports an extended promiscuous command which makes promiscuous configuration more flexible, #2 adds ethtool private flags to control whether enable tx unicast promisc. #3 refine the vlan tag handling for port based vlan. change log: V2:

[PATCH V2 net-next 3/3] net: hns3: refine the VLAN tag handle for port based VLAN

2020-12-05 Thread Huazhong Tan
ble discard mode, hardware will strip and discard the port based VLAN tag, so vf driver doesn't need to identify it from rx buffer descriptor. So modify the port based VLAN configuration, simplify the process for vf handling the VLAN tag. Signed-off-by: Guojia Liao Signed-off-by: Huazhong

[PATCH V2 net-next 2/3] net: hns3: add priv flags support to switch limit promisc mode

2020-12-05 Thread Huazhong Tan
From: Jian Shen Currently, the tx unicast promisc is always enabled when promisc mode on. If tx unicast promisc on, a function will receive all unicast packet from other functions belong to the same port. Add a ethtool private flag to control whether enable tx unicast promisc. Then the function

[PATCH net] net: hns3: remove a misused pragma packed

2020-12-06 Thread Huazhong Tan
per entry. Fixes: a582b78dfc33 ("net: hns3: code optimization for debugfs related to "dump reg"") Reported-by: Stephen Rothwell Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h | 4 1 file changed, 4 deletions(-) diff --git a/

[PATCH net-next 1/3] net: hns3: add support for extended promiscuous command

2020-12-03 Thread Huazhong Tan
and rx broadcast promiscuous can be enabled separately. So add support for the new promiscuous command. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 31 +++- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 59

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

2020-12-03 Thread Huazhong Tan
There are some updates for the HNS3 ethernet driver. #1 supports an extended promiscuous command which makes promiscuous configuration more flexible, #2 adds ethtool private flags to control whether enable tx unicast promisc. #3 refine the vlan tag handling for port based vlan. Guojia Liao (2):

[PATCH net-next 3/3] net: hns3: refine the VLAN tag handle for port based VLAN

2020-12-03 Thread Huazhong Tan
hen enable discard mode, hardware will strip and discard the port based VLAN tag, so the vf driver doesn't need to identify it from rx buffer descriptor. So modify the port based VLAN configuration, simplify the process for vf handling the VLAN tag. Signed-off-by: Guojia Liao Signed-off-by: Huazh

[PATCH net-next 2/3] net: hns3: add priv flags support to switch limit promisc mode

2020-12-03 Thread Huazhong Tan
. Then the function is able to filter the unknown unicast packets from other function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h| 1 + drivers/net/ethernet/hisilicon/hns3/hnae3.h| 8 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

[PATCH net-next 1/7] net: hns3: add support for RX completion checksum

2020-11-27 Thread Huazhong Tan
In some cases (for example ip fragment), hardware will calculate the checksum of whole packet in RX, and setup the HNS3_RXD_L2_CSUM_B flag in the descriptor, so add support to utilize this checksum. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 21

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

2020-11-27 Thread Huazhong Tan
This series includes some updates for the HNS3 ethernet driver. #1~#6: add some updates related to the checksum offload. #7: add support for multiple TCs' MAC pauce mode. Huazhong Tan (6): net: hns3: add support for RX completion checksum net: hns3: add support for TX hardware checksum

[PATCH net-next 6/7] net: hns3: add a check for devcie's verion in hns3_tunnel_csum_bug()

2020-11-27 Thread Huazhong Tan
For the device whose version is above V3(include V3), the hardware can do checksum offload for the non-tunnel udp packet, who has a dest port as the IANA assigned. So add a check for devcie's verion in hns3_tunnel_csum_bug(). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 2/7] net: hns3: add support for TX hardware checksum offload

2020-11-27 Thread Huazhong Tan
simple BD description is unsuitable, rename it as HW TX CSUM. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 6 +-- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 6 ++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 62

[PATCH net-next 7/7] net: hns3: keep MAC pause mode when multiple TCs are enabled

2020-11-27 Thread Huazhong Tan
to the user settings. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 23 +- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net

[PATCH net-next 4/7] net: hns3: add udp tunnel checksum segmentation support

2020-11-27 Thread Huazhong Tan
For the device who has the capability to handle udp tunnel checksum segmentation, add support for it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 6 +- drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 5/7] net: hns3: add more info to hns3_dbg_bd_info()

2020-11-27 Thread Huazhong Tan
Since TX hardware checksum and RX completion checksum have been supported now, so add related information in hns3_dbg_bd_info(). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 50 +- 1 file changed, 40 insertions(+), 10 deletions

[PATCH net-next 3/7] net: hns3: remove unsupported NETIF_F_GSO_UDP_TUNNEL_CSUM

2020-11-27 Thread Huazhong Tan
and V2, add support for it later(when the device has the ability to do that). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

[PATCH V2 net-next 6/7] net: hns3: add a check for devcie's verion in hns3_tunnel_csum_bug()

2020-11-27 Thread Huazhong Tan
For the device whose version is above V3(include V3), the hardware can do checksum offload for the non-tunnel udp packet, who has a dest port as the IANA assigned. So add a check for devcie's verion in hns3_tunnel_csum_bug(). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3

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

2020-11-27 Thread Huazhong Tan
vbpf/cover/1606466842-57749-1-git-send-email-tanhuazh...@huawei.com/ Huazhong Tan (6): net: hns3: add support for RX completion checksum net: hns3: add support for TX hardware checksum offload net: hns3: remove unsupported NETIF_F_GSO_UDP_TUNNEL_CSUM net: hns3: add udp tunnel chec

[PATCH V2 net-next 1/7] net: hns3: add support for RX completion checksum

2020-11-27 Thread Huazhong Tan
In some cases (for example ip fragment), hardware will calculate the checksum of whole packet in RX, and setup the HNS3_RXD_L2_CSUM_B flag in the descriptor, so add support to utilize this checksum. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 21

[PATCH V2 net-next 5/7] net: hns3: add more info to hns3_dbg_bd_info()

2020-11-28 Thread Huazhong Tan
Since TX hardware checksum and RX completion checksum have been supported now, so add related information in hns3_dbg_bd_info(). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 50 +- 1 file changed, 40 insertions(+), 10 deletions

[PATCH V2 net-next 3/7] net: hns3: remove unsupported NETIF_F_GSO_UDP_TUNNEL_CSUM

2020-11-28 Thread Huazhong Tan
and V2, add support for it later(when the device has the ability to do that). Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

[PATCH V2 net-next 7/7] net: hns3: keep MAC pause mode when multiple TCs are enabled

2020-11-28 Thread Huazhong Tan
to the user settings. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 23 +- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net

[PATCH V2 net-next 2/7] net: hns3: add support for TX hardware checksum offload

2020-11-28 Thread Huazhong Tan
simple BD description is unsuitable, rename it as HW TX CSUM. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 6 +-- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 6 ++- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 62

[PATCH V2 net-next 4/7] net: hns3: add udp tunnel checksum segmentation support

2020-11-28 Thread Huazhong Tan
For the device who has the capability to handle udp tunnel checksum segmentation, add support for it. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 6 +- drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 11/11] net: hns3: add debugfs support for interrupt coalesce

2020-11-06 Thread Huazhong Tan
Since user may need to check the current configuration of the interrupt coalesce, so add debugfs support for query this info, which includes DIM profile, coalesce configuration of both software and hardware. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c

[PATCH net-next 09/11] net: hns3: add support for EQ/CQ mode configuration

2020-11-06 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL can select EQ or CQ mode, so adds support for it. In CQ mode, the coalesced timer will restart upon new completion, while in EQ mode, the timer will not restart. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h

[PATCH net-next 05/11] net: hns3: add support for dynamic interrupt moderation

2020-11-06 Thread Huazhong Tan
Add dynamic interrupt moderation support for the HNS3 driver. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 87 - drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 4 ++ 3 files

[PATCH net-next 07/11] net: hns3: add hns3_state_init() to do state initialization

2020-11-06 Thread Huazhong Tan
To improve the readability and maintainability, add hns3_state_init() to initialize the state. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 03/11] net: hns3: add support for querying maximum value of GL

2020-11-06 Thread Huazhong Tan
For maintainability and compatibility, add support for querying the maximum value of GL. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c| 1 + drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 02/11] net: hns3: add support for 1us unit GL configuration

2020-11-06 Thread Huazhong Tan
For device whose version is above V3(include V3), the GL configuration can set as 1us unit, so adds support for configuring this field. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 26 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.h

[PATCH net-next 08/11] net: hns3: add a check for ethtool priv-flag interface

2020-11-06 Thread Huazhong Tan
Add a check for hns3_set_priv_flags() since if the capability is unsupported its private flags should not be modified as well. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net

[PATCH net-next 04/11] net: hns3: rename gl_adapt_enable in struct hns3_enet_coalesce

2020-11-06 Thread Huazhong Tan
Besides GL(Gap Limiting), QL(Quantity Limiting) can be modified dynamically when DIM is supported. So rename gl_adapt_enable as adapt_enable in struct hns3_enet_coalesce. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 12 ++-- drivers/net/ethernet

[PATCH net-next 10/11] net: hns3: add ethtool priv-flag for EQ/CQ

2020-11-06 Thread Huazhong Tan
Add a control private flag in ethtool for switching EQ/CQ mode. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 19 -- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 2

[PATCH net-next 01/11] net: hns3: add support for configuring interrupt quantity limiting

2020-11-06 Thread Huazhong Tan
QL(quantity limiting) means that hardware supports the interrupt coalesce based on the frame quantity. QL can be configured when int_ql_max in device's specification is non-zero, so add support to configure it. Also, rename two coalesce init function to fit their purpose. Signed-off-by: Huazhong

[PATCH net-next 00/11] net: hns3: updates for -next

2020-11-06 Thread Huazhong Tan
tate initialization. #8 adds a check for the read-only private flag. #9 & #10 adds support for EQ/CQ configuration, and adds a control private flag in ethtool. #11 adds debugfs support for interrupt coalesce. Huazhong Tan (11): net: hns3: add support for configuring interrupt quantity limiting n

[PATCH net-next 06/11] net: hns3: add ethtool priv-flag for DIM

2020-11-06 Thread Huazhong Tan
Add a control private flag in ethtool for enable/disable DIM feature. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 7 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 71

[PATCH V2 net-next 01/11] net: hns3: add support for configuring interrupt quantity limiting

2020-11-08 Thread Huazhong Tan
QL(quantity limiting) means that hardware supports the interrupt coalesce based on the frame quantity. QL can be configured when int_ql_max in device's specification is non-zero, so add support to configure it. Also, rename two coalesce init function to fit their purpose. Signed-off-by: Huazhong

[PATCH V2 net-next 10/11] net: hns3: add ethtool priv-flag for EQ/CQ

2020-11-08 Thread Huazhong Tan
Add a control private flag in ethtool for switching EQ/CQ mode. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 19 +++-- drivers/net/ethernet/hisilicon/hns3/hns3_enet.h| 2

[PATCH V2 net-next 06/11] net: hns3: add ethtool priv-flag for DIM

2020-11-08 Thread Huazhong Tan
Add a control private flag in ethtool for enable/disable DIM feature. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h| 7 +++ drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 1 + drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 71

[PATCH V2 net-next 04/11] net: hns3: rename gl_adapt_enable in struct hns3_enet_coalesce

2020-11-08 Thread Huazhong Tan
Besides GL(Gap Limiting), QL(Quantity Limiting) can be modified dynamically when DIM is supported. So rename gl_adapt_enable as adapt_enable in struct hns3_enet_coalesce. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c| 12 ++-- drivers/net/ethernet

[PATCH V2 net-next 11/11] net: hns3: add debugfs support for interrupt coalesce

2020-11-08 Thread Huazhong Tan
Since user may need to check the current configuration of the interrupt coalesce, so add debugfs support for query this info, which includes DIM profile, coalesce configuration of both software and hardware. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c

[PATCH V2 net-next 02/11] net: hns3: add support for querying maximum value of GL

2020-11-08 Thread Huazhong Tan
For maintainability and compatibility, add support for querying the maximum value of GL. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c| 1 + drivers/net/ethernet/hisilicon/hns3

[PATCH V2 net-next 05/11] net: hns3: add support for dynamic interrupt moderation

2020-11-08 Thread Huazhong Tan
Add dynamic interrupt moderation support for the HNS3 driver. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 87 - drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 4 ++ 3 files

[PATCH V2 net-next 07/11] net: hns3: add hns3_state_init() to do state initialization

2020-11-08 Thread Huazhong Tan
To improve the readability and maintainability, add hns3_state_init() to initialize the state. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3

  1   2   3   4   5   6   7   >