aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-06-19net: ethernet: nb8800: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes1-22/+2
There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Acked-by: Mans Rullgard <mans@mansr.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-19net: ethernet: nb8800: use phydev from struct net_devicePhilippe Reynes2-29/+29
The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Acked-by: Mans Rullgard <mans@mansr.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17net: ethernet: et131x: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes1-14/+2
There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17net: ethernet: et131x: use phydev from struct net_devicePhilippe Reynes1-30/+18
The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17net:liquidio: remove unused including <linux/version.h>Wei Yongjun1-1/+0
Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17gtp: remove unused including <linux/version.h>Wei Yongjun1-1/+0
Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17Merge tag 'linux-can-next-for-4.8-20160617' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-nextDavid S. Miller10-121/+1911
Marc Kleine-Budde says: ==================== pull-request: can-next 2016-06-17 this is a pull request of 14 patches for net-next/master. Geert Uytterhoeven contributes a patch that adds a file patterns for CAN device tree bindings to MAINTAINERS. A patch by Alexander Aring fixes warnings when building without proc support. A patch by me improves the sample point calculation. Marek Vasut's patch converts the slcan driver to use CAN_MTU. A patch by William Breathitt Gray converts the tscan1 driver to use module_isa_driver. Two patches by Maximilian Schneider for the gs_usb driver fix coding style and add support for set_phys_id callback. 5 patches by Oliver Hartkopp add support for CANFD to the bcm. And finally two patches by Ramesh Shanmugasundaram, which add support for the rcar_canfd driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17net: ethernet: ti: cpsw: remove rx_descs propertyIvan Khoronzhuk4-11/+10
There is no reason in rx_descs property because davinici_cpdma driver splits pool of descriptors equally between tx and rx channels. That is, if number of descriptors 256, 128 of them are for rx channels. While receiving, the descriptor is freed to the pool and then allocated with new skb. And if in DT the "rx_descs" is set to 64, then 128 - 64 = 64 descriptors are always in the pool and cannot be used, for tx, for instance. It's not correct resource usage, better to set it to half of pool, then the rx pool can be used in full. It will not have any impact on performance, as anyway, the "redundant" descriptors were unused. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17net: vrf: Implement get_saddr for IPv6David Ahern1-0/+41
IPv6 source address selection needs to consider the real egress route. Similar to IPv4 implement a get_saddr6 method which is called if source address has not been set. The get_saddr6 method does a full lookup which means pulling a route from the VRF FIB table and properly considering linklocal/multicast destination addresses. Lookup failures (eg., unreachable) then cause the source address selection to fail which gets propagated back to the caller. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17net: lantiq_etop: remove unused variableSudip Mukherjee1-1/+0
The variable i was declared but was never used and we were getting a build warning for that. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17vxlan: Add new UDP encapsulation offload type for VXLAN-GPEAlexander Duyck1-0/+6
The fact is VXLAN with Generic Protocol Extensions cannot be supported by the same hardware parsers that support VXLAN. The protocol extensions allow for things like a Next Protocol field which in turn allows for things other than Ethernet to be passed over the tunnel. Most existing parsers will not know how to interpret this. To resolve this I am giving VXLAN-GPE its own UDP encapsulation offload type. This way hardware that does support GPE can simply add this type to the switch statement for VXLAN, and if they don't support it then this will fix any issues where headers might be interpreted incorrectly. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17qlcnic: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_portAlexander Duyck4-32/+14
This change replaces the network device operations for adding or removing a VXLAN port with operations that are more generically defined to be used for any UDP offload port but provide a type. As such by just adding a line to verify that the offload type is VXLAN we can maintain the same functionality. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17qede: Move all UDP port notifiers to single functionAlexander Duyck2-85/+50
This patch goes through and combines the notifiers for VXLAN and GENEVE into a single function for each action. So there is now one combined function for getting ports, one for adding the ports, and one for deleting the ports. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17nfp: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_portAlexander Duyck1-8/+14
This change replaces the network device operations for adding or removing a VXLAN port with operations that are more generically defined to be used for any UDP offload port but provide a type. As such by just adding a line to verify that the offload type is VXLAN we can maintain the same functionality. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17mlx5_en: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_portAlexander Duyck1-7/+13
This change replaces the network device operations for adding or removing a VXLAN port with operations that are more generically defined to be used for any UDP offload port but provide a type. As such by just adding a line to verify that the offload type is VXLAN we can maintain the same functionality. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17mlx4_en: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_portAlexander Duyck3-30/+20
This change replaces the network device operations for adding or removing a VXLAN port with operations that are more generically defined to be used for any UDP offload port but provide a type. As such by just adding a line to verify that the offload type is VXLAN we can maintain the same functionality. In addition I updated the socket address family check so that instead of excluding IPv6 we instead abort of type is not IPv4. This makes much more sense as we should only be supporting IPv4 outer addresses on this hardware. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17ixgbe: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_portAlexander Duyck2-42/+26
This change replaces the network device operations for adding or removing a VXLAN port with operations that are more generically defined to be used for any UDP offload port but provide a type. As such by just adding a line to verify that the offload type is VXLAN we can maintain the same functionality. In addition I updated the socket address family check so that instead of excluding IPv6 we instead abort of type is not IPv4. This makes much more sense as we should only be supporting IPv4 outer addresses on this hardware. The last change is that I pulled the rtnl_lock/unlock into the conditional statement for IXGBE_FLAG2_VXLAN_REREG_NEEDED. The motivation behind this is to avoid unneeded bouncing of the mutex which will just slow down the handling of this call anyway. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17i40e: Move all UDP port notifiers to single functionAlexander Duyck2-156/+51
This patch goes through and combines the notifiers for VXLAN and GENEVE into a single function for each action. So there is now one combined function for getting ports, one for adding the ports, and one for deleting the ports. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17fm10k: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_portAlexander Duyck2-27/+20
This change replaces the network device operations for adding or removing a VXLAN port with operations that are more generically defined to be used for any UDP offload port but provide a type. As such by just adding a line to verify that the offload type if VXLAN we can maintain the same functionality. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17benet: Replace ndo_add/del_vxlan_port with ndo_add/del_udp_enc_portAlexander Duyck2-25/+15
This change replaces the network device operations for adding or removing a VXLAN port with operations that are more generically defined to be used for any UDP offload port but provide a type. As such by just adding a line to verify that the offload type if VXLAN we can maintain the same functionality. I have also gone though and removed the BE2NET_VXLAN config option since it no longer relies on the VXLAN code anyway. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17bnxt: Move GENEVE support from hard-coded port to using port notifierAlexander Duyck2-6/+33
The port number for GENEVE is hard coded into the bnxt driver. This is the kind of thing we want to avoid going forward. For now I will integrate this back into the port notifier so that we can change the GENEVE port number if we need to in the future. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17bnxt: Update drivers to support unified UDP encapsulation offload functionsAlexander Duyck2-29/+40
This patch ends up doing several things. First it updates the driver to make use of the new unified UDP tunnel offload notifier functions. In addition I updated the code so that we can work around the bits that were checking for if VXLAN was enabled since we are now using a notifier based setup. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17bnx2x: Move all UDP port notifiers to single functionAlexander Duyck2-81/+33
This patch goes through and combines the notifiers for VXLAN and GENEVE into a single function for each action. So there is now one combined function for getting ports, one for adding the ports, and one for deleting the ports. I also went through and dropped the BNX2X VXLAN and GENEVE specific build flags. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17net: Merge VXLAN and GENEVE push notifiers into a single notifierAlexander Duyck2-2/+2
This patch merges the notifiers for VXLAN and GENEVE into a single UDP tunnel notifier. The idea is that we will want to only have to make one notifier call to receive the list of ports for VXLAN and GENEVE tunnels that need to be offloaded. In addition we add a new set of ndo functions named ndo_udp_tunnel_add and ndo_udp_tunnel_del that are meant to allow us to track the tunnel meta-data such as port and address family as tunnels are added and removed. The tunnel meta-data is now transported in a structure named udp_tunnel_info which for now carries the type, address family, and port number. In the future this could be updated so that we can include a tuple of values including things such as the destination IP address and other fields. I also ended up going with a naming scheme that consisted of using the prefix udp_tunnel on function names. I applied this to the notifier and ndo ops as well so that it hopefully points to the fact that these are primarily used in the udp_tunnel functions. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17net: Combine GENEVE and VXLAN port notifiers into single functionsAlexander Duyck2-102/+16
This patch merges the GENEVE and VXLAN code so that both functions pass through a shared code path. This way we can start the effort of using a single function on the network device drivers to handle both of these tunnel types. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17vxlan/geneve: Include udp_tunnel.h in vxlan/geneve.h and fixup includesAlexander Duyck2-18/+0
This patch makes it so that we add udp_tunnel.h to vxlan.h and geneve.h header files. This is useful as I plan to move the generic handlers for the port offloads into the udp_tunnel header file and leave the vxlan and geneve headers to be a bit more protocol specific. I also went through and cleaned out a number of redundant includes that where in the .h and .c files for these drivers. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-17can: rcar_can: Move Renesas CAN driver to rcar dirRamesh Shanmugasundaram5-12/+12
This patch clubs the Renesas controller drivers in one rcar dir. Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: rcar_canfd: Add Renesas R-Car CAN FD driverRamesh Shanmugasundaram5-0/+1713
This patch adds support for the CAN FD controller found in Renesas R-Car SoCs. The controller operates in CAN FD only mode by default. CAN FD mode supports both Classical CAN & CAN FD frame formats. The controller supports ISO 11898-1:2015 CAN FD format only. This controller supports two channels and the driver can enable either or both of the channels. Driver uses Rx FIFOs (one per channel) for reception & Common FIFOs (one per channel) for transmission. Rx filter rules are configured to the minimum (one per channel) and it accepts Standard, Extended, Data & Remote Frame combinations. Note: There are few documentation errors in R-Car Gen3 Hardware User Manual v0.5E with respect to CAN FD controller. They are listed below: 1. CAN FD interrupt numbers 29 & 30 are listed as per channel interrupts. However, they are common to both channels (i.e.) they are global and channel interrupts respectively. 2. CANFD clock is derived from PLL1. This is not documented. 3. CANFD clock is further divided by (1/2) within the CAN FD controller. This is not documented. 4. The minimum value of NTSEG1 in RSCFDnCFDCmNCFG register is 2 Tq. It is specified 4 Tq in the manual. 5. The maximum number of message RAM area the controller can use is 3584 bytes. It is specified 10752 bytes in the manual. Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: gs_usb: add ethtool set_phys_id callback to locate physical deviceMaximilian Schneider1-31/+85
This patch Implements the ethtool set_phys_id callback to ease the locating of specific physical devices. Currently only supported on candleLight interfaces. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle change sinto separate patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: gs_usb: codingstyle: introduce use of BIT() + fix indentionMaximilian Schneider1-11/+14
This patch converts "1 << n" by BIT(n) and fixes the indention. No functional change. Signed-off-by: Hubert Denkmair <hubert@denkmair.de> Signed-off-by: Maximilian Schneider <max@schneidersoft.net> [mkl: split codingstyle changes into separate patch] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: tscan1: Utilize the module_isa_driver macroWilliam Breathitt Gray1-11/+1
This driver does not do anything special in module init/exit. This patch eliminates the module init/exit boilerplate code by utilizing the module_isa_driver macro. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: slcan: Replace sizeof struct can_frame with CAN_MTUMarek Vasut1-2/+2
Use CAN_MTU macro instead of sizeof(struct can_frame) just like the other drivers do. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Oliver Hartkopp <socketcan@hartkopp.net> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-17can: dev: can-calc-bit-timing(): better sample point calculationMarc Kleine-Budde1-55/+85
This patch optimizes the calculation of the sample point. To understand what it does have a look at the original implementation. If there is a combination of timing parameters where both the bitrate and sample point error are 0 the current implementation will find it. However if the reference clock doesn't allow an optimal bitrate (this means the bitrate error is always != 0) there might be several timing parameter combinations having the same bitrate error. The original implementation will allways choose the one with the highest brp. The actual sample point error isn't taken into account. This patch changes the algorithm to minimize the sample point error, too. Now a brp/tseg combination is accepted as better if one of these condition are fulfilled: 1) the bit rate error must be smaller, or 2) the bit rate error must be equal and the sample point error must be equal or smaller If a smaller bit rate error is found the sample point error is reset. This ensures that we first optimize for small bit rate error and then for small sample point errors. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2016-06-16vmxnet3: update to version 3Shrikrishna Khare2-3/+8
With all vmxnet3 version 3 changes incorporated in the vmxnet3 driver, the driver can configure emulation to run at vmxnet3 version 3, provided the emulation advertises support for version 3. Signed-off-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16vmxnet3: introduce command to register memory regionShrikrishna Khare1-0/+17
In vmxnet3 version 3, the emulation added support for the vmxnet3 driver to communicate information about the memory regions the driver will use for rx/tx buffers. The driver can also indicate which rx/tx queue the memory region is applicable for. If this information is communicated to the emulation, the emulation will always keep these memory regions mapped, thereby avoiding the mapping/unmapping overhead for every packet. Currently, Linux vmxnet3 driver does not leverage this capability. The feasibility of using this approach for the Linux vmxnet3 driver will be investigated independently and if possible, will be part of a different patch. This patch only exposes the emulation capability to the driver (vmxnet3_defs.h is identical between the driver and the emulation). Signed-off-by: Guolin Yang <gyang@vmware.com> Signed-off-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16vmxnet3: add support for get_coalesce, set_coalesce ethtool operationsShrikrishna Khare4-1/+253
The emulation supports a variety of coalescing modes viz. disabled (no coalescing), adaptive, static (number of packets to batch before raising an interrupt), rate based (number of interrupts per second). This patch implements get_coalesce and set_coalesce methods to allow querying and configuring different coalescing modes. Signed-off-by: Keyong Sun <sunk@vmware.com> Signed-off-by: Manoj Tammali <tammalim@vmware.com> Signed-off-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16vmxnet3: add receive data ring supportShrikrishna Khare4-45/+193
vmxnet3 driver preallocates buffers for receiving packets and posts the buffers to the emulation. In order to deliver a received packet to the guest, the emulation must map buffer(s) and copy the packet into it. To avoid this memory mapping overhead, this patch introduces the receive data ring - a set of small sized buffers that are always mapped by the emulation. If a packet fits into the receive data ring buffer, the emulation delivers the packet via the receive data ring (which must be copied by the guest driver), or else the usual receive path is used. Receive Data Ring buffer length is configurable via ethtool -G ethX rx-mini Signed-off-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16vmxnet3: allow variable length transmit data ring bufferShrikrishna Khare4-19/+64
vmxnet3 driver supports transmit data ring viz. a set of fixed size buffers used by the driver to copy packet headers. Small packets that fit these buffers are copied into these buffers entirely. Currently this buffer size of fixed at 128 bytes. This patch extends transmit data ring implementation to allow variable length transmit data ring buffers. The length of the buffer is read from the emulation during initialization. Signed-off-by: Sriram Rangarajan <rangarajans@vmware.com> Signed-off-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16vmxnet3: introduce generalized command interface to configure the deviceShrikrishna Khare1-1/+21
Shared memory is used to exchange information between the vmxnet3 driver and the emulation. In order to request emulation to perform a task, the driver first populates specific fields in this shared memory and then issues corresponding command by writing to the command register(CMD). The layout of the shared memory was defined by vmxnet3 version 1 and cannot be extended for every new command without breaking backward compatibility. To address this problem, in vmxnet3 version 3, the emulation repurposed a reserved field in the shared memory to represent command information instead. For new commands, the driver first populates the command information field in the shared memory and then issues the command. The emulation interprets the data written to the command information depending on the type of the command. This patch exposes this capability to the driver. Signed-off-by: Guolin Yang <gyang@vmware.com> Signed-off-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16vmxnet3: prepare for version 3 changesShrikrishna Khare6-20/+36
vmxnet3 is currently at version 2, but some command definitions from previous vmxnet3 versions are missing. Add those definitions before moving to version 3. Also, introduce utility macros for vmxnet3 version comparison and update Copyright information and Maintained by. Signed-off-by: Shrikrishna Khare <skhare@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16s390/qeth: fix indentation in qeth_l3_arp_querySebastian Ott1-13/+12
gcc-6 warns about obviously wrong indentation: drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_arp_query': drivers/s390/net/qeth_l3_main.c:2315:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (copy_to_user(udata, qinfo.udata, 4)) ^~ drivers/s390/net/qeth_l3_main.c:2317:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' goto free_and_out; ^~~~ Although this particular case is harmless, fix the indentation to get rid of that warning and improve readability. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth: omit outbound queue 3 for unicast packets in Priority Queuing on HiperSocketsHans Wippel2-4/+17
On HiperSockets only outbound queues 0 to 2 are available for unicast packets. Current Priority Queuing implementation in the qeth driver puts outgoing packets in outbound queues 0 to 3. This puts outgoing unicast packets into outbound queue 2 instead of outbound queue 3 when using Priority Queuing on a HiperSocket. Additionally, the default outbound queue cannot be set to outbound queue 3 on HiperSockets. Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth: improve set_features error handlingHans Wippel1-11/+27
The function set_features is called to configure network device features on the hardware. If errors occur, the network device features should reflect the changed hardware state and the function should return an error in order to notify the user. In case of an error, the current implementation does not necessarily save the changed hardware state in the network device features before an error is returned. This patch improves error handling by saving features, that could be changed, to the network device features before returning an error. If the device is not running, an additional check in fix_features removes features, that require hardware changes, before they are passed to set_features. Thus, the corresponding check was removed in set_features. Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth: add network device features for VLAN devicesHans Wippel2-2/+10
Network device features indicate the capabilities of network devices (e.g., TX checksum offloading and TSO) and their configuration state. Additional network device features (vlan_features) indicate for each network device, which capabilities can be used on VLAN devices, that are configured on the respective base network device. In the current qeth implementation, network device features are only set for the base network devices and not for the VLAN devices. Thus, features like TX checksum offloading cannot be used on VLAN devices. This patch adds network device features to vlan_features, so they can be used by VLAN devices. Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth layer 2 and layer 3 common feature handlingThomas Richter4-198/+111
This patch introduces a common set of fix_features and set_features functions for layer 2 and layer 3. The RX, TX and TSO offload functionality on the OSA card is enabled using ethtool at user's request and not at device initialization as done before. For layer 3 the RX checksum offloading is disabled at device initialization time. Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth: optimize IP handling in rx_mode callbackLakhvich Dmitriy7-458/+482
In layer3 mode of the qeth driver, multicast IP addresses from struct net_device and other type of IP addresses from other sources require mapping to the OSA-card. This patch simplifies the IP address mapping logic, and changes imple- mentation of ndo_set_rx_mode callback and ip notifier events. Addresses are stored in private hashtables instead of lists now. It allows hardware registration/removal for new/deleted multicast addresses only. Signed-off-by: Lakhvich Dmitriy <ldmitriy@ru.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Evgeny Cherkashin <Eugene.Crosser@ru.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth: introduce linearization fail count to statsEugene Crosser4-8/+23
When skb data touches too many pages, skb_linearize() is called opportunistically in the hope that less pages will be required for a big linear buffer than for multiple fragments. This patch intoduces a separate counter in ethtool statistics structure representing _failed_ linearization attempts. Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Lakhvich Dmitriy <ldmitriy@ru.ibm.com> Reviewed-by: Thomas Richter <tmricht@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth: enable scatter/gather by defaultEugene Crosser2-3/+4
Set scatter/gather ON by default on OSA, for both layer 2 and layer 3 modes. We always use fragmentation over QDIO anyway, so let the upper layers of the stack take advantage of that. Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Lakhvich Dmitriy <ldmitriy@ru.ibm.com> Reviewed-by: Thomas Richter <tmricht@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth: enable scatter/gather in layer 2 modeEugene Crosser1-1/+25
The patch enables NETIF_F_SG flag for OSA in layer 2 mode. It also adds performance accounting for fragmented sends, adds a conditional skb_linearize() attempt if the skb had too many fragments for QDIO SBAL, and fills netdevice->gso_* attributes. Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Lakhvich Dmitriy <ldmitriy@ru.ibm.com> Reviewed-by: Thomas Richter <tmricht@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16qeth: fill netdevice->gso_* attributes accuratelyEugene Crosser1-1/+3
Use QETH_MAX_BUFFER_ELEMENTS(card) instead of constant 16. Also fill gso_max_segs and gso_min_segs. Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>