- 30 3月, 2021 13 次提交
-
-
由 Guojia Liao 提交于
The device HNAE3_DEVICE_VERSION_V3 supports up to 1280 queues and qsets for one function, so the bitwidth of tc_offset, meaning the tqps index, needs to expand from 10 bits to 11 bits. The device HNAE3_DEVICE_VERSION_V3 supports up to 512 queues on one TC. The tc_size, meaning the exponent with base 2 of queues supported on TC, which needs to expand from 3 bits to 4 bits. Signed-off-by: NGuojia Liao <liaoguojia@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
The actual size on wire for tso skb should be (gso_segs - 1) * hdr + skb->len instead of skb->len, which can be seen by user using 'ethtool -S ethX' cmd, and 'Byte Queue Limit' also use the send size stat to do the queue limiting, so add send_bytes in the desc_cb to record the actual send size for a skb. And send_bytes is only for tx desc_cb and page_offset is only for rx desc, so reuse the same space for both of them. Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yunsheng Lin 提交于
Currently hns3 driver only handle the xmit skb with one level of fraglist skb, add handling for multi level by calling hns3_tx_bd_num() recursively when calculating bd num and calling hns3_fill_skb_to_desc() recursively when filling tx desc. When the skb has a fraglist level of 24, the skb is simply dropped and stats.max_recursion_level is added to record the error. Move the stat handling from hns3_nic_net_xmit() to hns3_nic_maybe_stop_tx() in order to handle different error stat and add the 'max_recursion_level' and 'hw_limitation' stat. Note that the max recursive level as 24 is chose according to below: commit 48a1df65 ("skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow"). And that we are not able to find a testcase to verify the recursive fraglist case, so Fixes tag is not provided. Reported-by: NBarry Song <song.bao.hua@hisilicon.com> Signed-off-by: NYunsheng Lin <linyunsheng@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yufeng Mo 提交于
Currently, the queue reset process needs to be performed one by one, which is inefficient. However, the queue reset of the same function is always performed at the same time. Therefore, according to the UM, command HCLGE_OPC_CFG_RST_TRIGGER can be used to reset all queues of the same function at a time, in order to optimize the queue reset process. Signed-off-by: NYufeng Mo <moyufeng@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jian Shen 提交于
Currently, if user hasn't change channel number, the rss_size is limited to be no more than the vector number, in order to keep one vector only being mapped to one queue. But the queue number of each tc can be different, and one vector also can be mapped by multiple queues. So remove this limitation. Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guangbin Huang 提交于
The array size of bd_num_list is a fixed value, it may have potential overflow risk when array size of hclge_dfx_bd_offset_list is greater than that fixed value. So modify bd_num_list as a pointer and allocate memory for it according to array size of hclge_dfx_bd_offset_list. Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jian Shen 提交于
When new rule state is TO_ADD or ACTIVE, and there is already a rule with same location in the fd_rule_list, the new rule will be freed after modifying the old rule. It may cause user-after-free issue when access rule again in hclge_add_fd_entry_common(). Fixes: fc4243b8 ("net: hns3: refactor flow director configuration") Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jian Shen 提交于
Currently, when adding flow director rule, it missed to set rule state. Which may cause the rule state in software is unconsistent with hardware. Fixes: fc4243b8 ("net: hns3: refactor flow director configuration") Signed-off-by: NJian Shen <shenjian15@huawei.com> Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Colin Ian King 提交于
The pointers adapter and phydev are being initialized with values that are never read and are being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 29 3月, 2021 27 次提交
-
-
由 David S. Miller 提交于
Alex Elder says: ==================== net: ipa: a few last bits This series incorporates a few last things that didn't fit neatly with patches I've posted recently. The first patch eliminates all remaining kernel-doc warnings. There's still room for kernel-doc improvement, but at least what's there will no longer produce warnings. The next moves the definition of the value to store in the backward compatibility register (when present) into platform data files. The third removes two endpoint definitions that do not need to be defined. The next two switch the naming convention used for configuration data files to be based on the IPA version rather than the specific platform. I was skeptical about this at first (i.e., I thought a platform might have quirks separate from the IPA version). But I'm now convinced the IPA version is enough to define the details of the hardware block. If any exceptions to this are found, we can treat those differently. Note: these two patches produce warnings from checkpatch.pl about updating MAINTAINERS: these can be ignored. The sixth removes unnecessary checks for alignment of DMA memory allocations, based comments from David Laight. And the last removes a symbol representing the size of a table entry, using sizeof(__le64) in its place. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
Entries in an IPA route or filter table are 64-bit little-endian addresses, each of which refers to a routing or filtering rule. The format of these table slots are fixed, but IPA_TABLE_ENTRY_SIZE is used to define their size. This symbol doesn't really add value, and I think it unnecessarily obscures what a table entry *is*. So get rid of IPA_TABLE_ENTRY_SIZE, and just use sizeof(__le64) in its place throughout the code. Update the comments in "ipa_table.c" to provide a little better explanation of these table slots. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
A recent patch avoided doing 64-bit modulo operations by checking the alignment of some DMA allocations using only the lower 32 bits of the address. David Laight pointed out (after the fix was committed) that DMA allocations might already satisfy the alignment requirements. And he was right. Remove the alignment checks that occur after DMA allocation requests, and update comments to explain why the constraint is satisfied. The only place IPA_TABLE_ALIGN was used was to check the alignment; it is therefore no longer needed, so get rid of it. Add comments where GSI_RING_ELEMENT_SIZE and the tre_count and event_count channel data fields are defined to make explicit they are required to be powers of 2. Revise a comment in gsi_trans_pool_init_dma(), taking into account that dma_alloc_coherent() guarantees its result is aligned to a page size (or order thereof). Don't bother printing an error if a DMA allocation fails. Suggested-by: NDavid Laight <David.Laight@ACULAB.COM> Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
Rename the SC7180 configuration data file so that its name is derived from its IPA version. Update a few other references to the code that talk about the SC7180 rather than just IPA v4.2. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
Rename the SDM845 configuration data file so that its name is derived from its IPA version. I am not aware of any special IPA behavior or handling that would be based on a specific SoC (as opposed to a specific version of the IPA it contains). Update a few other references to the code that talk about the SDM845 rather than just IPA v3.5.1. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
We don't typically need much information about modem endpoints. Normally we need to specify information about modem endpoints in configuration data in only two cases: - When a modem TX endpoint supports filtering - When another endpoint's configuration refers to it For the first case, the AP initializes the filter table, and must know how many endpoints (AP and modem) support filtering. An example of the second case is the AP->modem TX endpoint, which defines the modem<-AP RX endpoint as its status endpoint. There is one exception to this, and it's due to a hardware quirk. For IPA v4.2 (only) there is a problem related to allocating GSI channels. And to work around this, the AP allocates *all* GSI channels at startup time--including those used by the modem. Get rid of the configuration information for two endpoints not required for the SDM845. SC7180 runs IPA v4.2, so we can't eliminate any modem endpoint definitions there. Two more minor changes: - Reorder the members defined for the ipa_endpoint_name enumerated type to match the order used in configuration data files when defining endpoints. - Add a new name, IPA_ENDPOINT_MODEM_DL_NLO_TX, which can be used for IPA v4.5+. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
The backward compatibility register value is a platform-specific property that is not stored in the platform data. Create a data field where this can be represented, and get rid ipa_reg_bcr_val(). This register is not present starting with IPA v4.5. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
Fix all warnings produced when running: scripts/kernel-doc -none drivers/net/ipa/*.[ch] Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Guobin Huang 提交于
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NGuobin Huang <huangguobin4@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Junlin Yang 提交于
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: NJunlin Yang <yangjunlin@yulong.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Yang Yingliang 提交于
Add the missing unlock before return from stmmac_suspend() in the error handling case. Fixes: 5ec55823 ("net: stmmac: add clocks management for gmac driver") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 kernel test robot 提交于
Opportunity for min() Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov <efremov@linux.com> Reported-by: Nkernel test robot <lkp@intel.com> Signed-off-by: Nkernel test robot <lkp@intel.com> Reviewed-by: NDavid Ahern <dsahern@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/nfc/digital_core.c:473: warning: expecting prototype for start_poll operation(). Prototype was for digital_start_poll() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/ipv6/ip6_tunnel.c:401: warning: expecting prototype for parse_tvl_tnl_enc_lim(). Prototype was for ip6_tnl_parse_tlv_enc_lim() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NDavid Ahern <dsahern@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/9p/client.c:133: warning: expecting prototype for parse_options(). Prototype was for parse_opts() instead net/9p/client.c:269: warning: expecting prototype for p9_req_alloc(). Prototype was for p9_tag_alloc() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/9p/trans_fd.c:881: warning: expecting prototype for p9_mux_destroy(). Prototype was for p9_conn_destroy() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/9p/error.c:207: warning: expecting prototype for errstr2errno(). Prototype was for p9_errstr2errno() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/core/netevent.c:45: warning: expecting prototype for netevent_unregister_notifier(). Prototype was for unregister_netevent_notifier() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/core/dev_addr_lists.c:732: warning: expecting prototype for dev_uc_flush(). Prototype was for dev_uc_init() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/netlabel/netlabel_mgmt.c:78: warning: expecting prototype for netlbl_mgmt_add(). Prototype was for netlbl_mgmt_add_common() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Xiongfeng Wang 提交于
Fix the following W=1 kernel build warning(s): net/l3mdev/l3mdev.c:111: warning: expecting prototype for l3mdev_master_ifindex(). Prototype was for l3mdev_master_ifindex_rcu() instead net/l3mdev/l3mdev.c:145: warning: expecting prototype for l3mdev_master_upper_ifindex_by_index(). Prototype was for l3mdev_master_upper_ifindex_by_index_rcu() instead Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Reviewed-by: NDavid Ahern <dsahern@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ilya Lipnitskiy 提交于
Three minor changes: - When disabling PLL, there is no need to call core_write_mmd_indirect directly, use the core_write wrapper instead like the rest of the code in the function does. This change helps with consistency and readability. Move the comment to the definition of core_read_mmd_indirect where it belongs. - Disable both core and TRGMII Tx clocks prior to reconfiguring. Previously, only the core clock was disabled, but not TRGMII Tx clock. So disable both, then configure them, then re-enable both, for consistency. - The core clock enable bit (REG_GSWCK_EN) is written redundantly three times. Simplify the code and only write the register only once at the end of clock reconfiguration to enable both core and TRGMII Tx clocks. Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode. Signed-off-by: NIlya Lipnitskiy <ilya.lipnitskiy@gmail.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Liu Jian 提交于
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_clear_arfs_rules': drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:7173:1: error: no return statement in function returning non-void [-Werror=return-type] 7173 | } | ^ cc1: some warnings being treated as errors make[6]: *** [scripts/Makefile.build:273: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.o] Error 1 make[5]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon/hns3/hns3pf] Error 2 make[4]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon/hns3] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon] Error 2 make[2]: *** [scripts/Makefile.build:534: drivers/net/ethernet] Error 2 make[1]: *** [scripts/Makefile.build:534: drivers/net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1980: drivers] Error 2 Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NLiu Jian <liujian56@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Petr Machata 提交于
After resilient next-hop groups have been added recently, there are two types of multipath next-hop groups: the legacy "mpath", and the new "resilient". Calling the legacy next-hop group type "mpath" is unfortunate, because that describes the fact that a packet could be forwarded in one of several paths, which is also true for the resilient next-hop groups. Therefore, to make the naming clearer, rename various artifacts to reflect the assumptions made. Therefore as of this patch: - The flag for multipath groups is nh_grp_entry::is_multipath. This includes the legacy and resilient groups, as well as any future group types that behave as multipath groups. Functions that assume this have "mpath" in the name. - The flag for legacy multipath groups is nh_grp_entry::hash_threshold. Functions that assume this have "hthr" in the name. - The flag for resilient groups is nh_grp_entry::resilient. Functions that assume this have "res" in the name. Besides the above, struct nh_grp_entry::mpath was renamed to ::hthr as well. UAPI artifacts were obviously left intact. Suggested-by: NDavid Ahern <dsahern@gmail.com> Signed-off-by: NPetr Machata <petrm@nvidia.com> Reviewed-by: NDavid Ahern <dsahern@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-