netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: netdev@vger.kernel.org, Byron Bradley <byron.bbradley@gmail.com>,
	Jesper Dangaard Brouer <jdb@comx.dk>,
	Tim Ellis <tim.ellis@mac.com>,
	Andy Fleming <afleming@freescale.com>,
	Imre Kaloz <kaloz@openwrt.org>, Nicolas Pitre <nico@cam.org>,
	Dirk Teurlings <dirk@upexia.nl>,
	Peter van Valderen <p.v.valderen@gmail.com>
Subject: Re: [PATCH 3/6] [NET] dsa: add support for original DSA tagging format
Date: Fri, 03 Oct 2008 18:25:59 +0100	[thread overview]
Message-ID: <1223054759.3984.76.camel@achroite> (raw)
In-Reply-To: <20080929023829.GI21560@xi.wantstofly.org>

On Mon, 2008-09-29 at 04:38 +0200, Lennert Buytenhek wrote:
> Most of the DSA switches currently in the field do not support the
> Ethertype DSA tagging format that one of the previous patches added
> support for, but only the original DSA tagging format.
> 
> The original DSA tagging format carries the same information as the
> Ethertype DSA tagging format, but with the difference that it does not
> have an ethertype field.  In other words, when receiving a packet that
> is tagged with an original DSA tag, there is no way of telling in
> eth_type_trans() that this packet is in fact a DSA-tagged packet.
> 
> This patch adds a hook into eth_type_trans() which is only compiled in
> if support for a switch chip that doesn't support Ethertype DSA is
> selected, and which checks whether there is a DSA switch driver
> instance attached to this network device which uses the old tag format.
> If so, it sets the protocol field to ETH_P_DSA without looking at the
> packet, so that the packet ends up in the right place.
[...]

Why should this go in eth_type_trans()?  Why don't you put the hook into
the specific network driver(s) that need it?

For that matter, why should dsa_ptr go in struct net_device and not in
the private state for the specific network drivers that need it?

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2008-10-03 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29  2:38 [PATCH 3/6] [NET] dsa: add support for original DSA tagging format Lennert Buytenhek
2008-10-03 17:25 ` Ben Hutchings [this message]
2008-10-03 19:32   ` Lennert Buytenhek
2008-10-04 11:22     ` Ben Hutchings
2008-10-05 23:56       ` Lennert Buytenhek
2008-10-03 17:36 ` Stephen Hemminger
2008-10-03 19:47   ` Lennert Buytenhek

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=1223054759.3984.76.camel@achroite \
    --to=bhutchings@solarflare.com \
    --cc=afleming@freescale.com \
    --cc=buytenh@wantstofly.org \
    --cc=byron.bbradley@gmail.com \
    --cc=dirk@upexia.nl \
    --cc=jdb@comx.dk \
    --cc=kaloz@openwrt.org \
    --cc=netdev@vger.kernel.org \
    --cc=nico@cam.org \
    --cc=p.v.valderen@gmail.com \
    --cc=tim.ellis@mac.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).