Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Subbaraya Sundeep <sbhatta@marvell.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<sgoutham@marvell.com>, <hkelam@marvell.com>,
	<gakula@marvell.com>
Subject: Re: [net-next PATCH 3/3] octeontx2-af: Introduce internal packet switching
Date: Tue, 20 Jul 2021 13:51:33 +0200	[thread overview]
Message-ID: <20210720135133.3873fb4e@cakuba> (raw)
In-Reply-To: <1626685174-4766-4-git-send-email-sbhatta@marvell.com>

On Mon, 19 Jul 2021 14:29:34 +0530, Subbaraya Sundeep wrote:
> +static int rvu_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode,
> +					struct netlink_ext_ack *extack)
> +{
> +	struct rvu_devlink *rvu_dl = devlink_priv(devlink);
> +	struct rvu *rvu = rvu_dl->rvu;
> +	struct rvu_switch *rswitch;
> +
> +	rswitch = &rvu->rswitch;
> +	switch (mode) {
> +	case DEVLINK_ESWITCH_MODE_LEGACY:
> +	case DEVLINK_ESWITCH_MODE_SWITCHDEV:
> +		if (rswitch->mode == mode)
> +			return 0;
> +		rswitch->mode = mode;
> +		if (mode == DEVLINK_ESWITCH_MODE_SWITCHDEV)
> +			rvu_switch_enable(rvu);
> +		else
> +			rvu_switch_disable(rvu);

I don't see the code handle creation and tearing down of representors.

How do things work in this driver? Does AF have a representor netdev
for each VF (that's separate from the VF netdev itself)? Those should
only exist in switchdev mode, while legacy mode should use DMAC
switching.

I think what you want is a textbook VEPA vs VEB switch. Please take a
look at drivers implementing .ndo_bridge_getlink/.ndo_bridge_setlink.

  reply	other threads:[~2021-07-20 11:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19  8:59 [net-next PATCH 0/3] octeontx2-af: Introduce DMAC based switching Subbaraya Sundeep
2021-07-19  8:59 ` [net-next PATCH 1/3] octeontx2-af: Enable transmit side LBK link Subbaraya Sundeep
2021-07-19  8:59 ` [net-next PATCH 2/3] octeontx2-af: Prepare for allocating MCAM rules for AF Subbaraya Sundeep
2021-07-19  8:59 ` [net-next PATCH 3/3] octeontx2-af: Introduce internal packet switching Subbaraya Sundeep
2021-07-20 11:51   ` Jakub Kicinski [this message]
2021-07-20 17:56     ` sundeep subbaraya

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=20210720135133.3873fb4e@cakuba \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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).