summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* net: dsa: mv88e6xxx: move ATU ageing time setterVivien Didelot2017-03-124-29/+49
| | | | | | | | | Move the ATU ageing time setter code in a new global1_atu.c file, which will be extended in future patches to contains all consequent Global (1) ATU support code. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: dsa: mv88e6xxx: add port mask helperVivien Didelot2017-03-122-1/+6
| | | | | | | | | Add a mv88e6xxx_port_mask() helper to get the bitmask of ports in a switch chip, that will be used in several features. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Add support for TC flower offload statisticsArkadi Sharshevsky2017-03-124-0/+82
| | | | | | | | | | | Add support for TC flower offload statistics including number of packets, bytes and last use timestamp. Currently the statistics are gathered on a per-rule basis. Signed-off-by: Arkadi Sharshvesky <arkadis@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>
* mlxsw: spectrum: Add support for counters on TCAM entriesArkadi Sharshevsky2017-03-122-0/+42
| | | | | | | | | | Add support for packets and byte statistics on TCAM entries. The counters are allocated from the generic flow counters pool. Signed-off-by: Arkadi Sharshevsky <arkadis@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>
* mlxsw: spectrum: Add support for Policing and Counting action blockArkadi Sharshevsky2017-03-122-0/+53
| | | | | | | | | | Add support for Policing and Counting action block. This action block will be used to bind counter to TCAM entries. Signed-off-by: Arkadi Sharshevsky <arkadis@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>
* mlxsw: spectrum: Add periodic ACL rule activity updateArkadi Sharshevsky2017-03-121-1/+73
| | | | | | | | | | Introduce periodic task for dumping the activity status for the ACL rule TCAM entries. This is done in order to emulate last use statistics. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.comi> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Add support for direct rule accessArkadi Sharshevsky2017-03-121-0/+6
| | | | | | | | | | Currently the ACL rules can be accessed only by hashing. In order to dump the activity the rules are also placed in a list. Signed-off-by: Arkadi Sharshevsky <arkadis@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>
* mlxsw: spectrum_acl_tcam: Add support for retrieving TCAM entry activityArkadi Sharshevsky2017-03-122-0/+44
| | | | | | | | | | Add support for retrieving TCAM entry activity. In order to support ACL rule activity corresponding TCAM entry should be queried. Signed-off-by: Arkadi Sharshevsky <arkadis@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>
* mlxsw: spectrum: Add support for generic flow counter allocationArkadi Sharshevsky2017-03-125-3/+86
| | | | | | | | | | | | Add support for allocating generic flow counter. Generic flow counter can count packets or packets and bytes and can be assigned to different hardware processes. First use will be for counting packets and bytes of ACL rules, and will be introduced in the following patches. Signed-off-by: Arkadi Sharshevsky <arkadis@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>
* mlxsw: reg: Add Monitoring General Purpose Counter Set registerArkadi Sharshevsky2017-03-121-0/+65
| | | | | | | | | | The MGPC register retrieves generic flow counter value. It will be used to query ACL counters. Signed-off-by: Arkadi Sharshevsky <arkadis@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>
* mlxsw: spectrum: Add support for counter allocatorArkadi Sharshevsky2017-03-126-1/+247
| | | | | | | | | | | | | | | | | | Add implementation for counter allocator. The ASIC has special memory pool for various counting purposes. Counter memory is distributed between equal size banks. The static sub-pool configuration should specify the following parameters for each sub-pool: - Number of required banks. - Maximum entry size. Each module can add dedicated sub-pool or use existing one. Signed-off-by: Arkadi Sharshevsky <arkadis@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>
* ambassador: use setup_timerGeliang Tang2017-03-121-3/+2
| | | | | | | Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: add support for xdp_adjust_head()Jakub Kicinski2017-03-122-30/+70
| | | | | | | | | | | Support prepending data from XDP. We are already always allocating some headroom because FW may prepend metadata to packets. xdp_adjust_head() can be supported by making sure that headroom is big enough for XDP. In case FW had prepended metadata to the packet, however, we have to move it out of the way before we call XDP. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: prepare metadata handling for xdp_adjust_head()Jakub Kicinski2017-03-121-9/+19
| | | | | | | | | | | | XDP may require us to move metadata to make room for pushing headers. Track meta data location with a pointer and pass it explicitly to functions. While at it validate that meta_len from the descriptor is not bogus. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: reorganize pkt_off variableJakub Kicinski2017-03-121-9/+10
| | | | | | | | | Rename pkt_off variable to dma_off, it should hold data offset counting from beginning of DMA mapping. Compute the value only in XDP context. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: validate rx offset from the BAR and size down it's fieldJakub Kicinski2017-03-122-6/+14
| | | | | | | | | NFP_NET_CFG_RX_OFFSET is 32bit wide, make sure what we read from there is reasonable for packet headroom. This allows us to store the rx_offset in a 8bit variable. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: store dma direction in data path structureJakub Kicinski2017-03-122-32/+24
| | | | | | | | Instead of testing if xdp_prog is present store the dma direction in data path structure. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: switch to using data path structures for reconfigurationJakub Kicinski2017-03-123-227/+89
| | | | | | | | | | | | | | | | | Instead of passing around sets of rings and their parameters just store all information in the data path structure. We will no longer user xchg() on XDP programs when we swap programs while the traffic is guaranteed not to be flowing. This allows us to simply assign the entire data path structures instead of copying field by field. The optimization to reallocate only the rings on the side (RX/TX) which has been changed is also removed since it seems like it's not worth the code complexity. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: use dp to carry xdp_prog at reconfig timeJakub Kicinski2017-03-123-52/+37
| | | | | | | | Use xdp_prog member of data path struct to carry the xdp_prog to alloc/free free functions. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: use dp to carry mtu at reconfig timeJakub Kicinski2017-03-123-14/+15
| | | | | | | Move the mtu member from ring set to data path struct. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: use dp to carry fl_bufsz at reconfig timeJakub Kicinski2017-03-122-32/+27
| | | | | | | | Use fl_bufsz member of data path struct to carry desired size of free list entries. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: use dp to carry number of stack tx rings and vectorsJakub Kicinski2017-03-121-31/+31
| | | | | | | | Instead of passing variables around use dp to store number of tx rings for the stack and number of IRQ vectors. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: pass new data path to ring reconfigJakub Kicinski2017-03-123-36/+91
| | | | | | | | | | | Make callers of nfp_net_ring_reconfig() pass newly allocated data path structure. We will gradually make use of that structure instead of passing parameters around to all the allocation functions. This commit adds allocation and propagation of new data path struct, no parameters are converted, yet. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: move control BAR pointer into data path structureJakub Kicinski2017-03-124-20/+21
| | | | | | | | Control BAR pointer is used to unmask interrupts so it should be in the first cacheline of adapter structure. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* nfp: separate data path information from the reset of adapter structureJakub Kicinski2017-03-127-414/+436
| | | | | | | | | | | Move all data path information into a separate structure. This way we will be able to allocate new data path with all new rings etc. and swap it in easily. No functional changes. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: configuration of CBS in case of a TX AVB queueJoao Pinto2017-03-125-5/+136
| | | | | | | This patch adds the configuration of the AVB Credit-Based Shaper. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: mac debug prepared for multiple queuesJoao Pinto2017-03-124-54/+64
| | | | | | | This patch prepares mac debug dump for multiple queues. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: prepare irq_status for mtlJoao Pinto2017-03-124-16/+33
| | | | | | | This patch prepares mac irq status treatment for multiple queues. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: flow_ctrl functions adapted to mtlJoao Pinto2017-03-126-14/+34
| | | | | | | This patch adapts flow_ctrl function to prepare it for multiple queues. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: mapping mtl rx to dma channelJoao Pinto2017-03-124-0/+55
| | | | | | | | This patch adds the functionality of RX queue to dma channel mapping based on configuration. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: mtl rx queue enabled as dcb or avbJoao Pinto2017-03-123-15/+14
| | | | | | | | This patch introduces the enabling of RX queues as DCB or as AVB based on configuration. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: configure tx queue weightJoao Pinto2017-03-124-0/+42
| | | | | | | This patch adds TX queues weight programming. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: configure mtl rx and tx algorithmsJoao Pinto2017-03-124-3/+90
| | | | | | | | | This patch adds the RX and TX scheduling algorithms programming. It introduces the multiple queues configuration function (stmmac_mtl_configuration) in stmmac_main. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: multiple queues dt configurationJoao Pinto2017-03-121-0/+91
| | | | | | | | | This patch adds the multiple queues configuration in the Device Tree. It was also created a set of structures to keep the RX and TX queues configurations to be used in the driver. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: dwc-qos: Add Tegra186 supportThierry Reding2017-03-122-0/+248
| | | | | | | | | The NVIDIA Tegra186 SoC contains an instance of the Synopsys DWC ethernet QOS IP core. The binding that it uses is slightly different from existing ones because of the integration (clocks, resets, ...). Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: dwc-qos: Split out ->probe() and ->remove()Thierry Reding2017-03-121-26/+98
| | | | | | | | | | | | | Split out the binding specific parts of ->probe() and ->remove() to enable the driver to support variants of the binding. This is useful in order to keep backwards-compatibility while making it easy for a sub- driver to deal only with the updated bindings rather than having to add compatibility quirks all over the place. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-By: Joao Pinto <jpinto@synopsys.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: Program RX queue size and flow controlThierry Reding2017-03-122-2/+62
| | | | | | | | Program the receive queue size based on the RX FIFO size and enable hardware flow control for large FIFOs. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: Parse FIFO sizes from feature registersThierry Reding2017-03-124-0/+13
| | | | | | | | | | New version of this core encode the FIFO sizes in one of the feature registers. Use these sizes as default, but still allow device tree to override them for backwards compatibility. Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: Check for DMA mapping errorsThierry Reding2017-03-121-0/+2
| | | | | | | | When DMA mapping an SKB fragment, the mapping must be checked for errors, otherwise the DMA debug code will complain upon unmap. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: Balance PTP reference clock enable/disableThierry Reding2017-03-122-1/+4
| | | | | | | | | | clk_prepare_enable() and clk_disable_unprepare() for this clock aren't properly balanced, which can trigger a WARN_ON() in the common clock framework. Reviewed-By: Joao Pinto <jpinto@synopsys.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: Disable PTP reference clock on errorThierry Reding2017-03-121-0/+8
| | | | | | | | If an error occurs while opening the device, make sure to disable the PTP reference clock. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: Stop PHY and remove TX timer on errorThierry Reding2017-03-121-1/+5
| | | | | | | | If an error occurs while opening the device, make sure that both the TX timer and the PHY are properly cleaned up. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: Rename clk_ptp_ref clock to ptp_refThierry Reding2017-03-121-1/+1
| | | | | | | | | | | | There aren't currently any users of the "clk_ptp_ref", but there are other references to "ptp_ref", so I'm leaning towards considering that a typo. Fix it. Cc: Mark Rutland <mark.rutland@arm.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: devicetree@vger.kernel.org Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxlan: use appropriate family on L3 missVincent Bernat2017-03-121-1/+1
| | | | | | | | | When sending a L3 miss, the family is set to AF_INET even for IPv6. This causes userland (eg "ip monitor") to be confused. Ensure we send the appropriate family in this case. For L2 miss, keep using AF_INET. Signed-off-by: Vincent Bernat <vincent@bernat.im> Signed-off-by: David S. Miller <davem@davemloft.net>
* liquidio: optimize DMA in NUMA systemsVSR Burru2017-03-125-22/+9
| | | | | | | | | | | | | Optimize DMA in NUMA systems by allocating memory from NUMA node that NIC is plugged in to; DMA will no longer cross NUMA nodes. If NIC IRQs are pinned to a local CPU, that CPU's access to the DMA'd data is also optimized. Signed-off-by: VSR Burru <veerasenareddy.burru@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netvsc: fix hang on netvsc module removalstephen hemminger2017-03-121-2/+2
| | | | | | | | | | The code in netvsc_device_remove was incorrectly calling napi_disable repeatedly on the same element. This would cause attempts to remove netvsc module to hang. Fixes: 2506b1dc4bbe ("netvsc: implement NAPI") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netvsc: need napi scheduled during removalstephen hemminger2017-03-121-14/+2
| | | | | | | | | | Since rndis_halt_device waits until all outstanding sends and receives are completed. Netvsc device needs to still schedule NAPI to see those completions. Fixes: 2506b1dc4bbe ("netvsc: implement NAPI") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'dpaa_eth-next' of git://git.freescale.com/ppc/upstream/linuxDavid S. Miller2017-03-125-47/+248
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Madalin Bucur says: ==================== QorIQ DPAA 1 updates This patch set introduces a series of fixes and features to the DPAA 1 drivers. Besides activating hardware Rx checksum offloading, four traffic classes are added for Tx traffic prioritisation. changes from v1: added patch to enable context-A stashing ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * dpaa_eth: enable context-A stashingMadalin Bucur2017-03-091-1/+2
| | | | | | | | Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * dpaa_eth: enable multiple Tx traffic classesCamelia Groza2017-03-091-0/+36
| | | | | | | | | | | | | | | | | | Implement the setup_tc ndo to configure prioritised Tx traffic classes. Priorities range from 0 (lowest) to 3 (highest). The driver assigns NR_CPUS queues to each traffic class. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>