From: Andrew Lunn <andrew@lunn•ch>
To: Florian Fainelli <f.fainelli@gmail•com>
Cc: netdev@vger•kernel.org, davem@davemloft•net,
vivien.didelot@savoirfairelinux•com
Subject: Re: [PATCH net-next v2] net: dsa: Mock-up driver
Date: Fri, 31 Mar 2017 18:56:22 +0200 [thread overview]
Message-ID: <20170331165622.GK12814@lunn.ch> (raw)
In-Reply-To: <3952b60b-1c24-487d-7f8d-9cad5dc69dcc@gmail.com>
> Actually we do not, because netdev_uses_dsa() returns true only when
> dst->rcv is different from NULL. When dst->rcv is NULL we completely
> bypass the DSA hook in eth_type_trans() and everything is well, the
> master network device is the one receiving packets.
static inline bool netdev_uses_dsa(struct net_device *dev)
{
#if IS_ENABLED(CONFIG_NET_DSA)
if (dev->dsa_ptr != NULL)
return dsa_uses_tagged_protocol(dev->dsa_ptr);
#endif
return false;
}
and
static inline bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst)
{
return dst->rcv != NULL;
}
Yep, i just needed to dig further...
Thanks
Andrew
next prev parent reply other threads:[~2017-03-31 16:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 1:43 [PATCH net-next v2] net: dsa: Mock-up driver Florian Fainelli
2017-03-31 16:06 ` Andrew Lunn
2017-03-31 16:40 ` Florian Fainelli
2017-03-31 16:56 ` Andrew Lunn [this message]
2017-04-01 19:40 ` David Miller
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=20170331165622.GK12814@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=f.fainelli@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=vivien.didelot@savoirfairelinux$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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