All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hariprasad Kelam <hkelam@marvell.com>
To: Andrew Lunn <andrew@lunn.ch>, Sunil Kovvuri <sunil.kovvuri@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Sunil Kovvuri Goutham <sgoutham@marvell.com>,
	Linu Cherian <lcherian@marvell.com>,
	Geethasowjanya Akula <gakula@marvell.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Subbaraya Sundeep Bhatta <sbhatta@marvell.com>
Subject: Re: [net-next PATCH 0/8] configuration support for switch headers & phy
Date: Wed, 31 Mar 2021 14:36:19 +0000	[thread overview]
Message-ID: <CY4PR18MB141480A90AEBB086BAC6D423DE7C9@CY4PR18MB1414.namprd18.prod.outlook.com> (raw)



> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Sunday, March 28, 2021 11:17 PM
> To: Sunil Kovvuri <sunil.kovvuri@gmail.com>
> Cc: Hariprasad Kelam <hkelam@marvell.com>; netdev@vger.kernel.org;
> linux-kernel@vger.kernel.org; kuba@kernel.org; davem@davemloft.net;
> Sunil Kovvuri Goutham <sgoutham@marvell.com>; Linu Cherian
> <lcherian@marvell.com>; Geethasowjanya Akula <gakula@marvell.com>;
> Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Subbaraya Sundeep Bhatta
> <sbhatta@marvell.com>
> Subject: [EXT] Re: [net-next PATCH 0/8] configuration support for switch
> headers & phy
> 
> > The usecase is simple, unlike DSA tag, this 4byte FDSA tag doesn't
> > have a ethertype, so HW cannot recognize this header. If such packers
> > arise, then HW parsing will fail and RSS will not work.
> >
> > Hypothetically if we introduce some communication between MAC driver
> > and DSA driver, wouldn't that also become specific to the device, what
> > generic usecase that communication will have ?
> 
> Hi Sunil
> 
> We need to be careful with wording. Due to history, the Linux kernel uses
> dsa to mean any driver to control an Ethernet switch. It does not imply the
> {E}DSA protocol used by Marvell switches, or even that the switch is a
> Marvell switch.
> 
> netdev_uses_dsa(ndev) will tell you if the MAC is being used to connect to a
> switch. It is set by the Linux DSA core when the switch cluster is setup. That
> could be before or after the MAC is configured up, which makes it a bit hard
> to use, since you don't have a clear indicator when to evaluate to determine
> if you need to change your packet parsing.
> 
> netdev_uses_dsa() looks at ndev->dsa_ptr. This is a pointer to the structure
> which represents the port on the switch the MAC is connected to. In Linux
> DSA terms, this is the CPU port. You can follow dsa_ptr->tag_ops which gives
> you the tagger operations, i.e. those used to add and remove the
> header/trailer. One member of that is proto. This contains the tagging
> protocol, so EDSA, DSA, or potentially FDSA, if that is ever supported. And
> this is all within the core DSA code, so is generic. It should work for any
> tagging protocol used by any switch which Linux DSA supports.
> 
> So actually, everything you need is already present, you don't need a private
> flag. But adding a notifier that the MAC has been connected to a switch and
> ndev->dsa_ptr is set would be useful. We could maybe use NETDEV_CHANGE
> for that, or NETDEV_CHANGELOWERSTATE, since the MAC is below the
> switch slave interfaces.


Hi Andrew,
	We are looking into  DSA to MAC driver communication options, will get back once we have clear picture.

Thanks,
Hariprasad k 
> 
>       Andrew


             reply	other threads:[~2021-03-31 14:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 14:36 Hariprasad Kelam [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-23 18:13 [net-next PATCH 0/8] configuration support for switch headers & phy Hariprasad Kelam
2021-03-23 20:26 ` Andrew Lunn
2021-03-25 10:44   ` Sunil Kovvuri
2021-03-25 12:50     ` Andrew Lunn
2021-03-25 13:02       ` Sunil Kovvuri
2021-03-25 13:21         ` Andrew Lunn
2021-03-28 17:00           ` Sunil Kovvuri
2021-03-28 17:47             ` Andrew Lunn
2021-03-21 12:09 Hariprasad Kelam
2021-03-21 14:15 ` Andrew Lunn

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=CY4PR18MB141480A90AEBB086BAC6D423DE7C9@CY4PR18MB1414.namprd18.prod.outlook.com \
    --to=hkelam@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=gakula@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sunil.kovvuri@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.