devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Hauke Mehrtens <hauke@hauke-m.de>, davem@davemloft.net
Cc: netdev@vger.kernel.org, andrew@lunn.ch,
	vivien.didelot@savoirfairelinux.com, john@phrozen.org,
	linux-mips@linux-mips.org, dev@kresin.me,
	hauke.mehrtens@intel.com, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 net-next 3/7] net: dsa: Add Lantiq / Intel GSWIP tag support
Date: Mon, 3 Sep 2018 11:52:44 -0700	[thread overview]
Message-ID: <b13de4db-f115-e7d5-9efd-0af18f947978@gmail.com> (raw)
In-Reply-To: <20180901120332.9792-1-hauke@hauke-m.de>



On 9/1/2018 5:03 AM, Hauke Mehrtens wrote:
> This handles the tag added by the PMAC on the VRX200 SoC line.
> 
> The GSWIP uses internally a GSWIP special tag which is located after the
> Ethernet header. The PMAC which connects the GSWIP to the CPU converts
> this special tag used by the GSWIP into the PMAC special tag which is
> added in front of the Ethernet header.
> 
> This was tested with GSWIP 2.1 found in the VRX200 SoCs, other GSWIP
> versions use slightly different PMAC special tags.
> 
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Just one suggestion below, if you need to resubmit this:

[snip]

> +static struct sk_buff *gswip_tag_rcv(struct sk_buff *skb,
> +				     struct net_device *dev,
> +				     struct packet_type *pt)
> +{
> +	int port;
> +	u8 *gswip_tag;
> +
> +	if (unlikely(!pskb_may_pull(skb, GSWIP_RX_HEADER_LEN)))
> +		return NULL;
> +
> +	gswip_tag = skb->data - ETH_HLEN;
> +	skb_pull_rcsum(skb, GSWIP_RX_HEADER_LEN);

I would be moving this after the port lookup was successful, that way if 
you are discarding a frame, you can do this as quickly as possible, this 
should not have a functional impact since you return a skb with the 
checksum updated past the return of that function.
-- 
Florian

  parent reply	other threads:[~2018-09-03 18:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01 11:45 [PATCH v2 net-next 0/7] Add support for Lantiq / Intel vrx200 network Hauke Mehrtens
2018-09-01 11:45 ` [PATCH v2 net-next 1/7] MIPS: lantiq: dma: add dev pointer Hauke Mehrtens
2018-09-01 14:57   ` Andrew Lunn
2018-09-01 21:39     ` Hauke Mehrtens
2018-09-02  1:26       ` Andrew Lunn
2018-09-01 11:45 ` [PATCH v2 net-next 2/7] MIPS: lantiq: Do not enable IRQs in dma open Hauke Mehrtens
2018-09-01 12:03 ` [PATCH v2 net-next 3/7] net: dsa: Add Lantiq / Intel GSWIP tag support Hauke Mehrtens
2018-09-01 18:01   ` Andrew Lunn
2018-09-03 18:52   ` Florian Fainelli [this message]
2018-09-01 12:04 ` [PATCH v2 net-next 4/7] dt-bindings: net: Add lantiq,xrx200-net DT bindings Hauke Mehrtens
2018-09-03 19:46   ` Florian Fainelli
2018-09-04 21:54     ` Hauke Mehrtens
2018-09-01 12:04 ` [PATCH v2 net-next 5/7] net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver Hauke Mehrtens
2018-09-01 18:12   ` Andrew Lunn
2018-09-03 19:24   ` Florian Fainelli
2018-09-04 21:37     ` Hauke Mehrtens
2018-09-01 12:04 ` [PATCH v2 net-next 6/7] dt-bindings: net: dsa: Add lantiq,xrx200-gswip DT bindings Hauke Mehrtens
2018-09-01 12:05 ` [PATCH v2 net-next 7/7] net: dsa: Add Lantiq / Intel DSA driver for vrx200 Hauke Mehrtens
2018-09-01 21:44   ` Hauke Mehrtens
2018-09-03 19:54   ` Florian Fainelli
2018-09-06 21:11     ` Hauke Mehrtens
2018-09-06 21:36       ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b13de4db-f115-e7d5-9efd-0af18f947978@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dev@kresin.me \
    --cc=devicetree@vger.kernel.org \
    --cc=hauke.mehrtens@intel.com \
    --cc=hauke@hauke-m.de \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).