[PATCH net-next v2 0/3] dpaa2-eth: Add new statistics counters

2019-09-02 Thread Ioana Radulescu
separately the error case for unsupported statistics pages Ioana Radulescu (3): dpaa2-eth: Minor refactoring in ethtool stats dpaa2-eth: Add new DPNI statistics counters dpaa2-eth: Poll Tx pending frames counter on if down drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 31

[PATCH net-next v2 1/3] dpaa2-eth: Minor refactoring in ethtool stats

2019-09-02 Thread Ioana Radulescu
As we prepare to read more pages from the DPNI stat counters, reorganize the code a bit to make it easier to extend. Signed-off-by: Ioana Radulescu --- v2: no changes drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions

[PATCH net-next v2 3/3] dpaa2-eth: Poll Tx pending frames counter on if down

2019-09-02 Thread Ioana Radulescu
Starting with firmware version MC10.18.0, a new counter for in flight Tx frames is offered. Use it when bringing down the interface to determine when all pending Tx frames have been processed by hardware instead of sleeping a fixed amount of time. Signed-off-by: Ioana Radulescu --- v2: no

[PATCH net-next v2 2/3] dpaa2-eth: Add new DPNI statistics counters

2019-09-02 Thread Ioana Radulescu
Recent firmware versions expose more DPNI counters. Export relevant ones via ethtool -S. Signed-off-by: Ioana Radulescu --- v2: treat separately error case for unsupported statistics pages .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 19 -- drivers/net/ethernet/freescale/dpaa2

[PATCH net-next 0/3] dpaa2-eth: Add new statistics counters

2019-08-30 Thread Ioana Radulescu
Recent firmware versions offer access to more DPNI statistics counters. Add the relevant ones to ethtool interface stats. Also we can now make use of a new counter for in flight egress frames to avoid sleeping an arbitrary amount of time in the ndo_stop routine. Ioana Radulescu (3): dpaa2-eth

[PATCH net-next 2/3] dpaa2-eth: Add new DPNI statistics counters

2019-08-30 Thread Ioana Radulescu
Recent firmware versions expose more DPNI counters. Export relevant ones via ethtool -S. Signed-off-by: Ioana Radulescu --- .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 21 ++-- drivers/net/ethernet/freescale/dpaa2/dpni.c| 2 +- drivers/net/ethernet/freescale/dpaa2

[PATCH net-next 3/3] dpaa2-eth: Poll Tx pending frames counter on if down

2019-08-30 Thread Ioana Radulescu
Starting with firmware version MC10.18.0, a new counter for in flight Tx frames is offered. Use it when bringing down the interface to determine when all pending Tx frames have been processed by hardware instead of sleeping a fixed amount of time. Signed-off-by: Ioana Radulescu --- drivers/net

[PATCH net-next 1/3] dpaa2-eth: Minor refactoring in ethtool stats

2019-08-30 Thread Ioana Radulescu
As we prepare to read more pages from the DPNI stat counters, reorganize the code a bit to make it easier to extend. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a

[PATCH net-next v3 2/3] dpaa2-eth: Use stored link settings

2019-08-28 Thread Ioana Radulescu
Whenever a link state change occurs, we get notified and save the new link settings in the device's private data. In ethtool get_link_ksettings, use the stored state instead of interrogating the firmware each time. Signed-off-by: Ioana Radulescu Reviewed-by: Andrew Lunn --- v2: split from

[PATCH net-next v3 1/3] dpaa2-eth: Remove support for changing link settings

2019-08-28 Thread Ioana Radulescu
We only support fixed-link for now, so there is no point in offering users the option to change link settings via ethtool. Functionally there is no change, since firmware prevents us from changing link parameters anyway. Signed-off-by: Ioana Radulescu Reviewed-by: Andrew Lunn --- v2: new patch

[PATCH net-next v3 3/3] dpaa2-eth: Add pause frame support

2019-08-28 Thread Ioana Radulescu
igned-off-by: Ioana Radulescu Reviewed-by: Andrew Lunn --- v2: split priv->link_state changes in a separate patch always set pause->autoneg to false return -EOPNOTSUPP if user tries to set pause->autoneg v3: add comment in code and improve commit message to clarify how the PAUSE

[PATCH net-next v2 2/3] dpaa2-eth: Use stored link settings

2019-08-27 Thread Ioana Radulescu
Whenever a link state change occurs, we get notified and save the new link settings in the device's private data. In ethtool get_link_ksettings, use the stored state instead of interrogating the firmware each time. Signed-off-by: Ioana Radulescu --- v2: split from main pause frames

[PATCH net-next v2 1/3] dpaa2-eth: Remove support for changing link settings

2019-08-27 Thread Ioana Radulescu
We only support fixed-link for now, so there is no point in offering users the option to change link settings via ethtool. Functionally there is no change, since firmware prevents us from changing link parameters anyway. Signed-off-by: Ioana Radulescu --- v2: new patch .../net/ethernet

[PATCH net-next v2 3/3] dpaa2-eth: Add pause frame support

2019-08-27 Thread Ioana Radulescu
ingress frames can't keep up with the Rx rate; for large frames, the number of buffers in the pool may never get low enough to trigger pause frames as long as taildrop is enabled). So we set pause frame generation and Rx FQ taildrop as mutually exclusive. Signed-off-by: Ioana Radulescu -

[PATCH net-next] dpaa2-eth: Add pause frame support

2019-08-23 Thread Ioana Radulescu
r and we only interrogate the firmware when we receive a notification that something (flow control or other link options) has changed. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 85 +++--- drivers/net/ethernet/freescale/dpaa2/dpaa2-

[PATCH net-next] dpaa2-eth: Don't use netif_receive_skb_list for TCP frames

2019-07-23 Thread Ioana Radulescu
. Signed-off-by: Ioana Radulescu Signed-off-by: Vladimir Oltean --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 15 ++- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 51 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet

[PATCH net-next v3 3/3] dpaa2-eth: Add mqprio support

2019-06-11 Thread Ioana Radulescu
priority information received from the stack is used to select the hardware Tx queue on which to enqueue the frame. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Purcareata --- v2: no changes v3: move Tx fastpath code changes to this patch, to make it more clear how skb queue mapping is used for

[PATCH net-next v3 0/3] dpaa2-eth: Add support for MQPRIO offloading

2019-06-11 Thread Ioana Radulescu
Add support for adding multiple TX traffic classes with mqprio. We can have up to one netdev queue and hardware frame queue per TC per core. Ioana Radulescu (3): dpaa2-eth: Refactor xps code dpaa2-eth: Support multiple traffic classes on Tx dpaa2-eth: Add mqprio support drivers/net

[PATCH net-next v3 2/3] dpaa2-eth: Support multiple traffic classes on Tx

2019-06-11 Thread Ioana Radulescu
: Ioana Radulescu --- v3: move code changes on the Tx fastpath to patch 3/3 v2: Extra processing on the fast path happens only when TC is used drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 23 +-- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 7 ++- 2 files changed

[PATCH net-next v3 1/3] dpaa2-eth: Refactor xps code

2019-06-11 Thread Ioana Radulescu
Move the code configuring xps on the netdev TX queues to a separate function. A subsequent patch will need to call this in another context as well. Signed-off-by: Ioana Radulescu --- v2: no changes v3: no changes drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 45 +--- 1

[PATCH net-next v2 3/3] dpaa2-eth: Add mqprio support

2019-06-06 Thread Ioana Radulescu
assigns num_queues to each traffic class, for a total of num_queues x num_tcs hardware frame queues. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Purcareata --- v2: no changes drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 43 1 file changed, 43 insertions

[PATCH net-next v2 0/3] dpaa2-eth: Add support for MQPRIO offloading

2019-06-06 Thread Ioana Radulescu
Add support for adding multiple TX traffic classes with mqprio. We can have up to one netdev queue and hardware frame queue per TC per core. Ioana Radulescu (3): dpaa2-eth: Refactor xps code dpaa2-eth: Support multiple traffic classes on Tx dpaa2-eth: Add mqprio support drivers/net

[PATCH net-next v2 1/3] dpaa2-eth: Refactor xps code

2019-06-06 Thread Ioana Radulescu
Move the code configuring xps on the netdev TX queues to a separate function. A subsequent patch will need to call this in another context as well. Signed-off-by: Ioana Radulescu --- v2: no changes drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 45 +--- 1 file changed

[PATCH net-next v2 2/3] dpaa2-eth: Support multiple traffic classes on Tx

2019-06-06 Thread Ioana Radulescu
on which to enqueue the frame. Signed-off-by: Ioana Radulescu --- v2: Extra processing on the fast path happens only when TC is used drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 47 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 9 - 2 files changed, 40

[PATCH net-next 2/3] dpaa2-eth: Support multiple traffic classes on Tx

2019-06-05 Thread Ioana Radulescu
on which to enqueue the frame. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 47 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 9 - 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 1/3] dpaa2-eth: Refactor xps code

2019-06-05 Thread Ioana Radulescu
Move the code configuring xps on the netdev TX queues to a separate function. A subsequent patch will need to call this in another context as well. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 45 +--- 1 file changed, 32 insertions

[PATCH net-next 0/3] dpaa2-eth: Add support for MQPRIO offloading

2019-06-05 Thread Ioana Radulescu
Add support for adding multiple TX traffic classes with mqprio. We have one netdev queue and one hardware frame queue per TC. Ioana Radulescu (3): dpaa2-eth: Refactor xps code dpaa2-eth: Support multiple traffic classes on Tx dpaa2-eth: Add mqprio support drivers/net/ethernet/freescale

[PATCH net-next 3/3] dpaa2-eth: Add mqprio support

2019-06-05 Thread Ioana Radulescu
assigns num_queues to each traffic class, for a total of num_queues x num_tcs hardware frame queues. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Purcareata --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 43 1 file changed, 43 insertions(+) diff --git a

[PATCH net 0/3] dpaa2-eth: Fix smatch warnings

2019-05-24 Thread Ioana Radulescu
Fix a couple of warnings reported by smatch. Ioana Radulescu (3): dpaa2-eth: Fix potential spectre issue dpaa2-eth: Use PTR_ERR_OR_ZERO where appropriate dpaa2-eth: Make constant 64-bit long drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++-- drivers/net/ethernet/freescale

[PATCH net 2/3] dpaa2-eth: Use PTR_ERR_OR_ZERO where appropriate

2019-05-24 Thread Ioana Radulescu
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 --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2

[PATCH net 3/3] dpaa2-eth: Make constant 64-bit long

2019-05-24 Thread Ioana Radulescu
Function dpaa2_eth_cls_key_size() expects a 64bit argument, but DPAA2_ETH_DIST_ALL is defined as UINT_MAX. Fix this. Signed-off-by: Ioana Radulescu Reported-by: Dan Carpenter --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net 1/3] dpaa2-eth: Fix potential spectre issue

2019-05-24 Thread Ioana Radulescu
Smatch reports a potential spectre vulnerability in the dpaa2-eth driver, where the value of rxnfc->fs.location (which is provided from user-space) is used as index in an array. Add a call to array_index_nospec() to sanitize the access. Signed-off-by: Ioana Radulescu --- drivers/net/ether

[PATCH net-next] Revert "dpaa2-eth: configure the cache stashing amount on a queue"

2019-05-23 Thread Ioana Radulescu
aised. 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 --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --

[PATCH net-next 4/4] dpaa2-eth: Add ethtool support for flow classification

2018-10-01 Thread Ioana Radulescu
be processed. Discarding the frame is also supported. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 44 +++ drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 11 + .../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 331 + drivers

[PATCH net-next 3/4] dpaa2-eth: Configure Rx flow classification key

2018-10-01 Thread Ioana Radulescu
, we will just mask out the unused header fields. Since the key composition process is the same for flow classification and hashing, reuse existing code where possible. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 99 drivers/net

[PATCH net-next 0/4] dpaa2-eth: Add support for Rx flow classification

2018-10-01 Thread Ioana Radulescu
e new firmware API for key config. Subsequent patches introduce the firmware API for configuring the classification and actual support for adding and deleting rules via ethtool. Ioana Radulescu (4): dpaa2-eth: Use new API for Rx flow hashing dpaa2-eth: Rename structure dpaa2-eth: Configure Rx

[PATCH net-next 2/4] dpaa2-eth: Rename structure

2018-10-01 Thread Ioana Radulescu
Since the array of supported header fields will be used for Rx flow classification as well, rename it from "hash_fields" to the more inclusive "dist_fields". Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 12 ++-- drivers/ne

[PATCH net-next 1/4] dpaa2-eth: Use new API for Rx flow hashing

2018-10-01 Thread Ioana Radulescu
of APIs for separate configuration of Rx hashing and classification keys. Update the Rx flow hashing support to use the new API, if available. Signed-off-by: Ioana Radulescu --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 73 ++-- drivers/net/ethernet/freescale/dpaa2

[PATCH] staging: fsl-dpaa2/ethsw: Fix error message

2018-07-25 Thread Ioana Radulescu
Error message was referencing wrong function, fix it. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index 0d54564e