aboutsummaryrefslogtreecommitdiffstats
path: root/virt (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2017-10-20tcp: socket option to set TCP fast open keyYuchung Cheng7-19/+82
New socket option TCP_FASTOPEN_KEY to allow different keys per listener. The listener by default uses the global key until the socket option is set. The key is a 16 bytes long binary data. This option has no effect on regular non-listener TCP sockets. Signed-off-by: Yuchung Cheng <ycheng@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20mlxsw: spectrum_router: Add extack message for RIF and VRF overflowDavid Ahern1-45/+69
Add extack argument down to mlxsw_sp_rif_create and mlxsw_sp_vr_create to set an error message on RIF or VR overflow. Now on overflow of either resource the user gets an informative message as opposed to failing with EBUSY. 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-10-20mlxsw: spectrum: router: Add support for address validator notifierDavid Ahern3-1/+70
Add support for inetaddr_validator and inet6addr_validator. The notifiers provide a means for validating ipv4 and ipv6 addresses before the addresses are installed and on failure the error is propagated back to the 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-10-20net: Add extack to validator_info structs used for address notifierDavid Ahern5-15/+27
Add extack to in_validator_info and in6_validator_info. Update the one user of each, ipvlan, to return an error message for failures. Only manual configuration of an address is plumbed in the IPv6 code path. 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-10-20net: ipv6: Make inet6addr_validator a blocking notifierDavid Ahern3-15/+19
inet6addr_validator chain was added by commit 3ad7d2468f79f ("Ipvlan should return an error when an address is already in use") to allow address validation before changes are committed and to be able to fail the address change with an error back to the user. The address validation is not done for addresses received from router advertisements. Handling RAs in softirq context is the only reason for the notifier chain to be atomic versus blocking. Since the only current user, ipvlan, of the validator chain ignores softirq context, the notifier can be made blocking and simply not invoked for softirq path. The blocking option is needed by spectrum for example to validate resources for an adding an address to an interface. 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-10-20ipv6: addrconf: cleanup locking in ipv6_add_addrDavid Ahern1-44/+60
ipv6_add_addr is called in process context with rtnl lock held (e.g., manual config of an address) or during softirq processing (e.g., autoconf and address from a router advertisement). Currently, ipv6_add_addr calls rcu_read_lock_bh shortly after entry and does not call unlock until exit, minus the call around the address validator notifier. Similarly, addrconf_hash_lock is taken after the validator notifier and held until exit. This forces the allocation of inet6_ifaddr to always be atomic. Refactor ipv6_add_addr as follows: 1. add an input boolean to discriminate the call path (process context or softirq). This new flag controls whether the alloc can be done with GFP_KERNEL or GFP_ATOMIC. 2. Move the rcu_read_lock_bh and unlock calls only around functions that do rcu updates. 3. Remove the in6_dev_hold and put added by 3ad7d2468f79f ("Ipvlan should return an error when an address is already in use."). This was done presumably because rcu_read_unlock_bh needs to be called before calling the validator. Since rcu_read_lock is not needed before the validator runs revert the hold and put added by 3ad7d2468f79f and only do the hold when setting ifp->idev. 4. move duplicate address check and insertion of new address in the global address hash into a helper. The helper is called after an ifa is allocated and filled in. This allows the ifa for manually configured addresses to be done with GFP_KERNEL and reduces the overall amount of time with rcu_read_lock held and hash table spinlock held. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: don't dump control cmd twiceJulian Wiedmann1-1/+0
A few lines down, qeth_prepare_control_data() makes further changes to the control cmd buffer, and then also writes a trace entry for it. So the first entry just pollutes the trace file with intermediate data, drop it. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: support GRO flush timerJulian Wiedmann1-1/+1
Switch to napi_complete_done(), and thus enable delayed GRO flushing. The timeout is configured via /sys/class/net/<if>/gro_flush_timeout. Default timeout is 0, so no change in behaviour. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: try harder to get packets from RX bufferJulian Wiedmann1-3/+1
Current code bails out when two subsequent buffer elements hold insufficient data to contain a qeth_hdr packet descriptor. This seems reasonable, but it would be legal for quirky hardware to leave a few elements empty and then present packets in a subsequent element. These packets would currently be dropped. So make sure to check all buffer elements, until we hit the LAST_ENTRY indication. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: consolidate skb allocationJulian Wiedmann1-40/+31
Move the allocation of SG skbs into the main path. This allows for a little code sharing, and handling ENOMEM from within one place. As side effect, L2 SG skbs now get the proper amount of additional headroom (read: zero) instead of the hard-coded ETH_HLEN. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: clean up page frag creationJulian Wiedmann1-20/+11
Replace the open-coded skb_add_rx_frag(), and use a fall-through to remove some duplicated code. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: no VLAN support on OSMJulian Wiedmann1-11/+6
Instead of silently discarding VLAN registration requests on OSM, just indicate that this card type doesn't support VLAN. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: don't verify device when setting MAC addressJulian Wiedmann1-23/+0
There's no reason why l2_set_mac_address() should ever be called for a netdevice that's not owned by qeth. It's certainly not required for VLAN devices, which have their own netdev_ops. Also: 1) we don't do such validation for any of the other netdev_ops routines. 2) the code in question clearly has never been actually exercised; it's broken. After determining that the device is not owned by qeth, it would still use dev->ml_priv to write a qeth trace entry. Remove the check, and its helper that walked the global card list. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: clean up initial MTU determinationJulian Wiedmann1-10/+4
1. Drop the support for Token Ring, 2. use the ETH_DATA_LEN macro for the default L2 MTU, 3. handle OSM via the default case (as OSM is L2-only), and 4. document why the L3 MTU is reduced. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: fix early exit from error pathJulian Wiedmann1-2/+4
When the allocation of the addr buffer fails, we need to free our refcount on the inetdevice before returning. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: use kstrtobool() in qeth_bridgeport_hostnotification_store()Andy Shevchenko1-8/+5
The sysfs enabled value is a boolean, so kstrtobool() is a better fit for parsing the input string since it does the range checking for us. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: remove duplicated device matchingJulian Wiedmann4-50/+9
With commit "s390/ccwgroup: tie a ccwgroup driver to its ccw driver", the ccwgroup core now ensures that a qeth group device only consists of ccw devices which are supported by qeth. Therefore remove qeth's internal device matching, and use .driver_info to determine the card type. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/drivers: use setup_timerAllen Pais1-6/+2
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20s390/qeth: rely on kernel for feature recoveryJulian Wiedmann2-23/+19
When recovering a device, qeth needs to re-run the IPA commands that enable all previously active HW features. Instead of duplicating qeth_set_features(), let netdev_update_features() recover the missing HW features from dev->wanted_features. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20net/sched: Set the net-device for egress device instanceOr Gerlitz1-0/+1
Currently the netdevice field is not set and the egdev instance is not functional, fix that. Fixes: 3f55bdda8df ('net: sched: introduce per-egress action device callbacks') Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20cxgb4: add tc flower support for L3/L4 rewriteKumar Sanghvi3-37/+244
Adds support to rewrite L3/L4 fields via TC-PEDIT action. Supported fields for rewrite are: IPv4 src/dst address, IPv6 src/dst address, TCP/UDP sport/dport. Also, process match fields first and then process the action items. Refactor pedit action validation to separate function to avoid excessive code indentation. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20cxgb4: introduce fw_filter2_wr to prepare for L3/L4 rewrite supportKumar Sanghvi4-3/+111
Update driver to use new fw_filter2_wr in order to support rewrite of L3/L4 header fields via filters. Query FW_PARAMS_PARAM_DEV_FILTER2_WR to check whether FW supports this new wr. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20cxgb4: add tc flower support for ETH-SMAC rewriteKumar Sanghvi2-0/+13
Adds support for ETH-SMAC rewrite via TC-PEDIT action. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20cxgb4: introduce SMT ops to prepare for SMAC rewrite supportKumar Sanghvi8-19/+519
Introduce SMT operations for allocating/removing entries from SMAC table. Make TCAM filters use the SMT ops whenever SMAC rewrite is required. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20cxgb4: add tc flower support for ETH-DMAC rewriteKumar Sanghvi2-1/+126
Add support for ETH-DMAC Rewrite via TC-PEDIT action. Also, add check to assert that vlan/eth-dmac rewrite actions are valid only in combination with action egress redirect. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20cxgb4: add tc flower support for action PASSKumar Sanghvi1-2/+6
Add support for tc flower action PASS. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20cxgb4: add tc flower match support for vlanKumar Sanghvi1-0/+35
Add support for matching on vlan tci. Construct vlan tci match param based on vlan-id and vlan-pcp values supplied by tc. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20cxgb4: add tc flower match support for TOSKumar Sanghvi1-1/+50
Add support for matching on IP TOS. Also check on ethtype value to be either IPv4 or IPv6. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20tcp: Remove use of inet6_sk and add IPv6 checks to tracepointDavid Ahern1-3/+5
386fd5da401d ("tcp: Check daddr_cache before use in tracepoint") was the second version of the tracepoint fixup patch. This patch is the delta between v2 and v3. Specifically, remove the use of inet6_sk and check sk_family as requested by Eric and add IS_ENABLED(CONFIG_IPV6) around the use of sk_v6_rcv_saddr and sk_v6_daddr as done in sock_common (noted by Cong). Signed-off-by: David Ahern <dsahern@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Tested-by: Song Liu <songliubraving@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20doc: Update VRF documentation metricDonald Sharp1-4/+9
Two things: 1) Update examples to show usage of metric 2) Discuss reasoning for using such a high metric. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Acked-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20net: sched: cls_u32: use hash_ptr() for tc_u_hashArnd Bergmann1-1/+1
After the change to the tp hash, we now get a build warning on 32-bit architectures: net/sched/cls_u32.c: In function 'tc_u_hash': net/sched/cls_u32.c:338:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] return hash_64((u64) tp->chain->block, U32_HASH_SHIFT); Using hash_ptr() instead of hash_64() lets us drop the cast and fixes the warning while still resulting in the same hash value. Fixes: 7fa9d974f3c2 ("net: sched: cls_u32: use block instead of q in tc_u_common") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20tipc: checking for NULL instead of IS_ERR()Dan Carpenter1-1/+1
The tipc_alloc_conn() function never returns NULL, it returns error pointers, so I have fixed the check. Fixes: 14c04493cb77 ("tipc: add ability to order and receive topology events in driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20net: sh_eth: implement R-Car Gen[12] fallback compatibility stringsSimon Horman1-0/+2
Implement fallback compatibility strings for R-Car Gen 1 and 2. In the case of Renesas R-Car hardware we know that there are generations of SoCs, f.e. Gen 1 and 2. But beyond that its not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 but that doesn't imply that the latter is a descendant of the former or vice versa. We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation. For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme is being adopted for drivers for Renesas SoCs. Note that R-Car Gen2 and RZ/G1 have many compatible IP blocks. The approach that has been consistently taken for other IP blocks is to name common code, compatibility strings and so on after R-Car Gen2. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20net: sh_eth: rename name structures as rcar_gen[12]_*Simon Horman1-15/+15
Rename structures describing R-Car SoCs as rcar_gen[12]_* rather than r8a77[79]x_*. This seems a little easier on the eyes. And will make things slightly cleaner in a follow-up patch that adds fallback-compatibility strings for these SoCs. Note that R-Car Gen2 and RZ/G1 have many compatible IP blocks. The approach that has been consistently taken for other IP blocks is to name common code, compatibility strings and so on after R-Car Gen2. Also rename sh_eth_set_rate_r8a777x as sh_eth_set_rate_rcar as it it is used by the R-Car generations supported by the driver. This patch should have no run-time effect and is compile-tested only. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-20dt-bindings: net: sh_eth: add R-Car Gen[12] fallback compatibility stringsSimon Horman1-2/+12
Add fallback compatibility strings for R-Car Gen 1 and 2. In the case of Renesas R-Car hardware we know that there are generations of SoCs, f.e. Gen 1 and 2. But beyond that its not clear what the relationship between IP blocks might be. For example, I believe that r8a7790 is older than r8a7791 but that doesn't imply that the latter is a descendant of the former or vice versa. We can, however, by examining the documentation and behaviour of the hardware at run-time observe that the current driver implementation appears to be compatible with the IP blocks on SoCs within a given generation. For the above reasons and convenience when enabling new SoCs a per-generation fallback compatibility string scheme is being adopted for drivers for Renesas SoCs. Note that R-Car Gen2 and RZ/G1 have many compatible IP blocks. The approach that has been consistently taken for other IP blocks is to name common code, compatibility strings and so on after R-Car Gen2. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19dql: make dql_init return voidStephen Hemminger2-3/+2
dql_init always returned 0, and the only place that uses it in network core code didn't care about the return value anyway. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Acked-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19net: l2tp: mark expected switch fall-throughGustavo A. R. Silva1-1/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced the "NOBREAK" comment with a "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19liquidio: mark expected switch fall-through in octeon_destroy_resourcesGustavo A. R. Silva1-1/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19liquidio: remove unnecessary NULL check before kfree in delete_glistsGustavo A. R. Silva1-2/+1
NULL check before freeing functions like kfree is not needed. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19ibmvnic: Let users change net device featuresThomas Falcon1-0/+2
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19ibmvnic: Enable TSO supportThomas Falcon2-8/+53
This patch enables TSO support. It includes additional buffers reserved exclusively for large packets. Throughput is greatly increased with TSO enabled, from about 1 Gb/s to 9 Gb/s on our test systems. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19ibmvnic: Enable scatter-gather supportThomas Falcon1-2/+21
This patch enables scatter gather support. Since there is no HW/FW scatter-gather support at this time, the driver needs to loop through each fragment and copy it to a contiguous, pre-mapped buffer entry. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19tun: relax check on eth_get_headlen() return valueEric Dumazet1-1/+1
syzkaller hit the WARN() in tun_get_user(), providing skb with payload in fragments only, and nothing in skb->head GRO layer is fine with this, so relax the check. Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19mqprio: fix potential null pointer dereference on optColin Ian King1-1/+2
The pointer opt has a null check however before for this check opt is dereferenced when len is initialized, hence we potentially have a null pointer deference on opt. Avoid this by checking for a null opt before dereferencing it. Detected by CoverityScan, CID#1458234 ("Dereference before null check") Fixes: 4e8b86c06269 ("mqprio: Introduce new hardware offload mode and shaper in mqprio") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19thunderbolt: Right shifting to zero bug in tbnet_handle_packet()Dan Carpenter1-1/+1
There is a problem when we do: sequence = pkg->hdr.length_sn & TBIP_HDR_SN_MASK; sequence >>= TBIP_HDR_SN_SHIFT; TBIP_HDR_SN_SHIFT is 27, and right shifting a u8 27 bits is always going to result in zero. The fix is to declare these variables as u32. Fixes: e69b6c02b4c3 ("net: Add support for networking over Thunderbolt cable") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Yehezkel Bernat <yehezkel.bernat@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19thunderbolt: Fix a couple right shifting to zero bugsDan Carpenter1-2/+2
The problematic code looks like this: res_seq = res_hdr->xd_hdr.length_sn & TB_XDOMAIN_SN_MASK; res_seq >>= TB_XDOMAIN_SN_SHIFT; TB_XDOMAIN_SN_SHIFT is 27, and right shifting a u8 27 bits is always going to result in zero. The fix is to declare these variables as u32. Fixes: d1ff70241a27 ("thunderbolt: Add support for XDomain discovery protocol") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19net: ena: increase ena driver version to 1.3.0Netanel Belgazal1-2/+2
Signed-off-by: Netanel Belgazal <netanel@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19net: ena: add new admin define for future support of IPv6 RSSNetanel Belgazal1-0/+6
Signed-off-by: Netanel Belgazal <netanel@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19net: ena: add statistics for missed tx packetsNetanel Belgazal3-13/+19
Add a new statistic to ethtool stats that show the number of packets without transmit acknowledgement from ENA device. Signed-off-by: Netanel Belgazal <netanel@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-19net: ena: add power management ops to the ENA driverNetanel Belgazal3-27/+95
Signed-off-by: Netanel Belgazal <netanel@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>