From: Andrew Lunn <andrew@lunn.ch>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: davem@davemloft.net, kuba@kernel.org, vivien.didelot@gmail.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Export VTU as devlink region
Date: Mon, 9 Nov 2020 18:44:15 +0100 [thread overview]
Message-ID: <20201109174415.GD1456319@lunn.ch> (raw)
In-Reply-To: <20201109082927.8684-1-tobias@waldekranz.com>
> static void
> @@ -574,9 +670,16 @@ static int mv88e6xxx_setup_devlink_regions_global(struct dsa_switch *ds,
> ops = mv88e6xxx_regions[i].ops;
> size = mv88e6xxx_regions[i].size;
>
> - if (i == MV88E6XXX_REGION_ATU)
> + switch (i) {
> + case MV88E6XXX_REGION_ATU:
> size = mv88e6xxx_num_databases(chip) *
> sizeof(struct mv88e6xxx_devlink_atu_entry);
> + break;
> + case MV88E6XXX_REGION_VTU:
> + size = chip->info->max_vid *
> + sizeof(struct mv88e6xxx_devlink_vtu_entry);
> + break;
> + }
Hi Tobias
Maybe as a follow up patch, add a helper to get
chip->info->max_vid. It seems like many of the other members have a
helper, so it would help keep things consistent.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2020-11-09 17:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 8:29 [PATCH net-next] net: dsa: mv88e6xxx: Export VTU as devlink region Tobias Waldekranz
2020-11-09 17:44 ` Andrew Lunn [this message]
2020-11-10 1:45 ` Jakub Kicinski
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=20201109174415.GD1456319@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@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 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).