Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp849327ybx; Tue, 5 Nov 2019 06:33:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxHpp/sshTlIYa3OUKN8E7aBHmOgqlksYCSUnda/d7GJe9/a/u3wpxah7S2NgE/okNTDcHW X-Received: by 2002:aa7:d0c4:: with SMTP id u4mr17464657edo.8.1572964400318; Tue, 05 Nov 2019 06:33:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572964400; cv=none; d=google.com; s=arc-20160816; b=PKTnoDf1WXL6xrNF6cI/xVV+DL2qpH54E9XJ3AmFZ1HfwNcadQBK1BAM3l6NHouQc4 KluMd9/827X/hBNPpRvUnjRA41+KVqMSvw3gPJZ1U67SOoDTpbNjspyVNb7Wo9Cf/1EG TTgRZJZz7qcNVP8fnbK2iNjYoVkWu9b1+WG2+L+sKmpoSIGY8v8tpvMU3zQ4muOpaQP+ vDvyTwTFqd9VbjmjKr4Msfu/6dU8pB8Byw1Y0VgwntOMVKdRzWOGtEb2JHokoY0nk7Xt SAzm8QSB70sABQRLlJ+UZTi2wMSK++negLOhV2jvpKk4AbqoFeIa0vqs1FiKokyXqFDQ 99Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Vg9aUS5iAhtZsx2wOUlZ4LhRQ9ig/KcHALnnRClXrFI=; b=L7FC8qX5qokJo86B+TEUyMkzULuIqEllOJV7nzQKl1+2IImiHGvOrFgOTzFz/rtxUY UA2mzfdMwb1lio0zgIeISiCTtHe0OhghbXcJhbvTIv76pnYiR0tMwVnPfHgIaAm7BxAb rI/QlsYy6+hm/v9ommiq9af2RuFf3iP4VRHQ/CK91IAay4vjd1/z/9YLVOnHRn7k2ERu rEL3HEzi3SwbuDVVS6XIZOIqLSVjcXN3JS56dG7YLKi2yslTy/P4xUI3HqONvsh7xzfm BMIApH8k/PjhPYORn9w2wjVIJNv7WUvq4MwNKYhRUISEKZTUWclIfcR3xfa+D2DLmHjn psXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b="Z/PKRwBZ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h56si9721438eda.356.2019.11.05.06.32.56; Tue, 05 Nov 2019 06:33:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b="Z/PKRwBZ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389577AbfKEObe (ORCPT + 99 others); Tue, 5 Nov 2019 09:31:34 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:49852 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389459AbfKEObd (ORCPT ); Tue, 5 Nov 2019 09:31:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Vg9aUS5iAhtZsx2wOUlZ4LhRQ9ig/KcHALnnRClXrFI=; b=Z/PKRwBZiq7CyfurVeaAj3DAy2 fhlVfckTgZOsjM1EJPxJ5nW+0UMzh1pk03zuTrjp/Yc63+5ygt+3HGwBdPb8Qf4nk1Sw1zT2JJkJV Mb6cVEdfNQtgPB1Oqa6l1c8SAV+1AUDzrwRuW3aQ2mxnZjToMJKXC2hcBAAgaf6voYqI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.92.2) (envelope-from ) id 1iRzrm-0002Ji-2U; Tue, 05 Nov 2019 15:31:30 +0100 Date: Tue, 5 Nov 2019 15:31:30 +0100 From: Andrew Lunn To: Ioana Ciornei Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, f.fainelli@gmail.com Subject: Re: [PATCH 08/12] staging: dpaa2-ethsw: handle Rx path on control interface Message-ID: <20191105143130.GD7189@lunn.ch> References: <1572957275-23383-1-git-send-email-ioana.ciornei@nxp.com> <1572957275-23383-9-git-send-email-ioana.ciornei@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1572957275-23383-9-git-send-email-ioana.ciornei@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +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