summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* net: Add extack to fib_notifier_infoDavid Ahern2017-11-014-14/+24
| | | | | | | | | | | Add extack to fib_notifier_info and plumb through stack to call_fib_rule_notifiers, call_fib_entry_notifiers and call_fib6_entry_notifiers. This allows notifer handlers to return messages to user. Signed-off-by: David Ahern <dsahern@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: Allow ext_ack to carry non-error messagesDavid Ahern2017-11-011-9/+9
| | | | | | | | The NLMSGERR API already carries data (eg, a cookie) on the success path. Allow a message string to be returned as well. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'dsa-port-parsing'David S. Miller2017-11-014-77/+95
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vivien Didelot says: ==================== net: dsa: add port parsing functions This patchset adds port parsing functions called early in the new bindings parsing stage, which regroup all the fetching of static data available at the port level, including the port's type, name and CPU master interface. This simplifies the rest of the code which does not need to dig into device tree or platform data again in order to check a port's type or name. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: remove name arg from slave createVivien Didelot2017-11-014-5/+5
| | | | | | | | | | | | | | | | | | Now that slave dsa_port always have their name set, there is no need to pass it to dsa_slave_create() anymore. Remove this argument. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: get port name at parse timeVivien Didelot2017-11-012-5/+6
| | | | | | | | | | | | | | | | | | | | | | Get the optional "label" property and assign a default one directly at parse time instead of doing it when creating the slave. For legacy, simply assign the port name stored in cd->port_names. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: get master device at port parsing timeVivien Didelot2017-11-011-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | Fetching the master device can be done directly when a port is parsed from device tree or pdata, instead of waiting until dsa_dst_parse. Now that -EPROBE_DEFER is returned before we add the switch to the tree, there is no need to check for this error after dsa_dst_parse. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: get port type at parse timeVivien Didelot2017-11-011-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | Assign a port's type at parsed time instead of waiting for the tree to be completed. Because this is now done earlier, we can use the port's type in dsa_port_is_* helpers instead of digging again in topology description. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: add port parse functionsVivien Didelot2017-11-011-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | Add symmetrical DSA port parsing functions for pdata and device tree, used to parse and validate a given port node or platform data. They don't do much for the moment but will be extended later on to assign a port type and get device references. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: get ports within parsing codeVivien Didelot2017-11-011-23/+10
|/ | | | | | | | | | | | | | | | There is no point into hiding the -EINVAL error code in ERR_PTR from a dsa_get_ports function, simply get the "ports" node directly from within the dsa_parse_ports_dn function. This also has the effect to make the pdata and device tree handling code symmetrical inside _dsa_register_switch. At the same time, rename dsa_parse_ports_dn to dsa_parse_ports_of because _of is a more common suffix for device tree parsing functions. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bpf: reduce verifier memory consumptionAlexei Starovoitov2017-11-013-156/+305
| | | | | | | | | | | | | | | | | | | | | the verifier got progressively smarter over time and size of its internal state grew as well. Time to reduce the memory consumption. Before: sizeof(struct bpf_verifier_state) = 6520 After: sizeof(struct bpf_verifier_state) = 896 It's done by observing that majority of BPF programs use little to no stack whereas verifier kept all of 512 stack slots ready always. Instead dynamically reallocate struct verifier state when stack access is detected. Runtime difference before vs after is within a noise. The number of processed instructions stays the same. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'liquidio-switchdev-support'David S. Miller2017-11-017-1/+858
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vijaya Mohan Guvva says: ==================== liquidio: switchdev support for LiquidIO NIC patch1 of this patch set adds switchdev support for SRIOV capable LiquidIO NIC, so that for every SRIOV VF on LiquidIO, a representor netdev is created on hypervisor. It also has changes to send representor interface configurations like admin state and MTU to LiquidIO firmware and to retrieve HW counted VF stats for VF representor. patch2 adds support for switchdev enable/disable from devlink Patchset Change Log: V2 -> V3: * Use mac address as the physical switchID. * Check for eswitch_mode before returning switchID V1 -> V2: * Name the representors "pfXvfY". * Drop patch3 (ethtool support for switchdev ports) that was in V1 because it's not necessary. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * liquidio: Configure switchdev with devlinkVijaya Mohan Guvva2017-11-015-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | Enable and disable switchdev on SRIOV capable LiquidIO NIC with devlink. Create representor netdev for each SRIOV VF function on SRIOV enable and and do the cleanup on SRIOV disable. Signed-off-by: Vijaya Mohan Guvva <vijaya.guvva@cavium.com> Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * liquidio: switchdev support for LiquidIO NICVijaya Mohan Guvva2017-11-016-1/+750
|/ | | | | | | | | | | | | | Enable switchdev for SRIOV capable LiquidIO NIC. It registers a representor netdev (with switchdev_ops) for each SRIOV VF created. It also has changes to send representor interface configurations like admin state and MTU to LiquidIO firmware and to retrieve HW counted VF stats for VF representor. Signed-off-by: Vijaya Mohan Guvva <vijaya.guvva@cavium.com> Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'mlx5-updates-2017-10-31' of ↵David S. Miller2017-11-014-526/+914
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-10-31 mlx5e stats groups This series from Kamal introduces an important refactoring for mlx5e stats handling, which groups the stats into generic groups structure which allows to control the behavior and stats reporting per group in a modular way. In the first patch Kamal introduces a new data type "mlx5e_stats_grp" This change defines a new API to create a group of stats and simplifies the way of handling them. This struct will define the following behavior per group: - get_num_stats() - return the number of counters in the group. - fill_strings() - fill counters strings within the group. - fill_stats() - fill counters values within the group. All other patches will be straight forward refactoring per stats group, where Kamal will move each mlx5e stats group to use the new API. The idea is to have better flexibility and modularity to add new counters, all ethtool logic was rendered generic and loops through the generic stats groups and calls the groups callbacks to figure out how and what to report back to user space. Introducing new file en_stats.c to hold all the new stat groups logic and implementation. Static structures (counters descriptors) moved from en_stats.h to en_stats.c which reduces the mlx5_core binary footprint, originally reported and addressed by Stephen Hemminger: ("mlx5: fix space waste from ethtool descriptions") which was waived due to this re-design. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx5e: Switch channels counters to use stats group APIKamal Heib2017-10-313-89/+106
| | | | | | | | | | | | | | | | Switch the channels counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch ipsec counters to use stats group APIKamal Heib2017-10-312-9/+25
| | | | | | | | | | | | | | | | Switch the ipsec counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch pme counters to use stats group APIKamal Heib2017-10-313-30/+54
| | | | | | | | | | | | | | | | Switch the pme counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch per prio pfc counters to use stats group APIKamal Heib2017-10-313-85/+113
| | | | | | | | | | | | | | | | Switch the per prio pfc counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch per prio traffic counters to use stats group APIKamal Heib2017-10-313-24/+50
| | | | | | | | | | | | | | | | Switch the per prio traffic counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch pcie counters to use stats group APIKamal Heib2017-10-313-58/+93
| | | | | | | | | | | | | | | | Switch the pcie counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch ethernet extended counters to use stats group APIKamal Heib2017-10-313-20/+48
| | | | | | | | | | | | | | | | Switch the ethernet extended counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch physical statistical counters to use stats group APIKamal Heib2017-10-313-21/+46
| | | | | | | | | | | | | | | | Switch the physical statistical counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch RFC 2819 counters to use stats group APIKamal Heib2017-10-313-30/+53
| | | | | | | | | | | | | | | | Switch the RFC 2819 counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch RFC 2863 counters to use stats group APIKamal Heib2017-10-313-20/+43
| | | | | | | | | | | | | | | | Switch the RFC 2863 counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch IEEE 802.3 counters to use stats group APIKamal Heib2017-10-313-36/+58
| | | | | | | | | | | | | | | | Switch the IEEE 802.3 counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch vport counters to use the stats group APIKamal Heib2017-10-313-55/+78
| | | | | | | | | | | | | | | | Switch the vport counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Switch Q counters to use the stats group APIKamal Heib2017-10-313-16/+35
| | | | | | | | | | | | | | | | Switch the Q counters to use the new stats group API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Introduce stats group APIKamal Heib2017-10-314-48/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the mlx5e driver has multiple groups of stats, each group is used for different purposes and it may depend on hardware capabilities or not. The problem with the current implementation is that there is no clear API to create a new group of stats. This change define a new API to create a group of stats and simplifies the way of handling them by defining a new struct "mlx5e_stats_grp" which have the following three function pointers: - get_num_stats() - return the number of counters in the group. - fill_strings() - fill counters strings within the group. - fill_stats() - fill counters values within the group. The above function pointers are used within the ethtool callbaks while calling "ethtool -S" from userspace. This change also switch the SW group to use the new API. Signed-off-by: Kamal Heib <kamalh@mellanox.com> Reviewed-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
* | Merge branch '40GbE' of ↵David S. Miller2017-11-0113-68/+1496
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-10-31 This series contains updates to i40e, i40evf and net/sched. Arnd Bergmann cleans up the power management code to resolve a build warning. Shannon Nelson fixes i40e to only redistribute our vectors when we did not get the full count that we requested. Alex reverts a previous commit because it potentially causes a memory leak when combined with the current page recycling scheme. Amritha enables configuring cloud filters in i40e using the tc-flower classifier. The classification function of the filter is to match a packet to a traffic class. cls_flower is extended to offload classid to hardware. Hardware traffic classes are identified using classid values reserved in the range :ffe0 - :ffef. The cloud filters are added for a VSI and are cleaned up when the VSI is deleted. The filters that match on L4 ports needs enhanced admin queue functions with big buffer support for extended fields in cloud filter commands. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | i40e: Enable cloud filters via tc-flowerAmritha Nambiar2017-10-317-31/+1192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables tc-flower based hardware offloads. tc flower filter provided by the kernel is configured as driver specific cloud filter. The patch implements functions and admin queue commands needed to support cloud filters in the driver and adds cloud filters to configure these tc-flower filters. The classification function of the filter is to direct matched packets to a traffic class. The hardware traffic class is set based on the the classid reserved in the range :ffe0 - :ffef. Match Dst MAC and route to TC0: prio 1 flower dst_mac 3c:fd:fe:a0:d6:70 skip_sw\ hw_tc 1 Match Dst IPv4,Dst Port and route to TC1: prio 2 flower dst_ip 192.168.3.5/32\ ip_proto udp dst_port 25 skip_sw\ hw_tc 2 Match Dst IPv6,Dst Port and route to TC1: prio 3 flower dst_ip fe8::200:1\ ip_proto udp dst_port 66 skip_sw\ hw_tc 2 Delete tc flower filter: Example: Flow Director Sideband is disabled while configuring cloud filters via tc-flower and until any cloud filter exists. Unsupported matches when cloud filters are added using enhanced big buffer cloud filter mode of underlying switch include: 1. source port and source IP 2. Combined MAC address and IP fields. 3. Not specifying L4 port These filter matches can however be used to redirect traffic to the main VSI (tc 0) which does not require the enhanced big buffer cloud filter support. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Clean up of cloud filtersAmritha Nambiar2017-10-312-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the cloud filter data structure and cleanup of cloud filters associated with the device. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Acked-by: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Admin queue definitions for cloud filtersAmritha Nambiar2017-10-312-4/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new admin queue definitions and extended fields for cloud filter support. Define big buffer for extended general fields in Add/Remove Cloud filters command. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Signed-off-by: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Cloud filter mode for set_switch_config commandAmritha Nambiar2017-10-316-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add definitions for L4 filters and switch modes based on cloud filters modes and extend the set switch config command to include the additional cloud filter mode. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Signed-off-by: Kiran Patil <kiran.patil@intel.com> Acked-by: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Map TCs with the VSI seidsAmritha Nambiar2017-10-312-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mapping of TCs with the seids of the channel VSIs. TC0 will be mapped to the main VSI seid and all other TCs are mapped to the seid of the corresponding channel VSI. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Acked-by: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | net: sched: Identify hardware traffic classes using classidAmritha Nambiar2017-10-313-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch offloads the classid to hardware and uses the classid reserved in the range :ffe0 - :ffef to identify hardware traffic classes reported via dev->num_tc. tcf_result structure contains the class ID of the class to which the packet belongs and is offloaded to hardware via flower filter. A new helper function is introduced to represent HW traffic classes 0 through 15 using the reserved classid values :ffe0 - :ffef. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Acked-by: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e/i40evf: Revert "i40e/i40evf: bump tail only in multiples of 8"Alexander Duyck2017-10-312-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 11f29003d6376fb123b7c3779dba49bb56fb0815. I am reverting this as I am fairly certain this can result in a memory leak when combined with the current page recycling scheme. Specifically we end up attempting to allocate fewer buffers than we recycled and this results in us rewinding the next to alloc pointer which leads to leaks when we overwrite the rx_buffer_info when processing the next frame. Fixes: 11f29003d637 ("i40e/i40evf: bump tail only in multiples of 8") Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: only redistribute MSI-X vectors when neededShannon Nelson2017-10-311-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether or not there are vectors_left, we only need to redistribute our vectors if we didn't get as many as we requested. With the current check, the code will try to redistribute even if we did in fact get all the vectors we requested - this can happen when we have more CPUs than we do vectors. This restores an earlier check to be sure we only redistribute if we didn't get the full count we requested. Fixes: 4ce20abc645f (i40e: fix MSI-X vector redistribution if hw limit is reached) Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: mark PM functions as __maybe_unusedArnd Bergmann2017-10-311-9/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A cleanup of the PM code left an incorrect #ifdef in place, leading to a harmless build warning: drivers/net/ethernet/intel/i40e/i40e_main.c:12223:12: error: 'i40e_resume' defined but not used [-Werror=unused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:12185:12: error: 'i40e_suspend' defined but not used [-Werror=unused-function] It's easier to use __maybe_unused attributes here, since you can't pick the wrong one. Fixes: 0e5d3da40055 ("i40e: use newer generic PM support instead of legacy PM callbacks") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Acked-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | tc-testing: better test case file error reportingBrenda J. Butler2017-11-011-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | tdc.py reads a bunch of test cases in json files. When a json file cannot be parsed, tdc just exits and does not run any tests. This patch will cause tdc to print a message with the file name and line number, then that file will be ignored and the rest of the tests will be processed. Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tc-testing: better check if thing is listBrenda J. Butler2017-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Check if tcase[k] is an instance of a list (is or is derived from list) instead of checking if it is a list. This will be useful if the data structures change to be something that implements list, instead of being an actual list. In that case, this code will not have to change. Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tc-testing: correction to docstring in get_unique_itemBrenda J. Butler2017-11-011-1/+1
| | | | | | | | | | | | Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tc-testing: split config fileBrenda J. Butler2017-11-012-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the config customization into a site-local file tdc_config_local.py, so that updates of the tdc test software does not require hand-editing of the config. This patch includes a template for the site-local customization file. In addition, this makes it easy to revert to a stock tdc environment for testing the test framework and/or the core tests. Also it makes it harder for any custom config to be submitted back to the kernel tdc. Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tc-testing: gitignore, ignore standard python artifactsBrenda J. Butler2017-11-011-0/+1
| | | | | | | | | | | | | | | | | | Ignore .pyc files, "python compiled" files, that get created when a python script is run. They should never be committed. Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tc-testing: very simple example test casesBrenda J. Butler2017-11-013-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of documentation, supply some very simple test cases to illustrate how test cases work. One test case shows commands in the setup, command, verify and teardown stages. Other test cases show how to have a working test case that does not have commands in the setup, verify and/or teardown stages. Specifically, the command lists for setup and teardown can be empty. And the verify command must have a command, but it can be /bin/true. The regex must have a string, we recommend a single space, and the count of matches must be zero if you do not want to use the match feature of verify. Verify will always look for a return code of success (0) so we give /bin/true when we do not want to make a check there. Also, update the documentation for testcases to be more specific in the cases of: - accepting non-success return codes in setup and teardown stages - how to write the test when no setup, teardown and/or verify are desired. To run the example test cases: $ sudo -E ./tdc.py -f creating-testcases/example.json -l 1f: (example) simple test to test framework 2f: (example) simple test, no need for verify 3f: (example) simple test, no need for setup or teardown (or verify) $ sudo -E ./tdc.py -f creating-testcases/example.json Test 1f: simple test to test framework Test 2f: simple test, no need for verify Test 3f: simple test, no need for setup or teardown (or verify) All test results: 1..3 ok 1 1f simple test to test framework ok 2 2f simple test, no need for verify ok 3 3f simple test, no need for setup or teardown (or verify) $ Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'l2tp-remove-unused-code'David S. Miller2017-11-018-116/+27
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guillaume Nault says: ==================== l2tp: remove unused code Patch #1 removes the ref/deref mechanism that was originally used to prevent ppp pseudowires from dropping their sockets. This mechanism was error prone and isn't used anymore. Patch #2 removes some module specific refcount debugging. Patches #3 and #4 take care of some dead code. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * l2tp: remove field 'dev' from struct l2tp_ethGuillaume Nault2017-11-011-5/+0
| | | | | | | | | | | | | | This field has never been used. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * l2tp: remove l2tp_tunnel_count and l2tp_session_countGuillaume Nault2017-11-011-10/+0
| | | | | | | | | | | | | | These variables have never been used. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * l2tp: remove l2tp specific refcount debuggingGuillaume Nault2017-11-011-22/+2
| | | | | | | | | | | | | | | | | | | | With conversion to refcount_t, such manual debugging code doesn't make sense anymore. The tunnel part was already dropped by 54652eb12c1b ("l2tp: hold tunnel while looking up sessions in l2tp_netlink"). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * l2tp: remove ->ref() and ->deref()Guillaume Nault2017-11-017-79/+25
|/ | | | | | | | | | | The ->ref() and ->deref() callbacks are unused since PPP stopped using them in ee40fb2e1eb5 ("l2tp: protect sock pointer of struct pppol2tp_session with RCU"). We can thus remove them from struct l2tp_session and drop the do_ref parameter of l2tp_session_get*(). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: filter: remove unused variable and fix warningJakub Kicinski2017-10-311-2/+1
| | | | | | | | | | | | | | bpf_getsockopt bpf call sets the ret variable to zero and never changes it. What's worse in case CONFIG_INET is not selected the variable is completely unused generating a warning. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Acked-by: Lawrence Brakmo <brakmo@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>