aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-11-01drivers/net: ntb_netdev: Convert timers to use timer_setup()Kees Cook1-4/+4
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jon Mason <jdmason@kudzu.us> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Allen Hubbe <Allen.Hubbe@emc.com> Cc: linux-ntb@googlegroups.com Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01bpf: avoid rcu_dereference inside bpf_event_mutex lock regionYonghong Song1-10/+7
During perf event attaching/detaching bpf programs, the tp_event->prog_array change is protected by the bpf_event_mutex lock in both attaching and deteching functions. Although tp_event->prog_array is a rcu pointer, rcu_derefrence is not needed to access it since mutex lock will guarantee ordering. Verified through "make C=2" that sparse locking check still happy with the new change. Also change the label name in perf_event_{attach,detach}_bpf_prog from "out" to "unlock" to reflect the code action after the label. Signed-off-by: Yonghong Song <yhs@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: sit: Update lookup to handle links set to L3 slaveDavid Ahern1-10/+21
Using SIT tunnels with VRFs works fine if the underlay device is in a VRF and the link parameter is set to the VRF device. e.g., ip tunnel add jtun mode sit remote <addr> local <addr> dev myvrf Update the device check to allow the link to be the enslaved device as well. e.g., ip tunnel add jtun mode sit remote <addr> local <addr> dev eth4 where eth4 is enslaved to myvrf. Reported-by: Jeff Barnhill <0xeffeff@gmail.com> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01atm: iphase: Fix space before '[' error.Arvind Yadav1-3/+3
Fix checkpatch.pl error: ERROR: space prohibited before open square bracket '['. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: bridge: add neigh_suppress to bridge port policiesNikolay Aleksandrov1-0/+1
Add an entry for IFLA_BRPORT_NEIGH_SUPPRESS to bridge port policies. Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood") Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01Merge branch 'mvpp2-various-improvements'David S. Miller1-39/+147
Antoine Tenart says: ==================== net: mvpp2: various improvements This series includes various patches improving the Marvell PPv2 driver. I send them as a series to avoid any possible merge conflict. - Patches 1 and 2 improve the initializing of the Tx and Rx FIFO. - Patch 3 initialize the RSS table to evenly distribute the ingress packets across multiple Rx queues based on their hashes. - Patch 4 limits the number of TSO segments sent to the driver, to avoid having more segments to handle than the corresponding number of available descriptors. - Patch 5 and 6 are cosmetic improvements. This applies on today's net-next branch, The patches were tested extensively (I ran iperf and http downloads in parallel, transferring TBs of data). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: mvpp2: simplify the Tx desc set DMA logicAntoine Tenart1-26/+13
Two functions were always used to set the DMA addresses in Tx descriptors, because this address is split into a base+offset in the descriptors. A mask was used to come up with the base and offset addresses and two functions were called, mvpp2_txdesc_dma_addr_set() and mvpp2_txdesc_offset_set(). This patch moves the base+offset calculation logic to mvpp2_txdesc_dma_addr_set(), and removes mvpp2_txdesc_offset_set() to simplify things. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: mvpp2: use the aggr txq size define everywhereAntoine Tenart1-3/+3
Cosmetic patch using the MVPP2_AGGR_TXQ_SIZE everywhere instead of the size field of aggr_txq, as the size never change and is always equal to the MVPP2_AGGR_TXQ_SIZE define. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: mvpp2: limit TSO segments and use stop/wake thresholdsAntoine Tenart1-2/+16
Too many TSO descriptors can be required for the default queue size, when using small MSS values for example. Prevent this by adding a maximum number of allowed TSO segments (300). In addition set a stop and a wake thresholds to stop the queue when there's no room for a 1 "worst case scenario skb". Wake up the queue when the number of descriptors is low enough. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: mvpp2: initialize the RSS tablesAntoine Tenart1-0/+50
This patch initialize the RSS tables to evenly (depending on the packets RSS hashes) distribute the packets across port Rx queues. This helps to handle packets on different CPUs to improve performances, as more queues will be used in parallel. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: mvpp2: initialize the Tx FIFO sizeAntoine Tenart1-4/+21
So far only the Rx FIFO size was initialized. For PPv2.2 the Tx FIFO size can be set as well. This patch initializes the Tx FIFO size for PPv2.2 controllers to 3K. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: mvpp2: set the Rx FIFO size depending on the port speeds for PPv2.2Antoine Tenart1-6/+46
The Rx FIFO size was set to the same value for all ports. This patch sets it depending on the maximum speed a given port can handle. This is only working for PPv2.2. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-nextDavid S. Miller3-55/+66
Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2017-10-30 1) Change some variables that can't be negative from int to unsigned int. From Alexey Dobriyan. 2) Remove a redundant header initialization in esp6. From Colin Ian King. 3) Some BUG to BUG_ON conversions. From Gustavo A. R. Silva. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01mkiss: remove redundant assignment of len to ax->mtuColin Ian King1-1/+0
Variable len is being assigned a value that is never read, hence the assignment is redundant and can be removed. Cleans up clang warning: drivers/net/hamradio/mkiss.c:443:3: warning: Value stored to 'len' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01selftests/bpf: remove useless bpf_trace_printkAlexei Starovoitov2-5/+0
sockmap test is using two programs that use bpf_trace_printk() which prints into trace_pipe, but nothing is reading it. Remove it. Fixes: 6f6d33f3b3d0 ("bpf: selftests add sockmap tests") Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: dccp: ccids: lib: packet_history: use swap macro in tfrc_rx_hist_swapGustavo A. R. Silva1-3/+1
Make use of the swap macro and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: decnet: dn_nsp_out: use swap macro in dn_mk_ack_headerGustavo A. R. Silva1-5/+2
Make use of the swap macro and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: decnet: dn_nsp_in: use swap macro in dn_nsp_rx_packetGustavo A. R. Silva1-6/+2
Make use of the swap macro and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01forcedeth: replace pci_alloc_consistent with dma_alloc_coherentZhu Yanjun1-20/+41
The functions pci_alloc_consistent is obsolete. So it is replaced with dma_alloc_coherent Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01ip_vti: remove the useless err_count check in vti_xmitXin Long1-9/+0
Unlike ipip and gre, ip_vti never uses err_count in vti4_err, so no need to check err_count in vti_xmit, it's value always 0. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: bcmgenet: Avoid calling platform_device_put() twice in bcmgenet_mii_exit()Wei Yongjun1-1/+0
Remove platform_device_put() call after platform_device_unregister() from function bcmgenet_mii_exit(), otherwise, we will call platform_device_put() twice. Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Doug Berger <opendmb@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01Merge branch 'extack-nonfatal'David S. Miller6-65/+99
David Ahern says: ==================== net: Allow non-fatal messages to be passed in extack There are many cases where networking subsystems throw non-fatal warning messages that end up in dmesg / kernel log to which a user making the change is completely oblivious. This set makes the extack facility usable for returning such messages. The case in point here is spectrum and adding FIB rules which causes an offload abort. Make the use case more user friendly by letting the user know that offload is no longer happening because of the rule change. v2 - kept the offload abort in a work queue entry per Ido's comment ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01mlxsw: spectrum_router: Return extack message on abort due to fib rulesDavid Ahern1-42/+66
Adding a FIB rule on a spectrum platform silently aborts FIB offload: $ ip ru add pref 99 from all to 192.168.1.1 table 10 $ dmesg -c [ 623.144736] mlxsw_spectrum 0000:03:00.0: FIB abort triggered. Note that FIB entries are no longer being offloaded to this device. This patch reworks FIB rule handling to return a message to the user: $ ip ru add pref 99 from all to 8.8.8.8 table 11 Error: spectrum: FIB rules not supported. Aborting offload. spectrum currently only checks whether the fib rule is a default rule or an l3mdev rule, both of which it knows how to handle. Any other it aborts FIB offload. Move the processing to check the rule type inline with the user request. If the rule is an unsupported one, then a work queue entry is used to abort the offload. Change the rule delete handling to just return since it does nothing at the moment. Signed-off-by: David Ahern <dsahern@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-01net: Add extack to fib_notifier_infoDavid Ahern4-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>
2017-11-01netlink: Allow ext_ack to carry non-error messagesDavid Ahern1-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>
2017-11-01Merge branch 'dsa-port-parsing'David S. Miller4-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>
2017-11-01net: dsa: remove name arg from slave createVivien Didelot4-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>
2017-11-01net: dsa: get port name at parse timeVivien Didelot2-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>
2017-11-01net: dsa: get master device at port parsing timeVivien Didelot1-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>
2017-11-01net: dsa: get port type at parse timeVivien Didelot1-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>
2017-11-01net: dsa: add port parse functionsVivien Didelot1-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>
2017-11-01net: dsa: get ports within parsing codeVivien Didelot1-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>
2017-11-01bpf: reduce verifier memory consumptionAlexei Starovoitov3-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>
2017-11-01Merge branch 'liquidio-switchdev-support'David S. Miller7-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>
2017-11-01liquidio: Configure switchdev with devlinkVijaya Mohan Guvva5-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>
2017-11-01liquidio: switchdev support for LiquidIO NICVijaya Mohan Guvva6-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>
2017-11-01Merge tag 'mlx5-updates-2017-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linuxDavid S. Miller4-526/+914
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>
2017-11-01Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queueDavid S. Miller13-68/+1496
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>
2017-11-01tc-testing: better test case file error reportingBrenda J. Butler1-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>
2017-11-01tc-testing: better check if thing is listBrenda J. Butler1-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>
2017-11-01tc-testing: correction to docstring in get_unique_itemBrenda J. Butler1-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>
2017-11-01tc-testing: split config fileBrenda J. Butler2-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>
2017-11-01tc-testing: gitignore, ignore standard python artifactsBrenda J. Butler1-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>
2017-11-01tc-testing: very simple example test casesBrenda J. Butler3-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>
2017-11-01Merge branch 'l2tp-remove-unused-code'David S. Miller8-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>
2017-11-01l2tp: remove field 'dev' from struct l2tp_ethGuillaume Nault1-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>
2017-11-01l2tp: remove l2tp_tunnel_count and l2tp_session_countGuillaume Nault1-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>
2017-11-01l2tp: remove l2tp specific refcount debuggingGuillaume Nault1-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>
2017-11-01l2tp: remove ->ref() and ->deref()Guillaume Nault7-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>
2017-10-31net/mlx5e: Switch channels counters to use stats group APIKamal Heib3-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>