diff options
author | Camelia Groza <camelia.groza@nxp.com> | 2021-02-18 20:21:06 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-22 17:54:39 -0800 |
commit | 433dfc99aa3e0acbf655b961d98eb690162f758f (patch) | |
tree | 1280f9c2d5c0d541f78134f1e36ae8605e8916af | |
parent | 04b385f325080157ab1b5f8ce1b1de07ce0d9e27 (diff) | |
download | linux-433dfc99aa3e0acbf655b961d98eb690162f758f.tar.gz linux-433dfc99aa3e0acbf655b961d98eb690162f758f.tar.bz2 linux-433dfc99aa3e0acbf655b961d98eb690162f758f.zip |
dpaa_eth: fix the access method for the dpaa_napi_portal
The current use of container_of is flawed and unnecessary. Obtain
the dpaa_napi_portal reference from the private percpu data instead.
Fixes: a1e031ffb422 ("dpaa_eth: add XDP_REDIRECT support")
Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Link: https://lore.kernel.org/r/20210218182106.22613-1-camelia.groza@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index ccfe52a50a66..720dc99bd1fc 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -2670,7 +2670,6 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal, u32 hash; u64 ns; - np = container_of(&portal, struct dpaa_napi_portal, p); dpaa_fq = container_of(fq, struct dpaa_fq, fq_base); fd_status = be32_to_cpu(fd->status); fd_format = qm_fd_get_format(fd); @@ -2685,6 +2684,7 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal, percpu_priv = this_cpu_ptr(priv->percpu_priv); percpu_stats = &percpu_priv->stats; + np = &percpu_priv->np; if (unlikely(dpaa_eth_napi_schedule(percpu_priv, portal, sched_napi))) return qman_cb_dqrr_stop; |