aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-11-21docs-networking: fix typo in defineJesse Brandeburg1-1/+1
The #define for NETIF_F_GSO_UDP_L4 was incorrect in the documentation, fix it by making it match the actual code. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-21igb: Fix format with line continuation whitespaceJoe Perches1-7/+6
The line continuation unintentionally adds whitespace so instead use a coalesced format to remove the whitespace. Miscellanea: o Use a more typical style for ternaries and arguments for this logging message Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-21ixgbe: add ipsec hw offload note to ixgbe DocumentationShannon Nelson1-0/+13
Add a short note about using IPsec Hardware Offload with the ixgbe driver. 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>
2018-11-20Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queueDavid S. Miller14-313/+251
Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2018-11-20 This series contains updates to the ice driver only. Akeem updates the driver to determine whether or not to do auto-negotiation based on the VSI state. Bruce cleans up the control queue code to remove duplicate code. Take advantage of some compiler optimizations by making some structures constant, and also note that they cannot be modified. Cleaned up formatting issues and code comment that needed clarification. Fixed a potential NULL pointer dereference by adding a check. Jaroslaw adds a check to verify if memory was allocated or not. Yashaswini Raghuram fixes the driver to ensure we are not enabling the LAN_EN flag if the MAC in the MAC-VLAN is a unicast MAC, so that the unicast packets are not forwarded to the wire. Dave fixes the return value of ice_napi_poll() to be more useful in returning the work that was done and should only return 0 when no work was done. Anirudh does code comment cleanup, to make more consistent. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20Merge branch 'dsa-microchip-Modify-KSZ9477-DSA-driver-in-preparation-to-add-other-KSZ-switch-drivers'David S. Miller10-1420/+2039
Tristram Ha says: ==================== net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers This series of patches is to modify the original KSZ9477 DSA driver so that other KSZ switch drivers can be added and use the common code. There are several steps to accomplish this achievement. First is to rename some function names with a prefix to indicate chip specific function. Second is to move common code into header that can be shared. Last is to modify tag_ksz.c so that it can handle many tail tag formats used by different KSZ switch drivers. ksz_common.c will contain the common code used by all KSZ switch drivers. ksz9477.c will contain KSZ9477 code from the original ksz_common.c. ksz9477_spi.c is renamed from ksz_spi.c. ksz9477_reg.h is renamed from ksz_9477_reg.h. ksz_common.h is added to provide common code access to KSZ switch drivers. ksz_spi.h is added to provide common SPI access functions to KSZ SPI drivers. v4 - Patches were removed to concentrate on changing driver structure without adding new code. v3 - The phy_device structure is used to hold port link information - A structure is passed in ksz_xmit and ksz_rcv instead of function pointer - Switch offload forwarding is supported v2 - Initialize reg_mutex before use - The alu_mutex is only used inside chip specific functions v1 - Each patch in the set is self-contained - Use ksz9477 prefix to indicate KSZ9477 specific code ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net: dsa: microchip: rename ksz_9477_reg.h to ksz9477_reg.hTristram Ha3-2/+2
Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product name is always KSZ####. Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com> Reviewed-by: Woojung Huh <Woojung.Huh@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net: dsa: microchip: break KSZ9477 DSA driver into two filesTristram Ha8-1242/+1903
Break KSZ9477 DSA driver into two files in preparation to add more KSZ switch drivers. Add common functions in ksz_common.h so that other KSZ switch drivers can access code in ksz_common.c. Add ksz_spi.h for common functions used by KSZ switch SPI drivers. Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com> Reviewed-by: Woojung Huh <Woojung.Huh@microchip.com> Reviewed-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net: dsa: microchip: rename ksz_spi.c to ksz9477_spi.cTristram Ha3-8/+8
Rename ksz_spi.c to ksz9477_spi.c and update Kconfig in preparation to add more KSZ switch drivers. Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com> Reviewed-by: Woojung Huh <Woojung.Huh@microchip.com> Reviewed-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net: dsa: microchip: rename some functions with ksz9477 prefixTristram Ha1-57/+59
Rename some functions with ksz9477 prefix to separate chip specific code from common code. Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com> Reviewed-by: Woojung Huh <Woojung.Huh@microchip.com> Reviewed-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net: dsa: microchip: clean up codeTristram Ha1-4/+4
Clean up code according to patch check suggestions. Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com> Reviewed-by: Woojung Huh <Woojung.Huh@microchip.com> Reviewed-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net: dsa: microchip: replace license with GPLTristram Ha4-54/+10
Replace license with GPL. Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com> Reviewed-by: Woojung Huh <Woojung.Huh@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20ice: Fix possible NULL pointer de-referenceBruce Allan1-0/+3
A recent update to smatch is causing it to report the error "we previously assumed 'm_entry->vsi_list_info' could be null". Fix that. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Use Tx|Rx in commentsAnirudh Venkataramanan9-42/+42
In code comments, use Tx|Rx instead of tx|rx Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Cosmetic formatting changesAnirudh Venkataramanan11-84/+83
1. Fix several cases of double spacing 2. Fix typos 3. Capitalize abbreviations Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Cleanup short function signaturesBruce Allan3-8/+4
Function signatures that do not exceed 80-characters should be on a single line. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Cleanup ice_tx_timeout()Bruce Allan1-13/+9
Clean up number of formatting issues and a comment that could use clarification. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Fix return value from NAPI pollDave Ertman1-1/+2
ice_napi_poll is hard-coded to return zero when it's done. It should instead return the work done (if any work was done). The only time it should return zero is if an interrupt or poll is handled and no work is performed. So change the return value to be the minimum of work done or budget-1. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Constify global structures that can/should beBruce Allan1-2/+2
Indicate these structs should not be modified and take advantage of some compiler optimizations by making these structs const. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Do not set LAN_EN for MAC-VLAN filtersYashaswini Raghuram Prathivadi Bhayankaram1-13/+24
In the action fields for a MAC-VLAN filter, do not set the LAN_EN flag if the MAC in the MAC-VLAN is unicast MAC. The unicast packets that match should not be forwarded to the wire. Signed-off-by: Yashaswini Raghuram Prathivadi Bhayankaram <yashaswini.raghuram.prathivadi.bhayankaram@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Pass the return value of ice_init_def_sw_recp()Jaroslaw Ilgiewicz1-3/+1
Added check of return value for ice_init_def_sw_recp(). Now we know if memory was correctly allocated. Signed-off-by: Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Cleanup duplicate control queue codeBruce Allan1-142/+76
1. Assigning the register offset and mask values contains duplicate code that can easily be replaced with a macro. 2. Separate functions for freeing send queue and receive queue rings are not needed; replace with a single function that uses a pointer to the struct ice_ctl_q_ring structure as a parameter instead of a pointer to the struct ice_ctl_q_info structure. 3. Initializing register settings for both send queue and receive queue contains duplicate code that can easily be replaced with a helper function. 4. Separate functions for freeing send queue and receive queue buffers are not needed; duplicate code can easily be replaced with a macro. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20ice: Do autoneg based on VSI stateAkeem G Abodunrin1-5/+5
If VSI state is up, we should do autoneg with link up, otherwise with link down. Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-11-20net-next/hinic: fix a bug in rx data flowXue Chaojing1-1/+1
In rx_alloc_pkts(), there is a loop call of tasklet, which causes 100% cpu utilization, even no packets are being received. This patch fixes this bug. Signed-off-by: Xue Chaojing <xuechaojing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net-next/hinic:fix a bug in set mac addressXue Chaojing1-3/+4
In add_mac_addr(), if the MAC address is a muliticast address, it will not be set, which causes the network card fail to receive the multicast packet. This patch fixes this bug. Signed-off-by: Xue Chaojing <xuechaojing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net-next/hinic:add rx checksum offload for HiNICXue Chaojing7-1/+78
In order to improve performance, this patch adds rx checksum offload for the HiNIC driver. Performance test(Iperf) shows more than 80% improvement in TCP streams. Signed-off-by: Xue Chaojing <xuechaojing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net-next/hinic:replace multiply and division operatorsXue Chaojing2-20/+38
To improve performance, this patch uses bit operations to replace multiply and division operators. Signed-off-by: Xue Chaojing <xuechaojing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20mlxsw: core: Extend cooling device with cooling levelsVadim Pasternak1-1/+55
Extend cooling device with cooling levels vector to allow more flexibility of PWM setting. Thermal zone algorithm operates with the numerical states for PWM setting. Each state is the index, defined in range from 0 to 10 and it's mapped to the relevant duty cycle value, which is written to PWM controller. With the current definition fan speed is set to 0% for state 0, 10% for state 1, and so on up to 100% for the maximum state 10. Some systems have limitation for the PWM speed minimum. For such systems PWM setting speed to 0% will just disable the ability to increase speed anymore and such device will be stall on zero speed. Cooling levels allow to configure state vector according to the particular system requirements. For example, if PWM speed is not allowed to be below 30%, cooling levels could be configured as 30%, 30%, 30%, 30%, 40%, 50% and so on. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20cxgb4/cxgb4vf: Fix mac_hlist initialization and freeArjun Vynipadath2-12/+13
Null pointer dereference seen when cxgb4vf driver is unloaded without bringing up any interfaces, moving mac_hlist initialization to driver probe and free the mac_hlist in remove to fix the issue. Fixes: 24357e06ba51 ("cxgb4vf: fix memleak in mac_hlist initialization") Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20tcp: drop dst in tcp_add_backlog()Eric Dumazet1-0/+2
Under stress, softirq rx handler often hits a socket owned by the user, and has to queue the packet into socket backlog. When this happens, skb dst refcount is taken before we escape rcu protected region. This is done from __sk_add_backlog() calling skb_dst_force(). Consumer will have to perform the opposite costly operation. AFAIK nothing in tcp stack requests the dst after skb was stored in the backlog. If this was the case, we would have had failures already since skb_dst_force() can end up clearing skb dst anyway. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20ipv4: Don't try to print ASCII of link level header in martian dumps.David S. Miller1-1/+1
This has no value whatsoever. Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-20net_sched: sch_fq: avoid calling ktime_get_ns() if not neededEric Dumazet1-1/+6
There are two cases were we can avoid calling ktime_get_ns() : 1) Queue is empty. 2) Internal queue is not empty. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19Merge branch 'gred-add-offload-support'David S. Miller13-116/+1042
Jakub Kicinski says: ==================== gred: add offload support This series adds support for GRED offload in the nfp driver. So far we have only supported the RED Qdisc offload, but we need a way to differentiate traffic types e.g. based on DSCP marking. It may seem like PRIO+RED is a good match for this job, however, (a) we don't need strict priority behaviour of PRIO, and (b) PRIO uses the legacy way of mapping ToS fields to bands, which is quite awkward and limitting. The less commonly used GRED Qdisc is a better much for the scenario, it allows multiple sets of RED parameters and queue lengths to be maintained with a single FIFO queue. This is exactly how nfp offload behaves. We use a trivial u32 classifier to assign packets to virtual queues. There is also the minor advantage that GRED can't have its child changed, therefore limitting ways in which the configuration of SW path can diverge from HW offload. Last patch of the series adds support for (G)RED in non-ECN mode, where packets are dropped instead of marked. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: add support for more threshold actionsJakub Kicinski4-6/+109
Original FW only allowed us to perform ECN marking. Newer releases also support plain old drop. Add the ability to configure drop policy. This is particularly useful in combination with GRED, because different bands can have different ECN marking setting. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: add cls_u32 offload for simple band classificationJakub Kicinski6-1/+324
Use offload of very simple u32 filters to direct packets to GRED bands based on the DSCP marking. No u32 hashing is supported, just plain simple filters matching on ToS or Priority with appropriate mask device can support. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: add functions to update DSCP -> virtual queue mapJakub Kicinski5-1/+28
Learn how to set the DSCP map. FW uses a packed array which geometry depends on the number of supported priorities and virtual queues. Write code to assemble this map and to communicate the setting to the FW via mailbox. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: calculate PRIO map len and check mailbox sizeJakub Kicinski3-3/+50
In preparation for PRIO offload calculate how long the prio map for FW will be and make sure the configuration can be performed via the vNIC mailbox. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19net: sched: cls_u32: add res to offload informationJakub Kicinski2-0/+3
In case of egress offloads the class/flowid assigned by the filter may be very important for offloaded Qdisc selection. Provide this info to drivers. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: add GRED offloadJakub Kicinski3-10/+158
Add support for GRED offload. It behaves much like RED, but can apply different parameters to different bands. GRED operates pretty much exactly like our HW/FW with a single FIFO and different RED state instances. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: wrap RED parameters in bandsJakub Kicinski2-40/+74
Wrap RED parameters and stats into a structure, and a 1-element array. Upcoming GRED offload will add the support for more bands. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19net: sched: gred: support reporting stats from offloadsJakub Kicinski2-0/+55
Allow drivers which offload GRED to report back statistics. Since A lot of GRED stats is fairly ad hoc in nature pass to drivers the standard struct gnet_stats_basic/gnet_stats_queue pairs, and untangle the values in the core. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19net: sched: gred: add basic Qdisc offloadJakub Kicinski3-0/+84
Add basic offload for the GRED Qdisc. Inform the drivers any time Qdisc or virtual queue configuration changes. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: add up bands for sto/non-sto statsJakub Kicinski1-12/+24
Add up stats for all bands for the extra ethtool statistics. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: switch to extended stats for reading packet/byte countsJakub Kicinski2-3/+46
In PRIO-enabled FW read the statistics from per-band symbol, rather than from the standard per-PCIe-queue counters. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: size threshold table to account for bandsJakub Kicinski1-2/+2
Make sure the threshold table is large enough to hold information for all bands. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: pass band parameter to functionsJakub Kicinski3-43/+49
In preparation for per-band RED offload pass band parameter to functions. For now it will always be 0. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19nfp: abm: map per-band symbolsJakub Kicinski2-13/+54
In preparation for multi-band RED offload if FW is capable map the extended symbols which will allow us to set per-band parameters and read stats. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: John Hurley <john.hurley@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19net: hns3: add common validation in hclge_dcbYunsheng Lin3-35/+53
Before setting tm related configuration to hardware, driver needs to check the configuration provided by user is valid. Currently hclge_ieee_setets and hclge_setup_tc both implement their own checking, which has a lot in common. This patch addes hclge_dcb_common_validate to do the common checking. The checking in hclge_tm_prio_tc_info_update and hclge_tm_schd_info_update is unnecessary now, so change the return type to void, which removes the need to do error handling when one of the checking fails. Also, ets->prio_tc is indexed by user prio and ets->tc_tsa is indexed by tc num, so this patch changes them to use different index. Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19Merge branch 'selftests-Add-tests-for-VXLAN-at-an-802-1d-bridge'David S. Miller6-8/+1700
Ido Schimmel says: ==================== selftests: Add tests for VXLAN at an 802.1d bridge Petr says: This patchset adds several tests for VXLAN attached to an 802.1d bridge and fixes a related bug. First patch #1 fixes a bug in propagating SKB already-forwarded marks over veth to bridges, where they are irrelevant. This bug causes the vxlan_bridge_1d test suite from this patchset to fail as the packets aren't forwarded by br2. In patches #2 and #3, lib.sh is extended to support network namespaces. The use of namespaces is necessitated by VXLAN, which allows only one VXLAN device with a given VNI per namespace. Thus to host full topology on a single box for selftests, the "remote" endpoints need to be in namespaces. In patches #4-#6, lib.sh is extended in other ways to facilitate the following patches. In patches #7-#15, first the skeleton, and later the generic tests themselves are added. Patch #16 then adds another test that serves as a wrapper around the previous one, and runs it with a non-default port number. Patches #17 and #18 add mlxsw-specific tests. About those, Ido writes: The first test creates various configurations with regards to the VxLAN and bridge devices and makes sure the driver correctly forbids unsupported configuration and permits supported ones. It also verifies that the driver correctly sets the offload indication on FDB entries and the local route used for VxLAN decapsulation. The second test verifies that the driver correctly configures the singly linked list used to flood BUM traffic and that traffic is flooded as expected. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19selftests: mlxsw: Add a test for VxLAN floodingIdo Schimmel1-0/+309
The device stores flood records in a singly linked list where each record stores up to three IPv4 addresses of remote VTEPs. The test verifies that packets are correctly flooded in various cases such as deletion of a record in the middle of the list. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19selftests: mlxsw: Add a test for VxLAN configurationIdo Schimmel1-0/+664
Test various aspects of VxLAN offloading which are specific to mlxsw, such as sanitization of invalid configurations and offload indication. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>