summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-28docs: networking: convert fore200e.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust title markup; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert filter.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust title markup; - mark code blocks and literals as such; - use footnote markup; - mark tables as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert fib_trie.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust title markup; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert eql.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - add a document title; - adjust titles and chapters, adding proper markups; - mark code blocks and literals as such; - mark tables as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert driver.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - add a document title; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert dns_resolver.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust titles and chapters, adding proper markups; - comment out text-only TOC from html/pdf output; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert defza.txt to ReSTMauro Carvalho Chehab
Not much to be done here: - add SPDX header; - add a document title; - use :field: markup for the version number; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert decnet.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust titles and chapters, adding proper markups; - mark lists as such; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert dctcp.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust title markup; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert dccp.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust title markup; - comment out text-only TOC from html/pdf output; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert cxacru.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - add a document title; - mark code blocks and literals as such; - mark lists as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert cops.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust titles and chapters, adding proper markups; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert cdc_mbim.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - mark code blocks and literals as such; - use :field: markup; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert bonding.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust titles and chapters, adding proper markups; - comment out text-only TOC from html/pdf output; - mark code blocks and literals as such; - mark tables as such; - add notes markups; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert baycom.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - adjust titles and chapters, adding proper markups; - mark code blocks and literals as such; - mark tables as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert ax25.txt to ReSTMauro Carvalho Chehab
There isn't much to be done here. Just: - add SPDX header; - add a document title. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert atm.txt to ReSTMauro Carvalho Chehab
There isn't much to be done here. Just: - add SPDX header; - add a document title. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert arcnet.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - use document title markup; - add notes markups; - mark code blocks and literals as such; - mark tables as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert arcnet-hardware.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - add document title markup; - add notes markups; - mark tables as such; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert altera_tse.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - use copyright symbol; - adjust titles and chapters, adding proper markups; - mark lists as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert 6pack.txt to ReSTMauro Carvalho Chehab
- add SPDX header; - use title markups; - mark code blocks and literals as such; - adjust identation, whitespaces and blank lines; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28docs: networking: convert caif files to ReSTMauro Carvalho Chehab
There are two text files for caif, plus one already converted file. Convert the two remaining ones to ReST, create a new index.rst file for CAIF, adding it to the main networking documentation index. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28net: ethernet: fec: Prevent MII event after MII_SPEED writeAndrew Lunn
The change to polled IO for MDIO completion assumes that MII events are only generated for MDIO transactions. However on some SoCs writing to the MII_SPEED register can also trigger an MII event. As a result, the next MDIO read has a pending MII event, and immediately reads the data registers before it contains useful data. When the read does complete, another MII event is posted, which results in the next read also going wrong, and the cycle continues. By writing 0 to the MII_DATA register before writing to the speed register, this MII event for the MII_SPEED is suppressed, and polled IO works as expected. Fixes: 29ae6bd1b0d8 ("net: ethernet: fec: Replace interrupt driven MDIO with polled IO") Reported-by: Andy Duan <fugang.duan@nxp.com> Suggested-by: Andy Duan <fugang.duan@nxp.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28dpaa2-eth: Use proper division helper in dpaa2_dbg_ch_showNathan Chancellor
When building arm32 allmodconfig: ERROR: modpost: "__aeabi_uldivmod" [drivers/net/ethernet/freescale/dpaa2/fsl-dpaa2-eth.ko] undefined! frames and cdan are both of type __u64 (unsigned long long) so we need to use div64_u64 to avoid this issues. Fixes: 460fd830dd9d ("dpaa2-eth: add channel stat to debugfs") Link: https://github.com/ClangBuiltLinux/linux/issues/1012 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reported-by: kernelci.org bot <bot@kernelci.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28net: phy: bcm54140: Make a bunch of functions staticChenTao
Fix the following warning: drivers/net/phy/bcm54140.c:663:5: warning: symbol 'bcm54140_did_interrupt' was not declared. Should it be static? drivers/net/phy/bcm54140.c:672:5: warning: symbol 'bcm54140_ack_intr' was not declared. Should it be static? drivers/net/phy/bcm54140.c:684:5: warning: symbol 'bcm54140_config_intr' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: ChenTao <chentao107@huawei.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28Merge branch 'kselftest-add-fixture-parameters'David S. Miller
Jakub Kicinski says: ==================== kselftest: add fixture parameters This set is an attempt to make running tests for different sets of data easier. The direct motivation is the tls test which we'd like to run for TLS 1.2 and TLS 1.3, but currently there is no easy way to invoke the same tests with different parameters. Tested all users of kselftest_harness.h. Dave, would it be possible to take these via net-next? It seems we're failing to get Shuah's attention. v2: - don't run tests by fixture - don't pass params as an explicit argument v3: - go back to the orginal implementation with an extra parameter, and running by fixture (Kees); - add LIST_APPEND helper (Kees); - add a dot between fixture and param name (Kees); - rename the params to variants (Tim); v4: - whitespace fixes. v5 (Kees): - move a comment; - remove a temporary variable; - reword the commit message on patch 4. v6: - resend for net-next. v1: https://lore.kernel.org/netdev/20200313031752.2332565-1-kuba@kernel.org/ v2: https://lore.kernel.org/netdev/20200314005501.2446494-1-kuba@kernel.org/ v3: https://lore.kernel.org/netdev/20200316225647.3129354-1-kuba@kernel.org/ v4: https://lore.kernel.org/netdev/20200317010419.3268916-1-kuba@kernel.org/ v5: https://lore.kernel.org/netdev/20200318010153.40797-1-kuba@kernel.org/ ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28selftests: tls: run all tests for TLS 1.2 and TLS 1.3Jakub Kicinski
TLS 1.2 and TLS 1.3 differ in the implementation. Use fixture parameters to run all tests for both versions, and remove the one-off TLS 1.2 test. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28kselftest: add fixture variantsJakub Kicinski
Allow users to build parameterized variants of fixtures. If fixtures want variants, they call FIXTURE_VARIANT() to declare the structure to fill for each variant. Each fixture will be re-run for each of the variants defined by calling FIXTURE_VARIANT_ADD() with the differing parameters initializing the structure. Since tests are being re-run, additional initialization (steps, no_print) is also added. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28kselftest: run tests by fixtureJakub Kicinski
Now that all tests have a fixture object move from a global list of tests to a list of tests per fixture. Order of tests may change as we will now group and run test fixture by fixture, rather than in declaration order. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28kselftest: create fixture objectsJakub Kicinski
Grouping tests by fixture will allow us to parametrize test runs. Create full objects for fixtures. Add a "global" fixture for tests without a fixture. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28kselftest: factor out list manipulation to a helperJakub Kicinski
Kees suggest to factor out the list append code to a macro, since following commits need it, which leads to code duplication. Suggested-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28Merge branch 'nexthop-API-sysctl'David S. Miller
Roopa Prabhu says: ==================== New sysctl to turn off nexthop API compat mode Currently route nexthop API maintains user space compatibility with old route API by default. Dumps and netlink notifications support both new and old API format. In systems which have moved to the new API, this compatibility mode cancels some of the performance benefits provided by the new nexthop API. This patch adds new sysctl nexthop_compat_mode which is on by default but provides the ability to turn off compatibility mode allowing systems to run entirely with the new routing API if they wish to. Old route API behaviour and support is not modified by this sysctl v4: - Use davids note for Documenting the sysctl - test with latest iproute2 and adjust 'pref' v3: - Document new sysctl - move sysctl to use proc_dointvec_minmax with 0 and 1 values - selftest: remove pref medium in ipv6 test v2: - Incorporate David Aherns pointers on covering dumps and nexthop deletes. Also use one ipv4 sysctl to cover both ipv4 and ipv6 (I see it is done that way for many others) - Added a selftest to cover dump and notfications for nexthop api compat mode ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28selftests: net: add new testcases for nexthop API compat mode sysctlRoopa Prabhu
New tests to check route dump and notifications with net.ipv4.nexthop_compat_mode on and off. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28net: ipv4: add sysctl for nexthop api compatibility modeRoopa Prabhu
Current route nexthop API maintains user space compatibility with old route API by default. Dumps and netlink notifications support both new and old API format. In systems which have moved to the new API, this compatibility mode cancels some of the performance benefits provided by the new nexthop API. This patch adds new sysctl nexthop_compat_mode which is on by default but provides the ability to turn off compatibility mode allowing systems to run entirely with the new routing API. Old route API behaviour and support is not modified by this sysctl. Uses a single sysctl to cover both ipv4 and ipv6 following other sysctls. Covers dumps and delete notifications as suggested by David Ahern. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28net: ipv6: new arg skip_notify to ip6_rt_delRoopa Prabhu
Used in subsequent work to skip route delete notifications on nexthop deletes. Suggested-by: David Ahern <dsahern@gmail.com> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-28netfilter: nft_nat: add netmap supportPablo Neira Ayuso
This patch allows you to NAT the network address prefix onto another network address prefix, a.k.a. netmapping. Userspace must specify the NF_NAT_RANGE_NETMAP flag and the prefix address through the NFTA_NAT_REG_ADDR_MIN and NFTA_NAT_REG_ADDR_MAX netlink attributes. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2020-04-28netfilter: nft_nat: add helper function to set up NAT address and protocolPablo Neira Ayuso
This patch add nft_nat_setup_addr() and nft_nat_setup_proto() to set up the NAT mangling. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2020-04-28netfilter: nft_nat: set flags from initialization pathPablo Neira Ayuso
This patch sets the NAT flags from the control plane path. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2020-04-28netfilter: nft_nat: return EOPNOTSUPP if type or flags are not supportedPablo Neira Ayuso
Instead of EINVAL which should be used for malformed netlink messages. Fixes: eb31628e37a0 ("netfilter: nf_tables: Add support for IPv6 NAT") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2020-04-27net: ethernet: ti: fix return value check in k3_cppi_desc_pool_create_name()Wei Yongjun
In case of error, the function gen_pool_create() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27r8169: improve error message if no dedicated PHY driver is foundHeiner Kallweit
There's a number of consumer mainboards where the BIOS leaves the PHY in a state that it's reporting an invalid PHY ID. To detect such cases add the PHY ID to the error message if no dedicated PHY driver is found. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27netfilter: nf_tables: allow up to 64 bytes in the set element data areaPablo Neira Ayuso
So far, the set elements could store up to 128-bits in the data area. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2020-04-27Merge tag 'batadv-next-for-davem-20200427' of ↵David S. Miller
git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - fix spelling error, by Sven Eckelmann - drop unneeded types.h include, by Sven Eckelmann - change random number generation to prandom_u32_max(), by Sven Eckelmann - remove unused function batadv_arp_change_timeout(), by Yue Haibing ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27Merge branch 'mlxsw-Rework-matchall-offloading-plumbing'David S. Miller
Ido Schimmel says: ==================== mlxsw: Rework matchall offloading plumbing Jiri says: Currently the matchall and flower are handled by registering separate callbacks in mlxsw. That leads to faulty indication "in_hw_count 2" in filter show command for every inserted flower filter. That happens because matchall callback just blindly returns 0 for it and it is wrongly accounted for as "the offloader". I inspected different ways to fix this problem. The only clean solution is to rework handling of matchall in mlxsw a bit. The driver newely registers one callback for bound block which is called for both matchall and flower filter insertions. On the way, iron out the matchall code a bit, push it into a separate file etc. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27selftests: forwarding: tc_actions.sh: add matchall mirror testJiri Pirko
Add test for matchall classifier with mirred egress mirror action. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27mlxsw: spectrum: Move flow offload binding into spectrum_flow.cJiri Pirko
Move the code taking case of setup of flow offload into spectrum_flow.c Do small renaming of callbacks on the way. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27mlxsw: spectrum_matchall: Process matchall events from the same cb as flowerJiri Pirko
Currently there are two callbacks registered: one for matchall, one for flower. This causes the user to see "in_hw_count 2" in TC filter dump. Because of this and also as a preparation for future matchall offload for rules equivalent to flower-all-match, move the processing of shared block into matchall.c. Leave only one cb for mlxsw driver per-block. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27mlxsw: spectrum: Avoid copying sample values and use RCU pointer direcly insteadJiri Pirko
Currently, only the psample_group is accessed using RCU on RX path. However, it is possible (unlikely) that other sample values get change during RX processing. Fix this by having the port->sample struct accessed as RCU pointer, containing all sample values including psample_group pointer. That avoids extra alloc per-port, copying the values and the race condition described above. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27mlxsw: spectrum_matchall: Push per-port rule add/del into separate functionsJiri Pirko
As the replace/destroy is going to be used later on per-block, push the per-port rule addition/deletion into separate functions. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-27mlxsw: spectrum_matchall: Move ingress indication into mall_entryJiri Pirko
Instead of having it in mirror_entry structure, move it to mall_entry and set it during rule insertion. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>