#
f9dae555 |
| 07-Jun-2019 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
dpaa2-eth: Remove preempt_disable() from seed_pool()
According to the comment, the preempt_disable() statement is required due to synchronisation in napi_alloc_frag(). The awful truth is that local_
dpaa2-eth: Remove preempt_disable() from seed_pool()
According to the comment, the preempt_disable() statement is required due to synchronisation in napi_alloc_frag(). The awful truth is that local_bh_disable() is required because otherwise the NAPI poll callback can be invoked while the open function setup buffers. This isn't unlikely since the dpaa2 provides multiple devices.
The usage of napi_alloc_frag() has been removed in commit
27c874867c4e9 ("dpaa2-eth: Use a single page per Rx buffer")
which means that the comment is not accurate and the preempt_disable() statement is not required.
Remove the outdated comment and the no longer required preempt_disable().
Cc: Ioana Radulescu <ruxandra.radulescu@nxp.com> Acked-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
bd8460fa |
| 24-May-2019 |
Ioana Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Use PTR_ERR_OR_ZERO where appropriate
Use PTR_ERR_OR_ZERO instead of PTR_ERR in cases where zero is a valid input. Reported by smatch.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@
dpaa2-eth: Use PTR_ERR_OR_ZERO where appropriate
Use PTR_ERR_OR_ZERO instead of PTR_ERR in cases where zero is a valid input. Reported by smatch.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
16fa1cf1 |
| 23-May-2019 |
Ioana Radulescu <ruxandra.radulescu@nxp.com> |
Revert "dpaa2-eth: configure the cache stashing amount on a queue"
This reverts commit f8b995853444aba9c16c1ccdccdd397527fde96d.
The reverted change instructed the QMan hardware block to fetch RX f
Revert "dpaa2-eth: configure the cache stashing amount on a queue"
This reverts commit f8b995853444aba9c16c1ccdccdd397527fde96d.
The reverted change instructed the QMan hardware block to fetch RX frame annotation and beginning of frame data to cache before the core would read them.
It turns out that in rare cases, it's possible that a QMan stashing transaction is delayed long enough such that, by the time it gets executed, the frame in question had already been dequeued by the core and software processing began on it. If the core manages to unmap the frame buffer _before_ the stashing transaction is executed, an SMMU exception will be raised.
Unfortunately there is no easy way to work around this while keeping the performance advantages brought by QMan stashing, so disable it altogether.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
2d680237 |
| 16-Apr-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Add flow steering support without masking
On platforms that lack a TCAM (like LS1088A), masking of flow steering keys is not supported. Until now we didn't offer flow steering capabilitie
dpaa2-eth: Add flow steering support without masking
On platforms that lack a TCAM (like LS1088A), masking of flow steering keys is not supported. Until now we didn't offer flow steering capabilities at all on these platforms, since our driver implementation configured a "comprehensive" FS key (containing all supported header fields), with masks used to ignore the fields not present in the rules provided by the user.
We now allow ethtool rules that share a common key (i.e. have the same header fields). The FS key is now kept in the driver private data and initialized when the first rule is added to an empty table, rather than at probe time. If a rule with a new composition key is wanted, the user must first manually delete all previous rules.
When building a FS table entry to pass to firmware, we still use the old building algorithm, which assumes an all-supported-fields key, and later collapse the fields which aren't actually needed.
Masked rules are not supported; if provided, the mask value will be ignored. For firmware versions older than MC10.7.0 (that only offer the legacy ABIs for configuring distribution keys) flow steering without masking support remains unavailable.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
3a1e6b84 |
| 16-Apr-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Update hash key composition code
Introduce an internal id bitfield to uniquely identify header fields supported by the Rx distribution keys. For the hash key, add a conversion from the RX
dpaa2-eth: Update hash key composition code
Introduce an internal id bitfield to uniquely identify header fields supported by the Rx distribution keys. For the hash key, add a conversion from the RXH_* bitmask provided by ethtool to the internal ids.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
61f9bf00 |
| 16-Apr-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Add a couple of macros
Add two macros to simplify reading DPNI options.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
df8e249b |
| 16-Apr-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Fix Rx classification status
Set the Rx flow classification enable flag only if key config operation is successful.
Fixes 3f9b5c9 ("dpaa2-eth: Configure Rx flow classification key")
Sig
dpaa2-eth: Fix Rx classification status
Set the Rx flow classification enable flag only if key config operation is successful.
Fixes 3f9b5c9 ("dpaa2-eth: Configure Rx flow classification key")
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0a25d92c |
| 25-Mar-2019 |
Ioana Ciornei <ioana.ciornei@nxp.com> |
dpaa2-eth: use netif_receive_skb_list
Take advantage of the software Rx batching by using netif_receive_skb_list instead of napi_gro_receive.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Si
dpaa2-eth: use netif_receive_skb_list
Take advantage of the software Rx batching by using netif_receive_skb_list instead of napi_gro_receive.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
8c838f53 |
| 25-Mar-2019 |
Ioana Ciornei <ioana.ciornei@nxp.com> |
dpaa2-eth: fix race condition with bql frame accounting
It might happen that Tx conf acknowledges a frame before it was subscribed in bql, as subscribing was previously done after the enqueue operat
dpaa2-eth: fix race condition with bql frame accounting
It might happen that Tx conf acknowledges a frame before it was subscribed in bql, as subscribing was previously done after the enqueue operation.
This patch moves the netdev_tx_sent_queue call before the actual frame enqueue, so that this can never happen.
Fixes: 569dac6a5a0d ("dpaa2-eth: bql support") Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
64447506 |
| 20-Mar-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Fix possible access beyond end of array
Make sure we don't try to enqueue XDP_REDIRECT frames to an inexistent FQ.
While it is guaranteed not to have more than one queue per core, having
dpaa2-eth: Fix possible access beyond end of array
Make sure we don't try to enqueue XDP_REDIRECT frames to an inexistent FQ.
While it is guaranteed not to have more than one queue per core, having fewer queues than CPUs on an interface is a valid configuration.
Fixes: d678be1dc1ec ("dpaa2-eth: add XDP_REDIRECT support") Reported-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
d678be1d |
| 01-Mar-2019 |
Ioana Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: add XDP_REDIRECT support
Implement support for the XDP_REDIRECT action.
The redirected frame is transmitted and confirmed on the regular Tx/Tx conf queues. Frame is marked with the "XDP"
dpaa2-eth: add XDP_REDIRECT support
Implement support for the XDP_REDIRECT action.
The redirected frame is transmitted and confirmed on the regular Tx/Tx conf queues. Frame is marked with the "XDP" type in the software annotation, since it requires special treatment.
We don't have good hardware support for TX batching, so the XDP_XMIT_FLUSH flag doesn't make a difference for now; ndo_xdp_xmit performs the actual Tx operation on the spot.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
e3fdf6ba |
| 01-Mar-2019 |
Ioana Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Add software annotation types
We write different metadata information in the software annotation area of Tx frames, depending on frame type. Make this more explicit by introducing a type
dpaa2-eth: Add software annotation types
We write different metadata information in the software annotation area of Tx frames, depending on frame type. Make this more explicit by introducing a type field and separate structures for single buffer and scatter-gather frames.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
f8b99585 |
| 23-Feb-2019 |
Ioana Ciornei <ioana.ciornei@nxp.com> |
dpaa2-eth: configure the cache stashing amount on a queue
Configure the amount of 64 bytes of frame, annotation and context data that will be cache stashed for a specific frame queue. Since the fra
dpaa2-eth: configure the cache stashing amount on a queue
Configure the amount of 64 bytes of frame, annotation and context data that will be cache stashed for a specific frame queue. Since the frame context is not used, configure that only 64 bytes of frame data and 64 bytes of annotation will be stashed.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Li Yang <leoyang.li@nxp.com>
show more ...
|
#
1fa0f68c |
| 04-Feb-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Use FQ-based DPIO enqueue API
Starting with MC10.14.0, dpaa2_io_service_enqueue_fq() API is functional. Since there are a number of cases where it offers better performance compared to th
dpaa2-eth: Use FQ-based DPIO enqueue API
Starting with MC10.14.0, dpaa2_io_service_enqueue_fq() API is functional. Since there are a number of cases where it offers better performance compared to the currently used enqueue function, switch to it for firmware versions that support it.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0723a3ae |
| 04-Feb-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Use napi_consume_skb()
While in NAPI context, free skbs by calling napi_consume_skb() instead of dev_kfree_skb(), to take advantage of the bulk freeing mechanism.
Signed-off-by: Ioana Ra
dpaa2-eth: Use napi_consume_skb()
While in NAPI context, free skbs by calling napi_consume_skb() instead of dev_kfree_skb(), to take advantage of the bulk freeing mechanism.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
27c87486 |
| 04-Feb-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Use a single page per Rx buffer
Instead of allocating page fragments via the network stack, use the page allocator directly. For now, we consume one page for each Rx buffer.
With the new
dpaa2-eth: Use a single page per Rx buffer
Instead of allocating page fragments via the network stack, use the page allocator directly. For now, we consume one page for each Rx buffer.
With the new memory model we are free to consider adding more XDP support.
Performance decreases slightly in some IP forwarding cases. No visible effect on termination traffic. The driver memory footprint increases as a result of this change, but it is still small enough to not really matter.
Another side effect is that now Rx buffer alignment requirements are naturally satisfied without any additional actions needed. Remove alignment related code, except in the buffer layout information conveyed to MC, as hardware still needs to know the alignment value we guarantee.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
091a19ea |
| 18-Jan-2019 |
Ioana Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: add debugfs statistics
Export detailed driver counters through debugfs.
Statistics already available in ethtool are presented in a structured manner. Includes per-core, per-FQ and per-ch
dpaa2-eth: add debugfs statistics
Export detailed driver counters through debugfs.
Statistics already available in ethtool are presented in a structured manner. Includes per-core, per-FQ and per-channel statistics.
Also transition from module_fsl_mc_driver to explicit module_init/exit in order to create the debugfs directory besides registering the driver.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
68d74315 |
| 16-Jan-2019 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Fix ndo_stop routine
In the current implementation, on interface down we disabled NAPI and then manually drained any remaining ingress frames. This could lead to a situation when, under h
dpaa2-eth: Fix ndo_stop routine
In the current implementation, on interface down we disabled NAPI and then manually drained any remaining ingress frames. This could lead to a situation when, under heavy traffic, the data availability notification for some of the channels would not get rearmed correctly.
Change the implementation such that we let all remaining ingress frames be processed as usual and only disable NAPI once the hardware queues are empty.
We also add a wait on the Tx side, to allow hardware time to process all in-flight Tx frames before issueing the disable command.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
47441f7f |
| 10-Dec-2018 |
Ioana Ciornei <ioana.ciornei@nxp.com> |
soc: fsl: dpio: add a device_link at dpaa2_io_service_register
Automatically add a device link between the actual device requesting the dpaa2_io_service_register and the underlying dpaa2_io used. Th
soc: fsl: dpio: add a device_link at dpaa2_io_service_register
Automatically add a device link between the actual device requesting the dpaa2_io_service_register and the underlying dpaa2_io used. This link will ensure that when a DPIO device, which is indirectly used by other devices, is unbound any consumer devices will be also unbound from their drivers.
For example, any DPNI, bound to the dpaa2-eth driver, which is using DPIO devices will be unbound before its supplier device.
Also, add a new parameter to the dpaa2_io_service_[de]register functions to specify the requesting device (ie the consumer).
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Horia Geanta <horia.geanta@nxp.com> Reviewed-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Li Yang <leoyang.li@nxp.com>
show more ...
|
#
c1cb11bc |
| 29-Nov-2018 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Add "fall through" comments
Add comments in the switch statement for XDP action to indicate fallthrough is intended.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-of
dpaa2-eth: Add "fall through" comments
Add comments in the switch statement for XDP action to indicate fallthrough is intended.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
a4a7b762 |
| 26-Nov-2018 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Add xdp counters
Add counters for xdp processed frames to the channel statistics.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Reviewed-by: David Ahern <dsahern@gmail.com>
dpaa2-eth: Add xdp counters
Add counters for xdp processed frames to the channel statistics.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0ff8f0aa |
| 26-Nov-2018 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Cleanup channel stats
Remove unused counter. Reorder fields in channel stats structure to match the ethtool strings order and make it easier to print them with ethtool -S.
Signed-off-by:
dpaa2-eth: Cleanup channel stats
Remove unused counter. Reorder fields in channel stats structure to match the ethtool strings order and make it easier to print them with ethtool -S.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
99e43521 |
| 26-Nov-2018 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Add support for XDP_TX
Send frames back on the same port for XDP_TX action. Since the frame buffers have been allocated by us, we can recycle them directly into the Rx buffer pool instead
dpaa2-eth: Add support for XDP_TX
Send frames back on the same port for XDP_TX action. Since the frame buffers have been allocated by us, we can recycle them directly into the Rx buffer pool instead of requesting a confirmation frame upon transmission complete.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
18c2e770 |
| 26-Nov-2018 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Map Rx buffers as bidirectional
In order to support enqueueing Rx FDs back to hardware, we need to DMA map Rx buffers as bidirectional.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu
dpaa2-eth: Map Rx buffers as bidirectional
In order to support enqueueing Rx FDs back to hardware, we need to DMA map Rx buffers as bidirectional.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
5d39dc21 |
| 26-Nov-2018 |
Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com> |
dpaa2-eth: Release buffers back to pool on XDP_DROP
Instead of freeing the RX buffers, release them back into the pool. We wait for the maximum number of buffers supported by a single release comman
dpaa2-eth: Release buffers back to pool on XDP_DROP
Instead of freeing the RX buffers, release them back into the pool. We wait for the maximum number of buffers supported by a single release command to accumulate before issuing the command.
Also, don't unmap the Rx buffers at the beginning of the Rx routine anymore, since that would require remapping them before release. Instead, just do a DMA sync at first and only unmap if the frame is meant for the stack.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|