lkml.org 
[lkml]   [2019]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/12] staging: dpaa2-ethsw: handle Rx path on control interface
> +static void ethsw_rx(struct ethsw_fq *fq,
> + const struct dpaa2_fd *fd)
> +{
> + struct ethsw_core *ethsw = fq->ethsw;
> + struct ethsw_port_priv *port_priv;
> + struct net_device *netdev;
> + struct vlan_ethhdr *hdr;
> + struct sk_buff *skb;
> + u16 vlan_tci, vid;
> + int if_id = -1;
> + int err;
> +
> + /* prefetch the frame descriptor */
> + prefetch(fd);
> +
> + /* get switch ingress interface ID */
> + if_id = upper_32_bits(dpaa2_fd_get_flc(fd)) & 0x0000FFFF;

Does the prefetch do any good, since the very next thing you do is
access the frame descriptor? Ideally you want to issue the prefetch,
do something else for a while, and then make use of what the prefetch
got.


> +
> + if (if_id < 0 || if_id >= ethsw->sw_attr.num_ifs) {

Is if_id signed? Seems odd.

Andrew

\
 
 \ /
  Last update: 2019-11-05 15:32    [W:0.093 / U:1.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site