aboutsummaryrefslogtreecommitdiffstats
path: root/samples (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2018-02-28sfp: add high power module supportJon Nettleton1-18/+132
This patch is the result of work by both Jon Nettleton and Russell King. Jon wrote the original patch, adding support for SFP modules which require a power level greater than '1'. Russell's changes: - Fix the power levels for big-endian, and make the code flow better. - Convert to use device_property_read_u8() - Warn for power levels exceeding host level SFF-8431 says: "To avoid exceeding system power supply limits and cooling capacity, all modules at power up by default shall operate with up to 1.0 W. Hosts supporting Power Level II or III operation may enable a Power Level II or III module through the 2-wire interface. Power Level II or III modules shall assert the power level declaration bit of SFF-8472." Print a warning for modules that exceed the host power level, and leave them operating in power level 1. - Fix i2c write The first byte of any write after the bus address is always the device address. In order to write a value to device D, address I, value V, we need to generate on the bus: S DDDDDDDD A IIIIIIII A VVVVVVVV A P where S = start, R = restart, A = ack, P = stop. Splitting this as two: S DDDDDDDD A IIIIIIII A R DDDDDDDD A VVVVVVVV A P results in the device's address register being written first by I and then by V - the addressed register within the device is not written. - Avoid power mode switching if 0xa2 is not implemented Some modules indicate that they support power level II or power level III, but do not implement address 0xa2, meaning that the bit to set them to high power mode is not accessible. These modules appear to have the sff8472_compliance field set to zero, and also do not implement diagnostics. Detect this, but also ensure that the module does not require the address switching mode, which we do not implement. - Use mW for power level rather than power level number. - Fix high power mode transition We must not switch to SFP_MOD_PRESENT state until we have finished initialising, because the remaining state machines check for that state. Add SFP_MOD_HPOWER as an intermediate state. - Use definition for I2C register address rather than constant. Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-28dt-bindings: add maximum power level to SFP bindingRussell King1-0/+5
Add the new maximum power level property to the SFP binding. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-28phylink,sfp: negotiate interface format with MACRussell King3-84/+68
Negotiate the interface format with the MAC rather than requiring it to be a fixed type specified solely by the SFP module. This allows modules that can work with several different interface signalling formats to select a format compatible with the MAC - for example, a Fiber module supporing Gigabit ethernet and faster connected to a Gigabit only MAC needs to select the 1000BASE-X mode. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-28sfp: support 1G BiDi (eg, FiberStore SFP-GE-BX) modulesRussell King1-23/+38
Some BiDi modules (eg, FiberStore SFP-GE-BX) are not compliant with 1000BASE-BX as they use different wavelengths from the 1000BASE-BX standard (eg, 1310nm/1550nm rather than 1310nm/1490nm). These modules support 1000BASE-X ethernet, so detect them by a failure to find any other support, the 8B10B encoding and a bit rate that falls within the 1Gbps window. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-28team: Use extack to report enslavement failuresIdo Schimmel1-5/+11
Use extack inside team's enslavement function and also propagate it to the netdevice notifier to allow enslaved ports to report the failure reason. Example: $ teamd -t team0 -d -c '{"runner": {"name": "lacp"}}' $ ip link set dev lo master team0 Error: Loopback device can't be added as a team port. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Acked-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net/mlx4_en: RX csum, pre-define enabled protocols for IP status maskingTariq Toukan1-6/+7
Pre-define a mask for IP status of a completion, that tests the MLX4_CQE_STATUS_IPV6 only in case CONFIG_IPV6 is enabled. Use it for IP status testing upon completion, instead of separating the datapath into two flows. This takes common code structures (such as closing parenthesis) back to their original place, and makes code more readable. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net/mlx4_en: Combine checks of end-cases in RX completion functionTariq Toukan1-4/+1
Combine two end-cases in the same if statement with a single return value. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net/mlx4_en: Remove unnecessary warn print in reset configEran Ben Elisha1-4/+0
In mlx4_en_reset_config, there was a redundant warn print that was left from previous versions of this function. No warn is needed anymore. This warn can be confusing when RX-FCS is changed: Turn OFF RX-FCS: mlx4_en: eth1: Changing device configuration rx filter(0) rx vlan(1) Turn ON RX-FCS: mlx4_en: eth1: Changing device configuration rx filter(0) rx vlan(1) Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net/mlx4_en: Add physical RX/TX bytes/packets countersEran Ben Elisha5-14/+53
Add physical RX/TX packets/bytes counters into ethtool output to monitor all traffic that was received and transmitted on the port. These counters are available only for none Virtual Function. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: spectrum_span: Support mirror to ip6gretapPetr Machata2-0/+103
Similarly to mirror-to-gretap, this enables mirroring to IPv6 gretap netdevice. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: spectrum_span: Support mirror to gretapPetr Machata3-2/+175
When a user requests mirror from a mlxsw physical port (possibly based on an ACL match) to a gretap netdevice, the driver needs to resolve the request to a particular physical port that the mirrored packets will egress through, and a suite of configuration keys (importantly, IP and MAC addresses). That means calling into routing and neighbor kernel code to simulate the decisions made by the system for packets passing through a gretap netdevice. Add a new instance of mlxsw_sp_span_entry_ops to support this. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: Move a mirroring check to mlxsw_sp_span_entry_createPetr Machata2-5/+5
The check for whether a mirror port (which is a mlxsw front panel port) belongs to the same mlxsw instance as the mirrored port, is currently only done in spectrum_acl, even though it's applicable for the matchall case as well. Thus move it to mlxsw_sp_span_entry_create(). Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: Handle config changes pertinent to SPANPetr Machata4-12/+49
For some netdevices, for which mlxsw offloads mirroring, may have a complex relationship between the declared intent and low-level device configuration. Trying to accurately track which changes might influence offloading decisions is finicky and error-prone. Instead, this patch introduces a function mlxsw_sp_span_entry_respin, which re-queries the configuration anew and, if different, removes the existing offloads and installs new ones. Call this function strategically at event handlers that might influence the mirroring configuration. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: spectrum_span: Generalize SPAN supportPetr Machata4-33/+147
To support mirroring to different device types, the functions that partake in configuring the port analyzer need to be extended to admit non-trivial SPAN types. Create a structure where all details of SPAN configuration are kept, struct mlxsw_sp_span_parms. Also create struct mlxsw_sp_span_entry_ops to keep per-SPAN-type operations. Instantiate the latter once for MLXSW_REG_MPAT_SPAN_TYPE_LOCAL_ETH, and once for a suite of NOP callbacks used for invalidated SPAN entry. Put the formet as a sole member of a new array mlxsw_sp_span_entry_types, where all known SPAN types are kept. Introduce a new function, mlxsw_sp_span_entry_ops(), to look up the right ops suite given a netdevice. Change mlxsw_sp_span_mirror_add() to use both parms and ops structures. Change mlxsw_sp_span_entry_get() and mlxsw_sp_span_entry_create() to take these as arguments. Modify mlxsw_sp_span_entry_configure() and mlxsw_sp_span_entry_deconfigure() to dispatch to ops. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: spectrum: Keep mirror netdev in mlxsw_sp_span_entryPetr Machata7-34/+56
Currently the only mirror action supported by mlxsw is mirror to another mlxsw physical port. Correspondingly, span_entry, which tracks each mlxsw mirror in the system, currently holds a u8 number of the destination port. To extend this system to mirror to gretap and ip6gretap netdevices, have struct mlxsw_sp_span_entry actually hold the destination netdevice itself. This change then trickles down in obvious manner to SPAN module API and mirror-related interfaces in struct mlxsw_afa_ops. To prevent use of invalid pointer, NETDEV_UNREGISTER needs to be hooked and the corresponding SPAN entry invalidated. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: spectrum_span: Extract mlxsw_sp_span_entry_{de, }configure()Petr Machata1-14/+29
Configuring the hardware for encapsulated SPAN involves more code than the simple mirroring case. Extract the related code to a separate function to separate it from the rest of SPAN entry creation. Extract deconfigure as well for symmetry, even though disablement is the same regardless of SPAN type. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: spectrum_span: Initialize span_entry.id eagerlyPetr Machata1-9/+9
It is known statically ahead of time which SPAN entry will have which ID. Just initialize it eagerly in mlxsw_sp_span_init(), don't wait until the entry is actually created. This simplifies some code in mlxsw_sp_span_entry_create() Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: span: Remove span_entry by span_idPetr Machata7-41/+37
Instead of removing span_entry by the port number, allow removing by SPAN id. That simplifies some code right here, and for mirroring to soft netdevices, avoids problems with netdevice pointer invalidation and reuse. Rename mlxsw_sp_span_entry_find() to mlxsw_sp_span_entry_find_by_port() and keep it--follow-up patches will make use of it. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: reg: Extend mlxsw_reg_mpat_pack()Petr Machata2-3/+7
To support encapsulated SPAN, extend mlxsw_reg_mpat_pack() with a field to set the SPAN type. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: reg: Add SPAN encapsulation to MPAT registerPetr Machata1-2/+139
MPAT Register is used to query and configure the Switch Port Analyzer Table. To configure Port Analyzer to encapsulate mirrored packets, additional fields need to be specified for the MPAT register. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27ip_tunnel: Rename & publish init_tunnel_flowPetr Machata2-28/+28
Initializing struct flowi4 is useful for drivers that need to emulate routing decisions made by a tunnel interface. Publish the function (appropriately renamed) so that the drivers in question don't need to cut'n'paste it around. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: GRE: Add is_gretap_dev, is_ip6gretap_devPetr Machata3-0/+15
Determining whether a device is a GRE device is easily done by inspecting struct net_device.type. However, for the tap variants, the type is just ARPHRD_ETHER. Therefore introduce two predicate functions that use netdev_ops to tell the tap devices. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: spectrum_ipip: Support decoding IPv6 tunnel addressesPetr Machata2-2/+29
To support mirroring to ip6gretap, the SPAN module needs to be able to decode IPv6 addresses specified at that tunnel. Extend mlxsw_sp_ipip_netdev_saddr() and mlxsw_sp_ipip_netdev_daddr() to support IPv6 addresses. To that end, add and publish a support function mlxsw_sp_ipip_netdev_parms6(). Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27mlxsw: spectrum_ipip: Extract mlxsw_sp_l3addr_is_zeroPetr Machata2-7/+15
Extract the logic for determining whether a given IPv4/IPv6 address is all-zeroes from mlxsw_sp_ipip_tunnel_complete to a separate function. Make that function public within the module. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27ibmvnic: Do not attempt to login if RX or TX queues are not allocatedThomas Falcon1-6/+15
If a device reset fails for some reason, TX and RX queue resources could be released. If a user attempts to open the device in this scenario, it may result in a kernel panic as the driver tries to access this memory. To fix this, include a check before device login that TX/RX queues are still there before enabling the device. In addition, return a value that can be checked in case of any errors to avoid waiting for a completion that will never come. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27ibmvnic: Report queue stops and restarts as debug outputThomas Falcon1-3/+3
It's not necessary to report each time a queue is stopped and restarted as an informational message. Change that to be a debug message so that it can be observed if needed but not printed by default. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27ibmvnic: Harden TX/RX pool cleaningThomas Falcon1-8/+12
If the driver releases resources after a failed reset or some other error, the driver might attempt to clean up and free memory that isn't there anymore. Include some additional checks that RX/TX queues along with their associated structures are still there before cleaning. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27ibmvnic: Allocate statistics buffers during probeThomas Falcon1-10/+11
Currently, buffers holding individual queue statistics are allocated when the device is opened. If an ibmvnic interface is hotplugged or initialized but never opened, an attempt to get statistics with ethtool will result in a kernel panic. Since the driver allocates a constant number, the maximum supported queues, of buffers, these can be allocated during device probe and freed when the device is hot-unplugged or the module is removed. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27ibmvnic: Fix TX descriptor tracking againThomas Falcon1-1/+2
Sorry, the previous change introduced a race condition between transmit completion processing and tracking TX descriptors. If a completion is received before the number of descriptors is logged, the number of descriptors will be add but not removed. After enough times, this could halt the transmit queue forever. Log the number of descriptors used by a transmit before sending. I stress tested the fix on two different systems running over the weekend without any issues. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: stmmac: make dwmac4_release_tx_desc() clear all descriptor fieldsNiklas Cassel1-0/+2
Make dwmac4_release_tx_desc() clear all descriptor fields, not just TDES2 and TDES3. I'm suspecting that TDES0 and TDES1 wasn't cleared because the DMA engine uses them to store the tx hardware timestamp (if PTP is enabled). However, stmmac_tx_clean() calls stmmac_get_tx_hwtstamp(), which reads and saves the timestamp, before it calls release_tx_desc(), so this is not an issue. stmmac_xmit() and stmmac_tso_xmit() both always overwrite TDES0, however, stmmac_tso_xmit() sometimes sets TDES1, and since neither stmmac_xmit() nor stmmac_tso_xmit() explicitly clears TDES1, both functions might reuse a DMA descriptor with old TDES1 data. I haven't observed any misbehavior even though TDES1 sometimes point to an old skb, however, explicitly clearing both TDES0 and TDES1 in dwmac4_release_tx_desc() minimizes the chances of undefined behavior. Signed-off-by: Niklas Cassel <niklas.cassel@axis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: stmmac: ensure that the device has released ownership before reading dataNiklas Cassel1-0/+5
According to Documentation/memory-barriers.txt, we need to use a dma_rmb() after reading the status/own bit, to ensure that all descriptor fields are read after reading the own bit. This way, we ensure that the DMA engine is done with the DMA descriptor before we read the other descriptor fields, e.g. reading the tx hardware timestamp (if PTP is enabled). Signed-off-by: Niklas Cassel <niklas.cassel@axis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: stmmac: use correct barrier between coherent memory and MMIONiklas Cassel1-2/+2
The last memory barrier in stmmac_xmit()/stmmac_tso_xmit() is placed between a coherent memory write and a MMIO write: The own bit is written in First Desc (TSO: MSS desc or First Desc). <barrier> The DMA engine is started by a write to the tx desc tail pointer/ enable dma transmission register, i.e. a MMIO write. This barrier cannot be a simple dma_wmb(), since a dma_wmb() is only used to guarantee the ordering, with respect to other writes, to cache coherent DMA memory. To guarantee that the cache coherent memory writes have completed before we attempt to write to the cache incoherent MMIO region, we need to use the more heavyweight barrier wmb(). Signed-off-by: Niklas Cassel <niklas.cassel@axis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: stmmac: ensure that the MSS desc is the last desc to set the own bitNiklas Cassel1-1/+8
A dma_wmb() is used to guarantee the ordering, with respect to other writes, to cache coherent DMA memory. There is a dma_wmb() in prepare_tx_desc()/prepare_tso_tx_desc() which ensures that TDES0/1/2 is written before TDES3 (which contains the own bit), for First Desc. However, in the rare case that MSS changes, there will be a MSS context descriptor in front of the regular DMA descriptors: <MSS desc> <- DMA Next Descriptor <First Desc> <desc n> <Last Desc> Thus, for this special case, we need a dma_wmb() after prepare_tso_tx_desc()/before writing the own bit to the MSS desc, so that we flush the write to TDES3 for First Desc, in order to ensure that the MSS descriptor is the last descriptor to set the own bit. Signed-off-by: Niklas Cassel <niklas.cassel@axis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27selftests/net: reap zerocopy completions passed up as ancillary data.Sowmini Varadhan1-8/+57
PF_RDS sockets pass up cookies for zerocopy completion as ancillary data. Update msg_zerocopy to reap this information. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Willem de Bruijn <willemb@google.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27rds: deliver zerocopy completion notification with dataSowmini Varadhan6-27/+60
This commit is an optimization over commit 01883eda72bd ("rds: support for zcopy completion notification") for PF_RDS sockets. RDS applications are predominantly request-response transactions, so it is more efficient to reduce the number of system calls and have zerocopy completion notification delivered as ancillary data on the POLLIN channel. Cookies are passed up as ancillary data (at level SOL_RDS) in a struct rds_zcopy_cookies when the returned value of recvmsg() is greater than, or equal to, 0. A max of RDS_MAX_ZCOOKIES may be passed with each message. This commit removes support for zerocopy completion notification on MSG_ERRQUEUE for PF_RDS sockets. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Willem de Bruijn <willemb@google.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27selftests/net: revert the zerocopy Rx path for PF_RDSSowmini Varadhan1-67/+0
In preparation for optimized reception of zerocopy completion, revert the Rx side changes introduced by Commit dfb8434b0a94 ("selftests/net: add zerocopy support for PF_RDS test case") Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Willem de Bruijn <willemb@google.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27r8169: improve interrupt handlingHeiner Kallweit1-27/+21
This patch improves few aspects of interrupt handling: - update to current interrupt allocation API (use pci_alloc_irq_vectors() instead of deprecated pci_enable_msi()) - this implicitly will allocate a MSI-X interrupt if available - get rid of flag RTL_FEATURE_MSI - remove some dead code, intentionally disabling (unreliable) MSI being partially available on old PCI chips. The patch works fine on a RTL8168evl (chip version 34) and on a RTL8169SB (chip version 04). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27selftests: Add fib-onlink-tests.sh to TEST_PROGSDavid Ahern1-1/+1
Fixes: 153e1b84f477 ("selftests: Add FIB onlink tests") Reported-by: Ido Schimmel <idosch@idosch.org> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27dpaa_eth: Add allmulti optionRadu Bulie9-5/+97
This patch adds allmulticast option for memac, dtsec and 10GEC controllers. Signed-off-by: Radu Bulie <radu-andrei.bulie@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27dpaa_eth: refactor frag count checkingMadalin Bucur1-8/+12
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27dpaa_eth: make sure all Rx errors are countedMadalin Bucur1-8/+2
Simplify the code and avoid some Rx errors not being accounted. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27dpaa_eth: fix SG mappingMadalin Bucur1-10/+13
An issue in the code mapping the skb fragments into scatter-gather frames was evidentiated by netperf TCP_SENDFILE tests. The size was set wrong for all fragments but the first, affecting the transmission of any skb with more than one fragment. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: Convert smack_net_opsKirill Tkhai1-0/+1
These pernet_operations only register and unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: Convert selinux_net_opsKirill Tkhai1-0/+1
These pernet_operations only register and unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: Convert defrag6_net_opsKirill Tkhai1-0/+1
These pernet_operations only unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: Convert ila_net_opsKirill Tkhai1-0/+1
These pernet_operations register and unregister nf hooks. Also they populate and depopulate ila_net_id-pointed hash table. The table is changed by hooks during skb processing and via netlink request. It looks impossible for another net pernet_operations to force the table reading or writing, so, they are able to be marked as async. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: Convert defrag4_net_opsKirill Tkhai1-0/+1
These pernet_operations only unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: Convert clusterip_net_opsKirill Tkhai1-0/+1
These pernet_operations register and unregister nf hooks, and populate and destroy /proc entry. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: Convert brnf_net_opsKirill Tkhai1-0/+1
These pernet_operations only unregister nf hooks. So, they are able to be marked as async. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27net: Convert ipvlan_net_opsKirill Tkhai1-0/+1
These pernet_operations unregister ipvlan net hooks. nf_unregister_net_hooks() removes hooks one-by-one, and then frees the memory via rcu. This looks similar to that happens, when a new hooks is added: allocation of bigger memory region, copy of old content, and rcu freeing the old memory. So, all of net code should be well with this behavior. Also at the time of hook unregistering, there are no packets, and foreign net pernet_operations are not interested in others hooks. So, we mark them as async. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>