From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Vadym Kochan <vadym.kochan@plvision.eu>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@mellanox.com>,
Ido Schimmel <idosch@mellanox.com>, Andrew Lunn <andrew@lunn.ch>,
Oleksandr Mazur <oleksandr.mazur@plvision.eu>,
Serhiy Boiko <serhiy.boiko@plvision.eu>,
Serhiy Pshyk <serhiy.pshyk@plvision.eu>,
Volodymyr Mytnyk <volodymyr.mytnyk@plvision.eu>,
Taras Chornyi <taras.chornyi@plvision.eu>,
Andrii Savka <andrii.savka@plvision.eu>,
Network Development <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Mickey Rachamim <mickeyr@marvell.com>
Subject: Re: [PATCH net v6 5/6] net: marvell: prestera: Add Switchdev driver implementation
Date: Thu, 3 Sep 2020 19:18:59 +0200 [thread overview]
Message-ID: <CA+FuTSfNX0vYL2QmomVBrjXzmQ7WUUmOhtyM_9WfMkSQD1EuPw@mail.gmail.com> (raw)
In-Reply-To: <20200902150442.2779-6-vadym.kochan@plvision.eu>
On Wed, Sep 2, 2020 at 5:07 PM Vadym Kochan <vadym.kochan@plvision.eu> wrote:
>
> The following features are supported:
>
> - VLAN-aware bridge offloading
> - VLAN-unaware bridge offloading
> - FDB offloading (learning, ageing)
> - Switchport configuration
>
> Currently there are some limitations like:
>
> - Only 1 VLAN-aware bridge instance supported
> - FDB ageing timeout parameter is set globally per device
>
> Co-developed-by: Serhiy Boiko <serhiy.boiko@plvision.eu>
> Signed-off-by: Serhiy Boiko <serhiy.boiko@plvision.eu>
> Co-developed-by: Serhiy Pshyk <serhiy.pshyk@plvision.eu>
> Signed-off-by: Serhiy Pshyk <serhiy.pshyk@plvision.eu>
> Co-developed-by: Taras Chornyi <taras.chornyi@plvision.eu>
> Signed-off-by: Taras Chornyi <taras.chornyi@plvision.eu>
> Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
> +int prestera_switchdev_init(struct prestera_switch *sw)
> +{
> + struct prestera_switchdev *swdev;
> + int err;
> +
> + swdev = kzalloc(sizeof(*swdev), GFP_KERNEL);
> + if (!swdev)
> + return -ENOMEM;
> +
> + sw->swdev = swdev;
> + swdev->sw = sw;
> +
> + INIT_LIST_HEAD(&swdev->bridge_list);
> +
> + swdev_wq = alloc_ordered_workqueue("%s_ordered", 0, "prestera_br");
> + if (!swdev_wq) {
> + err = -ENOMEM;
> + goto err_alloc_wq;
> + }
> +
> + err = prestera_switchdev_handler_init(swdev);
> + if (err)
> + goto err_swdev_init;
> +
> + err = prestera_fdb_init(sw);
> + if (err)
> + goto err_fdb_init;
> +
> + return 0;
> +
> +err_fdb_init:
> +err_swdev_init:
> +err_alloc_wq:
> + kfree(swdev);
> +
> + return err;
> +}
> +
> +void prestera_switchdev_fini(struct prestera_switch *sw)
> +{
> + struct prestera_switchdev *swdev = sw->swdev;
> +
> + prestera_fdb_fini(sw);
> + prestera_switchdev_handler_fini(swdev);
> + destroy_workqueue(swdev_wq);
this cleanup is also needed on the error path of prestera_switchdev_init
> + kfree(swdev);
> +}
next prev parent reply other threads:[~2020-09-03 17:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 15:04 [PATCH net v6 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x) Vadym Kochan
2020-09-02 15:04 ` [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices Vadym Kochan
2020-09-03 15:22 ` Willem de Bruijn
2020-09-03 15:35 ` Andy Shevchenko
2020-09-04 9:34 ` Vadym Kochan
2020-09-04 9:32 ` Vadym Kochan
2020-09-04 13:32 ` Andrew Lunn
2020-09-04 15:54 ` Vadym Kochan
2020-09-02 15:04 ` [PATCH net v6 2/6] net: marvell: prestera: Add PCI interface support Vadym Kochan
2020-09-02 15:04 ` [PATCH net v6 3/6] net: marvell: prestera: Add basic devlink support Vadym Kochan
2020-09-02 15:04 ` [PATCH net v6 4/6] net: marvell: prestera: Add ethtool interface support Vadym Kochan
2020-09-02 15:04 ` [PATCH net v6 5/6] net: marvell: prestera: Add Switchdev driver implementation Vadym Kochan
2020-09-03 17:18 ` Willem de Bruijn [this message]
2020-09-04 9:34 ` Vadym Kochan
2020-09-02 15:04 ` [PATCH net v6 6/6] dt-bindings: marvell,prestera: Add description for device-tree bindings Vadym Kochan
2020-09-02 20:57 ` [PATCH net v6 0/6] net: marvell: prestera: Add Switchdev driver for Prestera family ASIC device 98DX3255 (AC3x) Vadym Kochan
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=CA+FuTSfNX0vYL2QmomVBrjXzmQ7WUUmOhtyM_9WfMkSQD1EuPw@mail.gmail.com \
--to=willemdebruijn.kernel@gmail.com \
--cc=andrew@lunn.ch \
--cc=andrii.savka@plvision.eu \
--cc=andy.shevchenko@gmail.com \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mickeyr@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=oleksandr.mazur@plvision.eu \
--cc=serhiy.boiko@plvision.eu \
--cc=serhiy.pshyk@plvision.eu \
--cc=taras.chornyi@plvision.eu \
--cc=vadym.kochan@plvision.eu \
--cc=volodymyr.mytnyk@plvision.eu \
/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).