[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210720135133.3873fb4e@cakuba>
Date: Tue, 20 Jul 2021 13:51:33 +0200
From: Jakub Kicinski <kuba@...nel.org>
To: Subbaraya Sundeep <sbhatta@...vell.com>
Cc: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<sgoutham@...vell.com>, <hkelam@...vell.com>, <gakula@...vell.com>
Subject: Re: [net-next PATCH 3/3] octeontx2-af: Introduce internal packet
switching
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.
Powered by blists - more mailing lists