summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
AgeCommit message (Collapse)AuthorFilesLines
2021-12-09net: ag71xx: remove unnecessary legacy methodsRussell King (Oracle)1-13/+0
ag71xx may have a PCS, but it does not appear to support configuration of the PCS in the current code. The functions to get its state merely report that the link is down, and the AN restart function is empty. Since neither of these functions will be called unless phylink's legacy flag is set, we can safely remove these functions and indicate this is a modern driver. Should PCS support be added later, it will need to be modelled using the phylink_pcs support rather than operating as a legacy driver. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-09net: mtk_eth_soc: mark as a legacy_pre_march2020 driverRussell King (Oracle)1-0/+4
mtk_eth_soc has not been updated for commit 7cceb599d15d ("net: phylink: avoid mac_config calls"), and makes use of state->speed and state->duplex in contravention of the phylink documentation. This makes reliant on the legacy behaviours, so mark it as a legacy driver. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-09net: huawei: hinic: Use devm_kcalloc() instead of devm_kzalloc()Gustavo A. R. Silva7-40/+31
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20211208040311.GA169838@embeddedor Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-09net: hinic: Use devm_kcalloc() instead of devm_kzalloc()Gustavo A. R. Silva1-9/+8
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20211208003527.GA75483@embeddedor Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-08net: mscc: ocelot: split register definitions to a separate fileColin Foster3-510/+536
Move these to a separate file will allow them to be shared to other drivers. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-08net: hns3: Fix spelling mistake "faile" -> "failed"Colin Ian King1-1/+1
There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20211206091207.113648-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-07Revert "net: hns3: add void before function which don't receive ret"Guangbin Huang2-2/+2
This reverts commit 5ac4f180bd07116c1e57858bc3f6741adbca3eb6. Sorry for taking no notice that the function devlink_register() has been already declared as void, so it is needs to revert this patch. Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Link: https://lore.kernel.org/r/20211204012448.51360-1-huangguangbin2@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-07net: prestera: replace zero-length array with flexible-array memberJosé Expósito1-2/+2
One-element and zero-length arrays are deprecated and should be replaced with flexible-array members: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Replace zero-length array with flexible-array member and make use of the struct_size() helper. Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: José Expósito <jose.exposito89@gmail.com> Reviewed-by: Volodymyr Mytnyk <vmytnyk@marvell.com> Tested-by: Volodymyr Mytnyk <vmytnyk@marvell.com> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20211204171349.22776-1-jose.exposito89@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-04qed*: esl priv flag support through ethtoolManish Chopra5-1/+80
ESL(Enhanced System Lockdown) was designed to lock PCI adapter firmware images and prevent changes to critical non-volatile configuration data so that uncontrolled, malicious or unintentional modification to the adapters are avoided, ensuring it's operational state. Once this feature is enabled, the device is locked, rejecting any modification to non-volatile images. Once unlocked, the protection is off such that firmware and non-volatile configurations may be altered. Driver just reflects the capability and status of this through the ethtool private flag. Signed-off-by: Manish Chopra <manishc@marvell.com> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com> Signed-off-by: Alok Prasad <palok@marvell.com> Signed-off-by: Ariel Elior <aelior@marvell.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-04qed*: enhance tx timeout debug infoManish Chopra6-15/+162
This patch add some new qed APIs to query status block info and report various data to MFW on tx timeout event Along with that it enhances qede to dump more debug logs (not just specific to the queue which was reported by stack) on tx timeout which includes various other basic metadata about all tx queues and other info (like status block etc.) Signed-off-by: Manish Chopra <manishc@marvell.com> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com> Signed-off-by: Alok Prasad <palok@marvell.com> Signed-off-by: Ariel Elior <aelior@marvell.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-03net: lan966x: fix a IS_ERR() vs NULL check in lan966x_create_targets()Dan Carpenter1-2/+2
The devm_ioremap() function does not return error pointers. It returns NULL. Fixes: db8bcaad5393 ("net: lan966x: add the basic lan966x driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: prestera: acl: fix return value check in prestera_acl_rule_entry_find()Yang Yingliang1-5/+2
rhashtable_lookup_fast() returns NULL pointer not ERR_PTR(). Return rhashtable_lookup_fast() directly to fix this. Fixes: 47327e198d42 ("net: prestera: acl: migrate to new vTCAM api") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: fix hns3 driver header file not self-contained issueJie Wang5-0/+18
The hns3 driver header file uses the structure of other files, but does not include corresponding file, which causes a check warning that the header file is not self-contained. Therefore, the required header file is included in the header file, and the structure declaration is added to the header file to avoid cyclic dependency of the header file. Signed-off-by: Jie Wang <wangjie125@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: replace one tab with space in for statementHao Chen1-1/+1
Replace one tab with space between symbol ')' and '{' in for statement of function hclge_map_tqp(). Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: remove rebundant line for hclge_dbg_dump_tm_pg()Hao Chen1-1/+0
Return value judgment should follow the function call, so remove line between them. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: add comments for hclge_dbg_fill_content()Hao Chen1-0/+4
When we use hclge_dbg_fill_content() to fill contents with specific format according to struct hclge_dbg_item *items, it may cause content cover due to unreasonable items. So add comments to explain how to avoid it. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: add void before function which don't receive retHao Chen2-2/+2
Add void before function which don't receive ret to improve code readability. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: align return value type of atomic_read() with its outputHao Chen1-1/+1
Change output value type of atomic_read() from %u to %d. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: modify one argument type of function hclge_ncl_config_data_printGuangbin Huang1-3/+3
The argument len will not be changed in hclge_ncl_config_data_print(), it is no need to declare as a pointer, so modify it into int type. Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: Align type of some variables with their print typeHao Chen3-4/+4
The c language has a set of implicit type conversions, when two variables perform bitwise or arithmetic operations. For example, variable A (type u16/u8) -1, its output is int type variable. u16/u8 will convert to int type implicitly before it does arithmetic operations. So, change 1 to unsigned type. Signed-off-by: Hao Chen <chenhao288@hisilicon.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: add print vport id for failed message of vlanGuangbin Huang1-4/+4
This patch adds print vport id when failed to get or set vlan filter parameters. Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: refactor function hclge_set_vlan_filter_hwGuangbin Huang1-18/+27
Function hclge_set_vlan_filter_hw() is a bit too long, so add a new function hclge_need_update_port_vlan() to simplify code and improve code readability. Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net: hns3: optimize function hclge_cfg_common_loopback()Yufeng Mo1-20/+42
hclge_cfg_common_loopback() is a bit too long, so encapsulate hclge_cfg_common_loopback_cmd_send() and hclge_cfg_common_loopback_wait() two functions to improve readability. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-03net/mlx5: Dynamically resize flow counters query bufferAvihai Horon1-14/+60
The flow counters bulk query buffer is allocated once during mlx5_fc_init_stats(). For PFs and VFs this buffer usually takes a little more than 512KB of memory, which is aligned to the next power of 2, to 1MB. For SFs, this buffer is reduced and takes around 128 Bytes. The buffer size determines the maximum number of flow counters that can be queried at a time. Thus, having a bigger buffer can improve performance for users that need to query many flow counters. There are cases that don't use many flow counters and don't need a big buffer (e.g. SFs, VFs). Since this size is critical with large scale, in these cases the buffer size should be reduced. In order to reduce memory consumption while maintaining query performance, change the query buffer's allocation scheme to the following: - First allocate the buffer with small initial size. - If the number of counters surpasses the initial size, resize the buffer to the maximum size. The buffer only grows and isn't shrank, because users with many flow counters don't care about the buffer size and we don't want to add resize overhead if the current number of counters drops. This solution is preferable to the current one, which is less accurate and only addresses SFs. Signed-off-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5e: TC, Set flow attr ip_version earlierRoi Dayan1-3/+3
Setting flow attr ip_version is not related to parsing tc flow actions. It needs to be set after parsing flower matches which changes the spec. So move it outside parse_tc_fdb_actions() and set it in __mlx5e_add_fdb_flow(). Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5e: TC, Move common flow_action checks into functionRoi Dayan1-20/+24
Remove duplicate checks on flow_action by using common function. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5e: Remove redundant actions arg from vlan push/pop funcsRoi Dayan1-10/+6
Passing actions is redundant and can be retrieved from flow attr. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5e: Remove redundant actions arg from validate_goto_chain()Roi Dayan1-9/+5
Passing actions is redundant and can be retrieved from flow. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5e: TC, Remove redundant action stack varRoi Dayan1-47/+42
Remove the action stack var from parse tc fdb actions and prase tc nic actions, use the flow attr action var directly. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5e: Hide function mlx5e_num_channels_changedTariq Toukan2-2/+1
No calls for mlx5e_num_channels_changed() out of en_main.c, turn it static and remove from header. Keep the wrapper function mlx5e_num_channels_changed_ctx exposed. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Aya Levin <ayal@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5e: SHAMPO, clean MLX5E_MAX_KLM_PER_WQE macroBen Ben-Ishay3-3/+3
This commit reduces unused variable from MLX5E_MAX_KLM_PER_WQE macro that introduced by commit d7b896acbdcb ("net/mlx5e: Add support to klm_umr_wqe"). Signed-off-by: Ben Ben-Ishay <benishay@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5: Print more info on pci error handlersSaeed Mahameed1-14/+37
In case mlx5_pci_err_detected was called with state equals to pci_channel_io_perm_failure, the driver will never come back up. It is nice to know why the driver went to zombie land, so print some useful information on pci err handlers. Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
2021-12-03net/mlx5: SF, silence an uninitialized variable warningDan Carpenter1-1/+1
This code sometimes calls mlx5_sf_hw_table_hwc_init() when "ext_base_id" is uninitialized. It's not used on that path, but it generates a static checker warning to pass uninitialized variables to another function. It may also generate runtime UBSan warnings depending on if the mlx5_sf_hw_table_hwc_init() function is inlined or not. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5: Fix some error handling paths in 'mlx5e_tc_add_fdb_flow()'Christophe JAILLET1-5/+9
All the error handling paths of 'mlx5e_tc_add_fdb_flow()' end to 'err_out' where 'flow_flag_set(flow, FAILED);' is called. All but the new error handling paths added by the commits given in the Fixes tag below. Fix these error handling paths and branch to 'err_out'. Fixes: 166f431ec6be ("net/mlx5e: Add indirect tc offload of ovs internal port") Fixes: b16eb3c81fe2 ("net/mlx5: Support internal port as decap route device") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03net/mlx5: Fix error return code in esw_qos_create()Wei Yongjun1-0/+1
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 85c5f7c9200e ("net/mlx5: E-switch, Create QoS on demand") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03mlx5: fix mlx5i_grp_sw_update_stats() stack usageArnd Bergmann1-3/+9
The mlx5e_sw_stats structure has grown to the point of triggering a warning when put on the stack of a function: mlx5/core/ipoib/ipoib.c: In function 'mlx5i_grp_sw_update_stats': mlx5/core/ipoib/ipoib.c:136:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] In this case, only five of the structure members are actually set, so it's sufficient to have those as separate local variables. As en_rep.c uses 'struct rtnl_link_stats64' for this, just use the same one here for consistency. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-03mlx5: fix psample_sample_packet link errorArnd Bergmann1-0/+1
When PSAMPLE is a loadable module, built-in drivers cannot use it: aarch64-linux-ld: drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.o: in function `mlx5e_tc_sample_skb': sample.c:(.text+0xd68): undefined reference to `psample_sample_packet' Add the same dependency here that is used for MLXSW Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski35-162/+327
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-12-02net: lan966x: Fix builds for lan966x driverHoratiu Vultur1-0/+1
The lan966x is using the function 'packing' to create/extract the information for the IFH, that is used to be added in front of the frames when they are injected/extracted. Therefore update the Kconfig to select config option 'PACKING' whenever lan966x driver is enabled. Fixes: db8bcaad539314 ("net: lan966x: add the basic lan966x driver") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02qed: Enhance rammod debug prints to provide pretty detailsPrabhakar Kushwaha4-15/+158
Instead of printing numbers of protocol IDs and rammod commands, enhance debug prints to provide names. s_protocol_types[] and s_ramrod_cmd_ids arrays[] are added to support along with APIs. Signed-off-by: Ariel Elior <aelior@marvell.com> Signed-off-by: Alok Prasad <palok@marvell.com> Signed-off-by: Prabhakar Kushwaha <pkushwaha@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02net: lan966x: Fix duplicate check in frame extractionHoratiu Vultur1-5/+0
The blamed commit generates the following smatch static checker warning: drivers/net/ethernet/microchip/lan966x/lan966x_main.c:515 lan966x_xtr_irq_handler() warn: duplicate check 'sz < 0' (previous on line 502) This patch fixes this issue removing the duplicate check 'sz < 0' Fixes: d28d6d2e37d10d ("net: lan966x: add port module support") Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02ibmvnic: drop bad optimization in reuse_tx_pools()Sukadev Bhattiprolu1-11/+3
When trying to decide whether or not reuse existing rx/tx pools we tried to allow a range of values for the pool parameters rather than exact matches. This was intended to reuse the resources for instance when switching between two VIO servers with different default parameters. But this optimization is incomplete and breaks when we try to change the number of queues for instance. The optimization needs to be updated, so drop it for now and simplify the code. Fixes: bbd809305bc7 ("ibmvnic: Reuse tx pools when possible") Reported-by: Dany Madden <drt@linux.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com> Reviewed-by: Dany Madden <drt@linux.ibm.com> Reviewed-by: Rick Lindsley <ricklind@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02ibmvnic: drop bad optimization in reuse_rx_pools()Sukadev Bhattiprolu1-11/+3
When trying to decide whether or not reuse existing rx/tx pools we tried to allow a range of values for the pool parameters rather than exact matches. This was intended to reuse the resources for instance when switching between two VIO servers with different default parameters. But this optimization is incomplete and breaks when we try to change the number of queues for instance. The optimization needs to be updated, so drop it for now and simplify the code. Fixes: 489de956e7a2 ("ibmvnic: Reuse rx pools when possible") Reported-by: Dany Madden <drt@linux.ibm.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com> Reviewed-by: Dany Madden <drt@linux.ibm.com> Reviewed-by: Rick Lindsley <ricklind@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02ethernet: aquantia: Try MAC address from device treeTianhao Chai1-10/+14
Apple M1 Mac minis (2020) with 10GE NICs do not have MAC address in the card, but instead need to obtain MAC addresses from the device tree. In this case the hardware will report an invalid MAC. Currently atlantic driver does not query the DT for MAC address and will randomly assign a MAC if the NIC doesn't have a permanent MAC burnt in. This patch causes the driver to perfer a valid MAC address from OF (if present) over HW self-reported MAC and only fall back to a random MAC address when neither of them is valid. Signed-off-by: Tianhao Chai <cth451@gmail.com> Reviewed-by: Igor Russkikh <irusskikh@marvell.com> Reviewed-by: Hector Martin <marcan@marcan.st> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02net: hns3: refactor function hns3_get_vector_ring_chain()Jie Wang1-68/+53
Currently hns3_get_vector_ring_chain() is a bit long. Refactor it by extracting sub process to improve the readability. Signed-off-by: Jie Wang <wangjie125@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02net: hns3: refactor function hclge_set_channels()Jie Wang1-18/+28
Currently hclge_set_channels() is a bit long. Refactor it by extracting sub process to improve the readability. Signed-off-by: Jie Wang <wangjie125@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02net: hns3: refactor function hclge_configure()Jie Wang1-24/+29
Currently hclge_configure() is a bit long. Refactor it by extracting sub process to improve the readability. Signed-off-by: Jie Wang <wangjie125@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02net: hns3: split function hclge_update_port_base_vlan_cfg()Jian Shen1-33/+36
Currently the function hclge_update_port_base_vlan_cfg() is a bit long. Split it to several small functions, to improve the readability. Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02net: hns3: split function hns3_nic_net_xmit()Yufeng Mo1-19/+28
Function hns3_nic_net_xmit() is a bit too long. So add a new function hns3_handle_skb_desc() to simplify code and improve code readability. Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-12-02net: hns3: split function hclge_get_fd_rule_info()Jian Shen1-18/+34
Currently the function hclge_get_fd_rule_info() is a bit long. Split it to several small functions, to improve readability. Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>