- 01 6月, 2021 21 次提交
-
-
由 Peng Li 提交于
Remove the meaningless stylistically wrong comment. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peng Li 提交于
According to the chackpatch.pl, switch and case should be at the same indent. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peng Li 提交于
Should not initialise statics to false. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peng Li 提交于
Add spaces required around that '='. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peng Li 提交于
Fix the checkpatch error as open brace '{' following struct should go on the same line. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peng Li 提交于
Fix the checkpatch error as "(foo*)" should be "(foo *)". Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peng Li 提交于
This patch fixes the checkpatch error about missing a blank line after declarations. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peng Li 提交于
This patch removes some redundant blank lines. Signed-off-by: NPeng Li <lipeng321@huawei.com> Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Willy Tarreau 提交于
This is a complement to commit aa6dd211 ("inet: use bigger hash table for IP ID generation"), but focusing on some specific aspects of IPv6. Contary to IPv4, IPv6 only uses packet IDs with fragments, and with a minimum MTU of 1280, it's much less easy to force a remote peer to produce many fragments to explore its ID sequence. In addition packet IDs are 32-bit in IPv6, which further complicates their analysis. On the other hand, it is often easier to choose among plenty of possible source addresses and partially work around the bigger hash table the commit above permits, which leaves IPv6 partially exposed to some possibilities of remote analysis at the risk of weakening some protocols like DNS if some IDs can be predicted with a good enough probability. Given the wide range of permitted IDs, the risk of collision is extremely low so there's no need to rely on the positive increment algorithm that is shared with the IPv4 code via ip_idents_reserve(). We have a fast PRNG, so let's simply call prandom_u32() and be done with it. Performance measurements at 10 Gbps couldn't show any difference with the previous code, even when using a single core, because due to the large fragments, we're limited to only ~930 kpps at 10 Gbps and the cost of the random generation is completely offset by other operations and by the network transfer time. In addition, this change removes the need to update a shared entry in the idents table so it may even end up being slightly faster on large scale systems where this matters. The risk of at least one collision here is about 1/80 million among 10 IDs, 1/850k among 100 IDs, and still only 1/8.5k among 1000 IDs, which remains very low compared to IPv4 where all IDs are reused every 4 to 80ms on a 10 Gbps flow depending on packet sizes. Reported-by: NAmit Klein <aksecurity@gmail.com> Signed-off-by: NWilly Tarreau <w@1wt.eu> Reviewed-by: NEric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20210529110746.6796-1-w@1wt.euSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Xie Yongji 提交于
This adds validation for used length (might come from an untrusted device) to avoid data corruption or loss. Signed-off-by: NXie Yongji <xieyongji@bytedance.com> Acked-by: NJason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20210531135852.113-1-xieyongji@bytedance.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Use tabs to indent instead of spaces. No functional change. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073902.7111-7-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073902.7111-6-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073902.7111-5-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073902.7111-4-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
{} braces are not needed over single if-statement. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073902.7111-3-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073902.7111-2-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Remove standard module init/exit boilerplate with module_driver() which also annotates the functions with __init. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073902.7111-1-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Correct block comments and usage of tab in function definition. No functional change. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073522.6720-4-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Use SPDX-License-Identifier: GPL-2.0-only, instead of hand writing it. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073522.6720-3-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073522.6720-2-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. Better to use standard debugging tools. This allows also to remove several local variables and entire fdp_nci_recv_frame() function (whose purpose was only to log). Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073522.6720-1-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 31 5月, 2021 8 次提交
-
-
由 Jakub Kicinski 提交于
Peter Geis says: ==================== fixes for yt8511 phy driver The Intel clang bot caught a few uninitialized variables in the new Motorcomm driver. While investigating the issue, it was found that the driver would have unintended effects when used in an unsupported mode. Fixed the uninitialized ret variable and abort loading the driver in unsupported modes. ==================== Link: https://lore.kernel.org/r/20210529110556.202531-1-pgwipeout@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peter Geis 提交于
While investigating the clang `ge` uninitialized variable report, it was discovered the default switch would have unintended consequences. Due to the switch to __phy_modify, the driver would modify the ID values in the default scenario. Fix this by promoting the interface mode switch and aborting when the mode is not a supported RGMII mode. This prevents the `ge` and `fe` variables from ever being used uninitialized. Fixes: 48e8c6f1 ("net: phy: add driver for Motorcomm yt8511 phy") Reported-by: Nkernel test robot <lkp@intel.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NPeter Geis <pgwipeout@gmail.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Peter Geis 提交于
clang doesn't preinitialize variables. If phy_select_page failed and returned an error, phy_restore_page would be called with `ret` being uninitialized. Even though phy_restore_page won't use `ret` in this scenario, initialize `ret` to silence the warning. Fixes: 48e8c6f1 ("net: phy: add driver for Motorcomm yt8511 phy") Reported-by: Nkernel test robot <lkp@intel.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NPeter Geis <pgwipeout@gmail.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Jakub Kicinski 提交于
Yang Yingliang says: ==================== net: dsa: qca8k: check return value of read functions correctly patch #1 - Change return type and add output parameter to make check return value of read functions correctly. patch #2 - Add missing check return value in qca8k_phylink_mac_config(). ==================== Link: https://lore.kernel.org/r/20210529030439.1723306-1-yangyingliang@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Yang Yingliang 提交于
Now we can check qca8k_read() return value correctly, so if it fails, we need return directly. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Yang Yingliang 提交于
Current return type of qca8k_mii_read32() and qca8k_read() are unsigned, it can't be negative, so the return value check is unuseful. For check the return value correctly, change return type of the read functions and add a output parameter to store the read value. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Gustavo A. R. Silva 提交于
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20210528202225.GA39855@embeddedorSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Gustavo A. R. Silva 提交于
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a fallthrough statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20210528195831.GA39131@embeddedorSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 30 5月, 2021 6 次提交
-
-
由 Jakub Kicinski 提交于
George Cherian says: ==================== NPC KPU updates Add support for - Loading Custom KPU profile entries - Add NPC profile Load from System Firmware DB - Add Support fo Coalescing KPU profiles - General Updates/Fixes to default KPU profile ==================== Link: https://lore.kernel.org/r/20210527094439.1910013-1-george.cherian@marvell.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 George Cherian 提交于
Add support for parsing following 1. NGIO 2. PPPOE 3. 24 byte custom L2 header 4. CPT Header 5. Fragmented CPT packets 6. VLAN EXDSA Fix for 1. EDSA VLAN parsing 2. Enhance FDSA 3. CPT Header parsing Remove ITAG support Signed-off-by: NSunil Kovvuri Goutham <Sunil.Goutham@marvell.com> Signed-off-by: NHarman Kalra <hkalra@marvell.com> Signed-off-by: NKiran Kumar K <kirankumark@marvell.com> Signed-off-by: NGeorge Cherian <george.cherian@marvell.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Harman Kalra 提交于
Adding support to load a new type of KPU image, known as coalesced/ consolidated KPU image via firmware database. This image is a consolidation of multiple KPU profiles into a single image. During kernel bootup this coalesced image will be read via firmware database and only the relevant KPU profile will be loaded. Existing functionality of loading single KPU/MKEX profile is intact as the images are differentiated based on the image signature. Signed-off-by: NHarman Kalra <hkalra@marvell.com> Signed-off-by: NSunil Kovvuri Goutham <Sunil.Goutham@marvell.com> Signed-off-by: NGeorge Cherian <george.cherian@marvell.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Harman Kalra 提交于
CN10k introduces following new LT DEF registers: 1. APAD (alignment padding) LT DEF registers are enhancement to existing apad calculation algorithm where not just ipv4 and ipv6 but also other protocols can be matched and required alignment can be added by NIX. 2. ET LT DEF register defines layer information in NPC_RESULT_S to identify the Ethertype location in L2 header. Used for Ethertype overwriting in inline IPsec flow. This patch adds required structures and some header changes. Also strict version check (based on minor field) is imposed to highlight version mismatch between the kernel headers and KPU profile. Signed-off-by: NHarman Kalra <hkalra@marvell.com> Signed-off-by: NJerin Jacob Kollanukkaran <jerinj@marvell.com> Signed-off-by: NKiran Kumar Kokkilagadda <kirankumark@marvell.com> Signed-off-by: NGeorge Cherian <george.cherian@marvell.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Harman Kalra 提交于
Currently NPC profile (KPU + MKEX) can be loaded using firmware binary in filesystem scheme. Enhancing the functionality to load NPC profile image from system firmware database. It uses the same technique as used for loading MKEX profile. Firstly firmware binary in kernel is checked for a valid image else tries to load NPC profile from firmware database and at last uses default profile if no proper image found. Signed-off-by: NHarman Kalra <hkalra@marvell.com> Signed-off-by: NSunil Kovvuri Goutham <Sunil.Goutham@marvell.com> Signed-off-by: NGeorge Cherian <george.cherian@marvell.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Stanislaw Kardach 提交于
Add ability to load a set of custom KPU entries. This allows for flexible support for custom protocol parsing. AF driver will attempt to load the profile and verify if it can fit hardware capabilities. If not, it will revert to the built-in profile. Next it will replace the first KPU_MAX_CST_LT (2) entries in each KPU in default profile with entries read from the profile image. The built-in profile should always contain KPU_MAX_CSR_LT first no-match entries and AF driver will disable those in the KPU unless custom profile is loaded. Profile file contains also a list of default protocol overrides to allow for custom protocols to be used there. Signed-off-by: NStanislaw Kardach <skardach@marvell.com> Signed-off-by: NGeorge Cherian <george.cherian@marvell.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 29 5月, 2021 5 次提交
-
-
由 Zhen Lei 提交于
Fix to return -EFAULT from the error handling case instead of 0, as done elsewhere in this function. By the way, when get_zeroed_page() fails, directly return -ENOMEM to simplify code. Fixes: 2c69448b ("ehea: DLPAR memory add fix") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20210528085555.9390-1-thunder.leizhen@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Gustavo A. R. Silva 提交于
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org> Acked-by: NHeiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/20210528202327.GA39994@embeddedorSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Vladimir Oltean 提交于
stmmac_mdio_register() has logic to search for PHYs on the MDIO bus and assign them IRQ lines, as well as to set priv->plat->phy_addr. If no PHY is found, the "found" variable remains set to 0 and the function errors out. After the introduction of commit f213bbe8 ("net: stmmac: Integrate it with DesignWare XPCS"), the "found" variable was immediately reused for searching for a PCS on the same MDIO bus. This can result in 2 types of potential problems (none of them seems to be seen on the only Intel system that sets has_xpcs = true, otherwise it would have been reported): 1. If a PCS is found but a PHY is not, then the code happily exits with no error. One might say "yes, but this is not possible, because of_mdiobus_register will probe a PHY for all MDIO addresses, including for the XPCS, so if an XPCS exists, then a PHY certainly exists too". Well, that is not true, see intel_mgbe_common_data(): /* Ensure mdio bus scan skips intel serdes and pcs-xpcs */ plat->mdio_bus_data->phy_mask = 1 << INTEL_MGBE_ADHOC_ADDR; plat->mdio_bus_data->phy_mask |= 1 << INTEL_MGBE_XPCS_ADDR; 2. A PHY is found but an MDIO device with the XPCS PHY ID isn't, and in that case, the error message will be "No PHY found". Confusing. Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/20210527155959.3270478-1-olteanv@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
The driver can match either via OF or ACPI ID tables. If one configuration is disabled, the table will be unused: drivers/nfc/st95hf/core.c:1059:34: warning: ‘st95hf_spi_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210528124200.79655-12-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Krzysztof Kozlowski 提交于
The driver can match either via OF or ACPI ID tables. If one configuration is disabled, the table will be unused: drivers/nfc/st21nfca/i2c.c:593:34: warning: ‘of_st21nfca_i2c_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210528124200.79655-11-krzysztof.kozlowski@canonical.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
-