History log of /openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c (Results 126 – 150 of 154)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 73fc9c48 18-Jan-2019 Huazhong Tan <tanhuazhong@huawei.com>

net: hns3: add interface hclge_tm_bp_setup

Provide a common interface to complete the back pressure settings
of all enabled TCs. So other functions directly call this interface
to co

net: hns3: add interface hclge_tm_bp_setup

Provide a common interface to complete the back pressure settings
of all enabled TCs. So other functions directly call this interface
to complete the corresponding operation.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.19.16, v4.19.15, v4.19.14, v4.19.13, v4.19.12, v4.19.11, v4.19.10, v4.19.9, v4.19.8, v4.19.7, v4.19.6, v4.19.5, v4.19.4, v4.18.20, v4.19.3
# e432abfb 19-Nov-2018 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: add common validation in hclge_dcb

Before setting tm related configuration to hardware, driver
needs to check the configuration provided by user is valid.
Currently hclge_

net: hns3: add common validation in hclge_dcb

Before setting tm related configuration to hardware, driver
needs to check the configuration provided by user is valid.
Currently hclge_ieee_setets and hclge_setup_tc both implement
their own checking, which has a lot in common.

This patch addes hclge_dcb_common_validate to do the common
checking. The checking in hclge_tm_prio_tc_info_update
and hclge_tm_schd_info_update is unnecessary now, so change
the return type to void, which removes the need to do error
handling when one of the checking fails.

Also, ets->prio_tc is indexed by user prio and ets->tc_tsa is
indexed by tc num, so this patch changes them to use different
index.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.18.19, v4.19.2, v4.18.18, v4.18.17, v4.19.1
# e8ccbb7d 02-Nov-2018 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Fix for out-of-bounds access when setting pfc back pressure

The vport should be initialized to hdev->vport for each bp group,
otherwise it will cause out-of-bounds access and

net: hns3: Fix for out-of-bounds access when setting pfc back pressure

The vport should be initialized to hdev->vport for each bp group,
otherwise it will cause out-of-bounds access and bp setting not
correct problem.

[ 35.254124] BUG: KASAN: slab-out-of-bounds in hclge_pause_setup_hw+0x2a0/0x3f8 [hclge]
[ 35.254126] Read of size 2 at addr ffff803b6651581a by task kworker/0:1/14

[ 35.254132] CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 4.19.0-rc7-hulk+ #85
[ 35.254133] Hardware name: Huawei D06/D06, BIOS Hisilicon D06 UEFI RC0 - B052 (V0.52) 09/14/2018
[ 35.254141] Workqueue: events work_for_cpu_fn
[ 35.254144] Call trace:
[ 35.254147] dump_backtrace+0x0/0x2f0
[ 35.254149] show_stack+0x24/0x30
[ 35.254154] dump_stack+0x110/0x184
[ 35.254157] print_address_description+0x168/0x2b0
[ 35.254160] kasan_report+0x184/0x310
[ 35.254162] __asan_load2+0x7c/0xa0
[ 35.254170] hclge_pause_setup_hw+0x2a0/0x3f8 [hclge]
[ 35.254177] hclge_tm_init_hw+0x794/0x9f0 [hclge]
[ 35.254184] hclge_tm_schd_init+0x48/0x58 [hclge]
[ 35.254191] hclge_init_ae_dev+0x778/0x1168 [hclge]
[ 35.254196] hnae3_register_ae_dev+0x14c/0x298 [hnae3]
[ 35.254206] hns3_probe+0x88/0xa8 [hns3]
[ 35.254210] local_pci_probe+0x7c/0xf0
[ 35.254212] work_for_cpu_fn+0x34/0x50
[ 35.254214] process_one_work+0x4d4/0xa38
[ 35.254216] worker_thread+0x55c/0x8d8
[ 35.254219] kthread+0x1b0/0x1b8
[ 35.254222] ret_from_fork+0x10/0x1c

[ 35.254224] The buggy address belongs to the page:
[ 35.254228] page:ffff7e00ed994400 count:1 mapcount:0 mapping:0000000000000000 index:0x0 compound_mapcount: 0
[ 35.273835] flags: 0xfffff8000008000(head)
[ 35.282007] raw: 0fffff8000008000 dead000000000100 dead000000000200 0000000000000000
[ 35.282010] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[ 35.282012] page dumped because: kasan: bad access detected

[ 35.282014] Memory state around the buggy address:
[ 35.282017] ffff803b66515700: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[ 35.282019] ffff803b66515780: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[ 35.282021] >ffff803b66515800: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[ 35.282022] ^
[ 35.282024] ffff803b66515880: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[ 35.282026] ffff803b66515900: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
[ 35.282028] ==================================================================
[ 35.282029] Disabling lock debugging due to kernel taint
[ 35.282747] hclge driver initialization finished.

Fixes: 67bf2541f4b9 ("net: hns3: Fixes the back pressure setting when sriov is enabled")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.19, v4.18.16, v4.18.15, v4.18.14, v4.18.13, v4.18.12, v4.18.11
# fe5eb043 26-Sep-2018 Huazhong Tan <tanhuazhong@huawei.com>

net: hns3: Change return type of hclge_tm_schd_info_update()

hclge_tm_schd_info_update should return an error when num_tc is greater
than alloc_tqps.

This patch changes the retu

net: hns3: Change return type of hclge_tm_schd_info_update()

hclge_tm_schd_info_update should return an error when num_tc is greater
than alloc_tqps.

This patch changes the return type of hnae3_register_ae_algo from void
to int.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# cd2086bf 26-Sep-2018 Fuyun Liang <liangfuyun1@huawei.com>

net: hns3: Set extra mac address of pause param for HW

The extra mac address of pause param is used to do double check
for pause frame. This patch set it to HW. If we do not do that,

net: hns3: Set extra mac address of pause param for HW

The extra mac address of pause param is used to do double check
for pause frame. This patch set it to HW. If we do not do that,
pfc pause frame will be transferred protocol stack when normal
flow control mode is enabled.

Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.18.10
# d0d72bac 21-Sep-2018 Jian Shen <shenjian15@huawei.com>

net: hns3: Unify the type convert for desc.data

For desc.data is already point to the address of struct member "data[6]",
it's unnecessary to use '&' to get its address. This patch unifi

net: hns3: Unify the type convert for desc.data

For desc.data is already point to the address of struct member "data[6]",
it's unnecessary to use '&' to get its address. This patch unifies all
the type convert for dest.data, using "req = (struct name *)dest.data".

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.18.9
# 32c7fbc8 19-Sep-2018 Jian Shen <shenjian15@huawei.com>

net: hns3: Fix parameter type for q_id in hclge_tm_q_to_qs_map_cfg()

So far all the places calling hclge_tm_q_to_qs_map_cfg() are assigning
an u16 type value to "q_id", and in the proces

net: hns3: Fix parameter type for q_id in hclge_tm_q_to_qs_map_cfg()

So far all the places calling hclge_tm_q_to_qs_map_cfg() are assigning
an u16 type value to "q_id", and in the processing of
hclge_tm_q_to_qs_map_cfg(), it also converts the "q_id" to le16.

The max tqp number for pf can be more than 256, we should use "u16" to
store the queue id, instead of "u8", which may cause data lost.

Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.18.7, v4.18.6, v4.18.5, v4.17.18, v4.18.4, v4.18.3, v4.17.17, v4.18.2, v4.17.16, v4.17.15, v4.18.1, v4.18, v4.17.14, v4.17.13, v4.17.12, v4.17.11, v4.17.10, v4.17.9
# d71d8381 19-Jul-2018 Jian Shen <shenjian15@huawei.com>

net: hns3: Add SPDX tags to HNS3 PF driver

Add the SPDX identifiers to HNS3 PF driver.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.

net: hns3: Add SPDX tags to HNS3 PF driver

Add the SPDX identifiers to HNS3 PF driver.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.17.8, v4.17.7, v4.17.6, v4.17.5
# 6d0ec65c 06-Jul-2018 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Fix for mac pause not disable in pfc mode

When pfc pause mode is enable, the mac pause mode need to be
disabled, otherwise the pfc pause packet will not be sent when
conge

net: hns3: Fix for mac pause not disable in pfc mode

When pfc pause mode is enable, the mac pause mode need to be
disabled, otherwise the pfc pause packet will not be sent when
congestion happens.

This patch fixes by disabling the mac pause when pfc pause is
enabled.

Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.17.4
# e4e87715 02-Jul-2018 Peng Li <lipeng321@huawei.com>

net: hns3: modify hnae_ to hnae3_

For consistency, prefix hnae_ should be modified to hnae3_.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazh

net: hns3: modify hnae_ to hnae3_

For consistency, prefix hnae_ should be modified to hnae3_.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.17.3, v4.17.2, v4.17.1, v4.17
# 67bf2541 15-May-2018 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Fixes the back pressure setting when sriov is enabled

When sriov is enabled, the Qset and tc mapping is not longer one
to one relation.

This patch fixes it by mapping

net: hns3: Fixes the back pressure setting when sriov is enabled

When sriov is enabled, the Qset and tc mapping is not longer one
to one relation.

This patch fixes it by mapping all pf and vf's Qset to tc.

Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 20670328 01-May-2018 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Remove error log when getting pfc stats fails

When mac supports DCB, but is in GE mode, it does not support
querying pfc stats, firmware returns error when trying to
query

net: hns3: Remove error log when getting pfc stats fails

When mac supports DCB, but is in GE mode, it does not support
querying pfc stats, firmware returns error when trying to
query the pfc stats. this creates a lot of noise in the kernel
log when it prints the error log.

This patch fixes it by removing the error log, because it already
return the error to the user space, so the user should be aware of
the error.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.16
# 64fd2300 09-Mar-2018 Peng Li <lipeng321@huawei.com>

net: hns3: add support for querying pfc puase packets statistic

This patch add support for querying pfc puase packets statistic
in hclge_ieee_getpfc, which is used to tell user how many

net: hns3: add support for querying pfc puase packets statistic

This patch add support for querying pfc puase packets statistic
in hclge_ieee_getpfc, which is used to tell user how many pfc
puase packets have been sent and received by this mac port.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# e98d7183 09-Mar-2018 Fuyun Liang <liangfuyun1@huawei.com>

net: hns3: unify the pause params setup function

Since the firmware cmd to setup mac pause params is the same as the
firmware cmd to pfc pause params, this patch unifies the pause params

net: hns3: unify the pause params setup function

Since the firmware cmd to setup mac pause params is the same as the
firmware cmd to pfc pause params, this patch unifies the pause params
setup function.

Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.15
# 18838d0c 05-Jan-2018 Fuyun Liang <liangfuyun1@huawei.com>

net: hns3: fix for not setting pause parameters

Pause parameters include source address, transmit gap and pause time.
The default value of the pause source address is zero in the hardwar

net: hns3: fix for not setting pause parameters

Pause parameters include source address, transmit gap and pause time.
The default value of the pause source address is zero in the hardware.
Default pause parameters need to be set to the hardware. Also, when
setting new mac address, the pause source address need to be updated.

Fixes: 9dc2145d910e ("net: hns3: Add support for PFC setting in TM module")
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 3a7d5958 21-Dec-2017 Peng Li <lipeng321@huawei.com>

net: hns3: Increase the default depth of bucket for TM shaper

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

net: hns3: Increase the default depth of bucket for TM shaper

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: Peng Li <lipeng321@huawei.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 61387774 21-Dec-2017 Peng Li <lipeng321@huawei.com>

net: hns3: add support for set_pauseparam

This patch adds set_pauseparam support for ethtool cmd.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Fuyun Liang <liang

net: hns3: add support for set_pauseparam

This patch adds set_pauseparam support for ethtool cmd.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.13.16, v4.14
# ad88d35a 01-Nov-2017 Colin Ian King <colin.king@canonical.com>

net: hns3: remove a couple of redundant assignments

The assignment to kinfo is redundant as this is a duplicate of
the initialiation of kinfo a few lines earlier, so it can be
remove

net: hns3: remove a couple of redundant assignments

The assignment to kinfo is redundant as this is a duplicate of
the initialiation of kinfo a few lines earlier, so it can be
removed. The assignment to v_tc_info is never read, so this
variable is redundant and can be removed completely. Cleans
up two clang warnings:

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c:433:34:
warning: Value stored to 'kinfo' during its initialization is never read
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c:775:3:
warning: Value stored to 'v_tc_info' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# a90bb9a5 09-Oct-2017 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Cleanup for endian issue in hns3 driver

This patch fixes a lot of endian issues detected by sparse.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by

net: hns3: Cleanup for endian issue in hns3 driver

This patch fixes a lot of endian issues detected by sparse.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


Revision tags: v4.13.5
# 7979a223 26-Sep-2017 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Setting for fc_mode and dcb enable flag in TM module

After the DCB feature is supported, fc_mode and dcb enable flag
must be set according to the DCB parameter.

Signe

net: hns3: Setting for fc_mode and dcb enable flag in TM module

After the DCB feature is supported, fc_mode and dcb enable flag
must be set according to the DCB parameter.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 77f255c1 26-Sep-2017 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Add some interface for the support of DCB feature

This patch add some interface and export some interface from
hclge_tm and hclgc_main to support the upcoming DCB feature.

net: hns3: Add some interface for the support of DCB feature

This patch add some interface and export some interface from
hclge_tm and hclgc_main to support the upcoming DCB feature.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# cc9bb43a 26-Sep-2017 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Add tc-based TM support for sriov enabled port

When sriov is enabled and TM is in tc-based mode, vf's TM
parameters is not set in TM initialization process.
This patch add

net: hns3: Add tc-based TM support for sriov enabled port

When sriov is enabled and TM is in tc-based mode, vf's TM
parameters is not set in TM initialization process.
This patch add the tc_based TM support for sriov enabled
using the information in vport struct.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 0a5677d3 26-Sep-2017 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Add support for port shaper setting in TM module

This patch add a tm_port_shaper cmd and set port shaper
to HCLGE_ETHER_MAX_RATE on TM initialization process.

Signed-

net: hns3: Add support for port shaper setting in TM module

This patch add a tm_port_shaper cmd and set port shaper
to HCLGE_ETHER_MAX_RATE on TM initialization process.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# 9dc2145d 26-Sep-2017 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Add support for PFC setting in TM module

This patch add a pfc_pause_en cmd, and use it to configure
PFC option according to fc_mode in hdev->tm_info.

Signed-off-by: Y

net: hns3: Add support for PFC setting in TM module

This patch add a pfc_pause_en cmd, and use it to configure
PFC option according to fc_mode in hdev->tm_info.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


# c5795c53 20-Sep-2017 Yunsheng Lin <linyunsheng@huawei.com>

net: hns3: Fix for pri to tc mapping in TM

Current mapping between pri and tc is one to one,
so user can't map multi priorities to the same tc.
This patch changes the mapping to many

net: hns3: Fix for pri to tc mapping in TM

Current mapping between pri and tc is one to one,
so user can't map multi priorities to the same tc.
This patch changes the mapping to many to one.

Fixes: 848440544b41f ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

show more ...


1234567