- 05 Dec, 2017 40 commits
-
-
David S. Miller authored
Alexander Aring says: ==================== net: sched: sch_api: fix coding style issues for extack this patch prepares to handle extack for qdiscs and fixes checkpatch issues. There are a bunch of warnings issued by checkpatch which bothered me. This first patchset is to get rid of those warnings to make way for the next patchsets. I plan to followup with qdiscs, classifiers and actions after this. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Alexander Aring authored
This patch fixes the following checkpatch error: ERROR: do not use assignment in if condition by rearranging the if condition to execute init callback only if init callback exists. The whole setup afterwards is called in any case, doesn't matter if init callback is set or not. This patch has the same behaviour as before, just without assign err variable in if condition. It also makes the code easier to read. Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Cc: David Ahern <dsahern@gmail.com> Signed-off-by: Alexander Aring <aring@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Alexander Aring authored
This patch fix checkpatch issues for upcomming patches according to the sched api file. It changes checking on null pointer, remove unnecessary brackets, add variable names for parameters and adjust 80 char width. Cc: David Ahern <dsahern@gmail.com> Signed-off-by: Alexander Aring <aring@mojatatu.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Simon Horman says: ==================== nfp: enhanced debug dump via ethtool Add debug dump implementation to the NFP driver. This makes use of existing ethtool infrastructure. ethtool -W is used to select the dump level and ethtool -w is used to dump NFP state. The existing behaviour of dump level 0, dumping the arm.diag resource, is preserved. Dump levels greater than 0 are implemented by this patchset and optionally supported by firmware providing a _abi_dump_spec rtsym. This rtsym provides a specification, in TLV format, of the information to be dumped from the NFP at each supported dump level. Dumps are also structured using a TLVs. They consist a prolog and the data described int he corresponding dump. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
- The spec defines CSR address ranges for indirect ME CSRs. For Each TLV chunk in the spec, dump a chunk that includes the spec and the data over the defined address range. - Each indirect CSR has 8 contexts. To read one context, first write the context to a specific derived address, read it back, and then read the register value. - For each address, read and dump all 8 contexts in this manner. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
- The spec defines CSR address ranges for these types. - Dump each TLV chunk in the spec as a chunk that includes the spec and the data over the defined address range. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
Dump FW name as TLV, based on dump specification. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
- Add spec TLV for hwinfo field, containing key string as data. - Add dump TLV for hwinfo field, with data being key and value as packed zero-terminated strings. - If specified hwinfo field is not found, dump the spec TLV as -ENOENT error. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
- Dump hwinfo as separate TLV chunk, in a packed format containing zero-separated key and value strings. - This provides additional debug context, if requested by the dumpspec. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
- Support rtsym TLVs. - If specified rtsym is not found, dump the spec TLV as -ENOENT error. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
- Perform dumpspec traversals for calculating size and populating the dump. - Initially, wrap all spec TLVs in dump error TLVs (changed by later patches in the series). Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
- Use a TLV structure, with the typed chunks aligned to 8-byte sizes. - Dump numeric fields as big-endian. - Prolog contains the dump level. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
Load the TLV-based binary specification of what needs to be included in a dump, from the "_abi_dump_spec" rtsymbol. If the symbol is not defined, then dumps for levels >= 1 are not supported. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Carl Heymann authored
- Skeleton code to perform a binary debug dump via ethtoolops "set_dump", "get_dump_flags" and "get_dump_data", i.e. the ethtool -W/w mechanism. - Skeleton functions for debugdump operations provided. - An integer "dump level" can be specified, this is stored between ethtool invocations. Dump level 0 is still the "arm.diag" resource for backward compatibility. Other dump levels each define a set of state information to include in the dump, driven by a spec from FW. Signed-off-by: Carl Heymann <carl.heymann@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Cong Wang authored
Both Eric and Paolo noticed the rcu_barrier() we use in tcf_block_put_ext() could be a performance bottleneck when we have a lot of tc classes. Paolo provided the following to demonstrate the issue: tc qdisc add dev lo root htb for I in `seq 1 1000`; do tc class add dev lo parent 1: classid 1:$I htb rate 100kbit tc qdisc add dev lo parent 1:$I handle $((I + 1)): htb for J in `seq 1 10`; do tc filter add dev lo parent $((I + 1)): u32 match ip src 1.1.1.$J done done time tc qdisc del dev root real 0m54.764s user 0m0.023s sys 0m0.000s The rcu_barrier() there is to ensure we free the block after all chains are gone, that is, to queue tcf_block_put_final() at the tail of workqueue. We can achieve this ordering requirement by refcnt'ing tcf block instead, that is, the tcf block is freed only when the last chain in this block is gone. This also simplifies the code. Paolo reported after this patch we get: real 0m0.017s user 0m0.000s sys 0m0.017s Tested-by: Paolo Abeni <pabeni@redhat.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Jiri Pirko <jiri@mellanox.com> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Merge branch 'ieee802154-for-davem-2017-12-04' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154-next 2017-12-04 Some update from ieee802154 to *net-next* Jian-Hong Pan updated our docs to match the APIs in code. Michael Hennerichs enhanced the adf7242 driver to work with adf7241 devices and reworked the IRQ and packet handling in the driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Colin Ian King authored
Functions nsim_bpf_create_prog and nsim_bpf_destroy_prog are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'nsim_bpf_create_prog' was not declared. Should it be static? symbol 'nsim_bpf_destroy_prog' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Geert Uytterhoeven says: ==================== Teach phylib hard-resetting devices This patch series adds optional PHY reset support to phylib. The first two patches are destined for David's net-next tree. They add core PHY reset code, and update a driver that currently uses its own reset code. The last two patches are destined for Simon's renesas tree. They add properties to describe the EthernetAVB PHY reset topology to the common Salvator-X/XS and ULCB DTS files, which solves two issues: 1. On Salvator-XS, the enable pin of the regulator providing PHY power is connected to PRESETn, and PSCI powers down the SoC during system suspend. Hence a PHY reset is needed to restore network functionality after system resume. 2. Linux should not rely on the boot loader having reset the PHY, but should reset the PHY during driver probe. Changes compared to v3: - Remove Florian's Acked-by, - Add missing #include <linux/gpio/consumer.h>, - Re-add the gpiod check, as the dummy gpiod_set_value() for !GPIOLIB does not ignore NULL, and calls WARN_ON(1), - Do not reassert the reset signal if {mdio,phy}_probe() or phy_device_register() succeeded, as that may destroy initial setup, - Do not deassert the reset signal in {mdio,phy}_remove(), as it should already be deasserted, - Bring the PHY back into reset state in phy_device_remove(), - Move/consolidate GPIO descriptor acquiring code from of_mdiobus_register_phy() and of_mdiobus_register_device() to mdiobus_register_device(). Note that this changes behavior slightly, in that the reset signal is now also asserted when called from of_mdiobus_register_device(). - Add Reviewed-by, Changes compared to v2, as sent by Sergei Shtylyov: - Fix fwnode_get_named_gpiod() call due to added parameters (which allowed to eliminate the gpiod_direction_output() call), - Rebased, refreshed, reworded, - Take over from Sergei, - Add Acked-by, - Remove unneeded gpiod check, as gpiod_set_value() handles NULL fine, - Handle fwnode_get_named_gpiod() errors correctly: - -ENOENT is ignored (the GPIO is optional), and turned into NULL, which allowed to remove all later !IS_ERR() checks, - Other errors (incl. -EPROBE_DEFER) are propagated, - Extract DTS patches from series "[PATCH 0/4] ravb: Add PHY reset support" (https://www.spinics.net/lists/netdev/msg457308.html), and incorporate in this series, after moving reset-gpios from the ethernet to the ethernet-phy node. Given (1) the new reset-gpios DT property in the PHY node follows established practises, (2) the DT binding change in the first patch has been acked by Rob, and (3) the DTS patch does not cause any regressions if it is applied before the PHY driver patches, the DTS patches can be applied independently. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Sergei Shtylyov authored
With the phylib now being aware of the "reset-gpios" PHY node property, there should be no need to frob the PHY reset in this driver anymore... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Sergei Shtylyov authored
The PHY devices sometimes do have their reset signal (maybe even power supply?) tied to some GPIO and sometimes it also does happen that a boot loader does not leave it deasserted. So far this issue has been attacked from (as I believe) a wrong angle: by teaching the MAC driver to manipulate the GPIO in question; that solution, when applied to the device trees, led to adding the PHY reset GPIO properties to the MAC device node, with one exception: Cadence MACB driver which could handle the "reset-gpios" prop in a PHY device subnode. I believe that the correct approach is to teach the 'phylib' to get the MDIO device reset GPIO from the device tree node corresponding to this device -- which this patch is doing... Note that I had to modify the AT803x PHY driver as it would stop working otherwise -- it made use of the reset GPIO for its own purposes... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Rob Herring <robh@kernel.org> [geert: Propagate actual errors from fwnode_get_named_gpiod()] [geert: Avoid destroying initial setup] [geert: Consolidate GPIO descriptor acquiring code] Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Simon Horman authored
Move dissection of tunnel info to outside of the main flow dissection function, __skb_flow_dissect(). The sole user of this feature, the flower classifier, is updated to call tunnel info dissection directly, using skb_flow_dissect_tunnel_info(). This results in a slightly less complex implementation of __skb_flow_dissect(), in particular removing logic from that call path which is not used by the majority of users. The expense of this is borne by the flower classifier which now has to make an extra call for tunnel info dissection. This patch should not result in any behavioural change. Signed-off-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Jason Wang authored
This patch introduces an eBPF based queue selection method. With this, the policy could be offloaded to userspace completely through a new ioctl TUNSETSTEERINGEBPF. Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Salil Mehta says: ==================== net: hns3: Refactors "reset" handling code in HCLGE layer of HNS3 driver This patch refactors the code of the reset feature in HCLGE layer of HNS3 PF driver. Prime motivation to do this change is: 1. To reduce the time for which common miscellaneous Vector 0 interrupt is disabled because of the reset. Simplification of the common miscellaneous interrupt handler routine(for Vector 0) used to handle reset and other sources of Vector 0 interrupt. 2. Separate the task for handling the reset 3. Simplification of reset request submission and pending reset logic. To achieve above below few things have been done: 1. Interrupt is disabled while common miscellaneous interrupt handler is entered and re-enabled before it is exit. This reduces the interrupt handling latency as compared to older interrupt handling scheme where interrupt was being disabled in interrupt handler context and re-enabled in task context some time later. Made Miscellaneous interrupt handler more generic to handle all sources including reset interrupt source. 2. New reset service task has been introduced to service the reset handling. 3. Introduces new reset service task for honoring software reset requests like from network stack related to timeout and serving the pending reset request(to reset the driver and associated clients). Change Log: Patch V2: Addressed comment by Andrew Lunn Link: https://lkml.org/lkml/2017/12/1/366 Patch V1: Initial Submit ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Salil Mehta authored
In exisiting code, the way to detect if driver/client reset should be executed or if hardware should be be soft resetted was overly complex. Existing code use to read the interrupt status register from task context to figure out if the interrupt source event was reset and then use clear the interrupt source for reset while waiting for the hardware to finish the reset. This behaviour again was confusing and overly complex in terms of the flow. This patch simplifies the handling of the requested reset and the pending reset(i.e. reset which have already been asserted by the software and hardware has acknowledged back to driver that it is processing the hardware reset through interrupt) Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: lipeng <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Salil Mehta authored
Existing common service task was being used to service the reset requests. This patch tries to make the handling of reset cleaner by separating task to handle the reset requests. This might in turn help in adapting similar handling approach for other interrupt events like mailbox, sharing vector 0 interrupt. Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: lipeng <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Salil Mehta authored
The reset interrupt event shares common miscellaneous interrupt Vector 0. In the existing reset interrupt handling we disable the Vector 0 interrupt in misc interrupt handler and re-enable them later in context to common service task. This also means other event sources like mailbox would also be deferred or if the interrupt event was due to mailbox(which shall be supported for VF soon), it could delay the reset handling. This patch reorganizes the reset interrupt handling logic and makes it more fair to other events. Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: lipeng <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Julia Lawall authored
Function gem_add_flow_filter called on line 2958 inside lock on line 2949 but uses GFP_KERNEL Generated by: scripts/coccinelle/locks/call_kern.cocci Fixes: ae8223de ("net: macb: Added support for RX filtering") CC: Rafal Ozieblo <rafalo@cadence.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Russell King says: ==================== SFP/phylink updates This series, which follows on from the fixes posted earlier, improves the phylink/sfp support. Changes included here are: - Merge 802.3z and SGMII modes into one "in-band" mode, using the PHY_INTERFACE_MODE_xxx definition to determine which should be used. This allows more flexibility as more interface modes become available. - Allow 2500base-X and 10GBASE-KR to be requested from SFP. - Remove unused and unnecessary phylink_init_eee() - Restart 802.3z autonegotiation when starting the network device to ensure that the negotiated parameters are always correct. It has been observed on mvneta that this is not always the case without this change. - Add kerneldoc documentation for phylink and sfp upstream facing APIs and link it in to the networking documentation. - Resolve a sparse warning in sfp-bus.c - Convert phylink/sfp to use fwnode rather than DT so that other firmware systems can take advantage of this - I have received a request for it to be usable with ACPI. The exception to this is our interactions with phylib, as phylib itself does not yet support fwnode. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
Convert phylink to fwnode, switching phylink_create() from taking a device_node to taking a fwnode_handle. This will allow other firmware systems to take advantage of sfp/phylink support. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
Convert sfp-bus to use fwnode rather than device_node internally, so we can support more than just device tree firmware. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
drivers/net/phy/sfp-bus.c:298:13: warning: context imbalance in 'sfp_bus_release' - wrong count at exit Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
Add kernel-doc documentation for sfp kernel APIs, and link it into the networking kapi documentation under "Network device support". Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
Add kernel-doc documentation for phylink kernel APIs, and link it into the networking kapi documentation under "Network device support". Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
Restart 802.3z negotiation when the net device is brought up to ensure that the link partner has our current link modes. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
phylink_init_eee() serves no purpose, remove it. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
Add support for handling the faster 2.5G and 10G link modes when used with SFP modules. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
Since the handling of SGMII and 802.3z is now the same, combine the MLO_AN_xxx constants into a single MLO_AN_INBAND, and use the PHY interface mode to distinguish between Cisco SGMII and 802.3z. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
The code handling SGMII and 802.3z is essentially the same, except that we assume 802.3z has no PHY. Re-organise the code such that these cases are merged, and exclude 802.3z mode from having a PHY attached. This results in the same link handling behaviour as before. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Russell King authored
Add and use phy_interface_mode_is_8023z() helper to identify the interface modes that use 802.3z negotiation. Use it in phylink's phylink_mac_an_restart(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Florian Westphal authored
Incorrect/missing annotations caused a few sparse warnings: rtnetlink.c:155:15: incompatible types .. (different address spaces) rtnetlink.c:157:23: incompatible types .. (different address spaces) rtnetlink.c:185:15: incompatible types .. (different address spaces) rtnetlink.c:285:15: incompatible types .. (different address spaces) rtnetlink.c:317:9: incompatible types .. (different address spaces) rtnetlink.c:3054:23: incompatible types .. (different address spaces) no change in generated code. Fixes: addf9b90 ("net: rtnetlink: use rcu to free rtnl message handlers") Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-