From: Ido Schimmel <idosch@idosch.org>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, jiri@mellanox.com, idosch@mellanox.com,
kjlx@templeofstupid.com
Subject: Re: [RFC net-next 4/4] mlxsw: spectrum_router: Add extack message for RIF and VRF overflow
Date: Wed, 11 Oct 2017 17:13:30 +0300 [thread overview]
Message-ID: <20171011141330.GC11653@splinter> (raw)
In-Reply-To: <1507653665-20540-5-git-send-email-dsahern@gmail.com>
On Tue, Oct 10, 2017 at 09:41:05AM -0700, David Ahern wrote:
> Add extack argument down to mlxsw_sp_rif_create and mlxsw_sp_vr_create
> to set an error message on RIF or VR overflow. Now an overflow of
> either resource the use gets an informative message as opposed to
s/the/in/ ?
> failing with EBUSY.
>
> Signed-off-by: David Ahern <dsahern@gmail.com>
One comment below, but other than that:
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
I'll run some tests and report if anything blows up.
Thanks David!
> ---
> .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 114 +++++++++++++--------
> 1 file changed, 69 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
> index 7d53fdf2c0a8..ec4d313b9eca 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
> @@ -731,14 +731,17 @@ static struct mlxsw_sp_fib *mlxsw_sp_vr_fib(const struct mlxsw_sp_vr *vr,
> }
>
> static struct mlxsw_sp_vr *mlxsw_sp_vr_create(struct mlxsw_sp *mlxsw_sp,
> - u32 tb_id)
> + u32 tb_id,
> + struct netlink_ext_ack *extack)
> {
> struct mlxsw_sp_vr *vr;
> int err;
>
> vr = mlxsw_sp_vr_find_unused(mlxsw_sp);
> - if (!vr)
> + if (!vr) {
> + NL_SET_ERR_MSG(extack, "spectrum: Exceeded number of supported VRF");
Maybe:
"spectrum: Exceeded number of supported VRF devices"
To be consistent with previously added:
"spectrum: Exceeded number of supported LAG devices"
> return ERR_PTR(-EBUSY);
> + }
> vr->fib4 = mlxsw_sp_fib_create(vr, MLXSW_SP_L3_PROTO_IPV4);
> if (IS_ERR(vr->fib4))
> return ERR_CAST(vr->fib4);
> @@ -775,14 +778,15 @@ static void mlxsw_sp_vr_destroy(struct mlxsw_sp_vr *vr)
> vr->fib4 = NULL;
> }
next prev parent reply other threads:[~2017-10-11 14:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 16:41 [RFC net-next 0/4] mlxsw: spectrum_router: Add extack messages for RIF and VRF overflow David Ahern
2017-10-10 16:41 ` [RFC net-next 1/4] net: ipv6: Make inet6addr_validator a blocking notifier David Ahern
2017-10-10 19:32 ` David Ahern
2017-10-11 13:08 ` Ido Schimmel
2017-10-11 21:13 ` David Miller
2017-10-11 21:56 ` David Ahern
2017-10-10 16:41 ` [RFC net-next 2/4] net: Add extack to validator_info structs used for address notifier David Ahern
2017-10-11 13:37 ` Ido Schimmel
2017-10-10 16:41 ` [RFC net-next 3/4] mlxsw: spectrum: router: Add support for address validator notifier David Ahern
2017-10-11 13:54 ` Ido Schimmel
2017-10-11 15:19 ` David Ahern
2017-10-10 16:41 ` [RFC net-next 4/4] mlxsw: spectrum_router: Add extack message for RIF and VRF overflow David Ahern
2017-10-11 14:13 ` Ido Schimmel [this message]
2017-10-11 15:07 ` David Ahern
2017-10-11 15:10 ` Ido Schimmel
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=20171011141330.GC11653@splinter \
--to=idosch@idosch.org \
--cc=dsahern@gmail.com \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=kjlx@templeofstupid.com \
--cc=netdev@vger.kernel.org \
/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.