dpaa2-eth: Update callback signature
Change the frame consume callback signature: * the entire FQ structure is passed to the callback instead of just the queue index * the NAPI structure can be easily obtained from the channel it is associated to, so we don't need to pass it explicitly Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
b0e4f37b01
Коммит
dbcdf72898
|
@ -203,8 +203,7 @@ static struct sk_buff *build_frag_skb(struct dpaa2_eth_priv *priv,
|
|||
static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv,
|
||||
struct dpaa2_eth_channel *ch,
|
||||
const struct dpaa2_fd *fd,
|
||||
struct napi_struct *napi,
|
||||
u16 queue_id)
|
||||
struct dpaa2_eth_fq *fq)
|
||||
{
|
||||
dma_addr_t addr = dpaa2_fd_get_addr(fd);
|
||||
u8 fd_format = dpaa2_fd_get_format(fd);
|
||||
|
@ -267,12 +266,12 @@ static void dpaa2_eth_rx(struct dpaa2_eth_priv *priv,
|
|||
}
|
||||
|
||||
skb->protocol = eth_type_trans(skb, priv->net_dev);
|
||||
skb_record_rx_queue(skb, queue_id);
|
||||
skb_record_rx_queue(skb, fq->flowid);
|
||||
|
||||
percpu_stats->rx_packets++;
|
||||
percpu_stats->rx_bytes += dpaa2_fd_get_len(fd);
|
||||
|
||||
napi_gro_receive(napi, skb);
|
||||
napi_gro_receive(&ch->napi, skb);
|
||||
|
||||
return;
|
||||
|
||||
|
@ -312,7 +311,7 @@ static int consume_frames(struct dpaa2_eth_channel *ch,
|
|||
fd = dpaa2_dq_fd(dq);
|
||||
fq = (struct dpaa2_eth_fq *)(uintptr_t)dpaa2_dq_fqd_ctx(dq);
|
||||
|
||||
fq->consume(priv, ch, fd, &ch->napi, fq->flowid);
|
||||
fq->consume(priv, ch, fd, fq);
|
||||
cleaned++;
|
||||
} while (!is_last);
|
||||
|
||||
|
@ -661,8 +660,7 @@ err_alloc_headroom:
|
|||
static void dpaa2_eth_tx_conf(struct dpaa2_eth_priv *priv,
|
||||
struct dpaa2_eth_channel *ch __always_unused,
|
||||
const struct dpaa2_fd *fd,
|
||||
struct napi_struct *napi __always_unused,
|
||||
u16 queue_id __always_unused)
|
||||
struct dpaa2_eth_fq *fq __always_unused)
|
||||
{
|
||||
struct rtnl_link_stats64 *percpu_stats;
|
||||
struct dpaa2_eth_drv_stats *percpu_extras;
|
||||
|
|
|
@ -277,8 +277,7 @@ struct dpaa2_eth_fq {
|
|||
void (*consume)(struct dpaa2_eth_priv *priv,
|
||||
struct dpaa2_eth_channel *ch,
|
||||
const struct dpaa2_fd *fd,
|
||||
struct napi_struct *napi,
|
||||
u16 queue_id);
|
||||
struct dpaa2_eth_fq *fq);
|
||||
struct dpaa2_eth_fq_stats stats;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче