From: Aya Levin <ayal@nvidia.com>
To: Jiri Pirko <jiri@resnulli.us>, Ido Schimmel <idosch@idosch.org>
Cc: Aya Levin <ayal@mellanox.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@mellanox.com>,
<netdev@vger.kernel.org>, Moshe Shemesh <moshe@mellanox.com>,
Eran Ben Elisha <eranbe@mellanox.com>,
Ido Schimmel <idosch@mellanox.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next RFC v1 2/4] devlink: Add devlink traps under devlink_ports context
Date: Thu, 10 Sep 2020 09:16:41 +0300 [thread overview]
Message-ID: <6aeba5b9-201f-2abc-05fb-0efdd6394b65@nvidia.com> (raw)
In-Reply-To: <20200908140409.GN2997@nanopsycho.orion>
On 9/8/2020 5:04 PM, Jiri Pirko wrote:
> Sun, Sep 06, 2020 at 05:44:28PM CEST, idosch@idosch.org wrote:
>> On Wed, Sep 02, 2020 at 06:32:12PM +0300, Aya Levin wrote:
>
> [...]
>
>>
>> I understand how this struct allows you to re-use a lot of code between
>> per-device and per-port traps, but it's mainly enabled by the fact that
>> you use the same netlink commands for both per-device and per-port
>> traps. Is this OK?
>>
>> I see this is already done for health reporters, but it's inconsistent
>> with the devlink-param API:
>>
>> DEVLINK_CMD_PARAM_GET
>> DEVLINK_CMD_PARAM_SET
>> DEVLINK_CMD_PARAM_NEW
>> DEVLINK_CMD_PARAM_DEL
>>
>> DEVLINK_CMD_PORT_PARAM_GET
>> DEVLINK_CMD_PORT_PARAM_SET
>> DEVLINK_CMD_PORT_PARAM_NEW
>> DEVLINK_CMD_PORT_PARAM_DEL
>>
>> And also with the general device/port commands:
>>
>> DEVLINK_CMD_GET
>> DEVLINK_CMD_SET
>> DEVLINK_CMD_NEW
>> DEVLINK_CMD_DEL
>>
>> DEVLINK_CMD_PORT_GET
>> DEVLINK_CMD_PORT_SET
>> DEVLINK_CMD_PORT_NEW
>> DEVLINK_CMD_PORT_DEL
>>
>> Wouldn't it be cleaner to add new commands?
>>
>> DEVLINK_CMD_PORT_TRAP_GET
>> DEVLINK_CMD_PORT_TRAP_SET
>> DEVLINK_CMD_PORT_TRAP_NEW
>> DEVLINK_CMD_PORT_TRAP_DEL
>>
>> I think the health API is the exception in this case and therefore might
>> not be the best thing to mimic. IIUC, existing per-port health reporters
>> were exposed as per-device and later moved to be exposed as per-port
>> [1]:
>>
>> "This patchset comes to fix a design issue as some health reporters
>> report on errors and run recovery on device level while the actual
>> functionality is on port level. As for the current implemented devlink
>> health reporters it is relevant only to Tx and Rx reporters of mlx5,
>> which has only one port, so no real effect on functionality, but this
>> should be fixed before more drivers will use devlink health reporters."
>
> Yeah, this slipped trough my fingers unfortunatelly :/ But with
> introduction of per-port health reporters, we could introduce new
> commands, that would be no problem. Pity :/
>
>
>>
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ac4cd4781eacd1fd185c85522e869bd5d3254b96
>>
>> Since we still don't have per-port traps, we can design it better from
>> the start.
>
> I agree. Let's have a separate commands for per-port.
Thanks for your input
I'm preparing V2
>
>
> [...]
>
next prev parent reply other threads:[~2020-09-10 6:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 15:32 [PATCH net-next RFC v1 0/4] Add devlink traps in devlink port context Aya Levin
2020-09-02 15:32 ` [PATCH net-next RFC v1 1/4] devlink: Wrap trap related lists and ops in trap_mngr Aya Levin
2020-09-08 14:12 ` Jiri Pirko
2020-09-02 15:32 ` [PATCH net-next RFC v1 2/4] devlink: Add devlink traps under devlink_ports context Aya Levin
2020-09-06 15:44 ` Ido Schimmel
2020-09-07 16:52 ` Aya Levin
2020-09-08 14:04 ` Jiri Pirko
2020-09-10 6:16 ` Aya Levin [this message]
2020-09-02 15:32 ` [PATCH net-next RFC v1 3/4] devlink: Add hierarchy between traps in device level and port level Aya Levin
2020-09-06 15:58 ` Ido Schimmel
2020-09-07 16:26 ` Aya Levin
2020-09-02 15:32 ` [PATCH net-next RFC v1 4/4] net/mlx5e: Add devlink trap to catch oversize packets Aya Levin
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=6aeba5b9-201f-2abc-05fb-0efdd6394b65@nvidia.com \
--to=ayal@nvidia.com \
--cc=ayal@mellanox.com \
--cc=davem@davemloft.net \
--cc=eranbe@mellanox.com \
--cc=idosch@idosch.org \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=moshe@mellanox.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 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).