From: Leon Romanovsky <leon@kernel.org>
To: Saeed Mahameed <saeedm@nvidia.com>
Cc: Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Jason Gunthorpe <jgg@nvidia.com>,
linux-netdev <netdev@vger.kernel.org>,
Raed Salem <raeds@nvidia.com>
Subject: Re: [PATCH net-next v1 09/17] net/mlx5: Simplify HW context interfaces by using SA entry
Date: Sun, 1 May 2022 11:56:35 +0300 [thread overview]
Message-ID: <Ym5LQyPYeHQx2UNW@unreal> (raw)
In-Reply-To: <20220422221935.xf5yvx5i3yt55qho@sx1>
On Fri, Apr 22, 2022 at 03:19:35PM -0700, Saeed Mahameed wrote:
> On 19 Apr 13:13, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > SA context logic used multiple structures to store same data
> > over and over. By simplifying the SA context interfaces, we
> > can remove extra structs.
> >
> > Reviewed-by: Raed Salem <raeds@nvidia.com>
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > ---
> > .../mellanox/mlx5/core/en_accel/ipsec.c | 50 ++---
> > .../mellanox/mlx5/core/en_accel/ipsec.h | 27 ++-
> > .../mlx5/core/en_accel/ipsec_offload.c | 182 ++++--------------
> > 3 files changed, 62 insertions(+), 197 deletions(-)
<...>
> > -static int mlx5_create_ipsec_obj(struct mlx5_core_dev *mdev,
> > - struct mlx5_ipsec_obj_attrs *attrs,
> > - u32 *ipsec_id)
>
> I don't see the point of this change, the function used to receive two
> primitives, now it receives a god object, just to grab the two primitives,
> this breaks the bottom up design, and contaminates the code with the
> sa_entry container, that only should be visible by high-level ipsec module and
> the SA DB, all service and low level functions should remain as
> primitive and simple as possible to avoid future abuse and reduce the scope
> and visibility of god objects. The effect of this change is more severe in
> the next patch.
>
> Even within the same file, i still recommend a monotonic bottom up
> design and keep the complex objects usage to as few hight level functions
> as possible.
Like you said: same file, same data copied in and out - it is not bottom
up design for me.
Thanks
next prev parent reply other threads:[~2022-05-01 8:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 10:13 [PATCH net-next v1 00/17] Extra IPsec cleanup Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 01/17] net/mlx5: Simplify IPsec flow steering init/cleanup functions Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 02/17] net/mlx5: Check IPsec TX flow steering namespace in advance Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 03/17] net/mlx5: Don't hide fallback to software IPsec in FS code Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 04/17] net/mlx5: Reduce useless indirection in IPsec FS add/delete flows Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 05/17] net/mlx5: Store IPsec ESN update work in XFRM state Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 06/17] net/mlx5: Remove useless validity check Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 07/17] net/mlx5: Merge various control path IPsec headers into one file Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 08/17] net/mlx5: Remove indirections from esp functions Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 09/17] net/mlx5: Simplify HW context interfaces by using SA entry Leon Romanovsky
2022-04-22 22:19 ` Saeed Mahameed
2022-05-01 8:56 ` Leon Romanovsky [this message]
2022-04-19 10:13 ` [PATCH net-next v1 10/17] net/mlx5: Clean IPsec FS add/delete rules Leon Romanovsky
2022-04-22 22:25 ` Saeed Mahameed
2022-05-01 8:52 ` Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 11/17] net/mlx5: Make sure that no dangling IPsec FS pointers exist Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 12/17] net/mlx5: Don't advertise IPsec netdev support for non-IPsec device Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 13/17] net/mlx5: Simplify IPsec capabilities logic Leon Romanovsky
2022-04-22 22:42 ` Saeed Mahameed
2022-05-01 8:42 ` Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 14/17] net/mlx5: Remove not-supported ICV length Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 15/17] net/mlx5: Cleanup XFRM attributes struct Leon Romanovsky
2022-04-22 22:45 ` Saeed Mahameed
2022-05-01 8:05 ` Leon Romanovsky
2022-04-19 10:13 ` [PATCH net-next v1 16/17] net/mlx5: Allow future addition of IPsec object modifiers Leon Romanovsky
2022-04-22 22:46 ` Saeed Mahameed
2022-04-19 10:13 ` [PATCH net-next v1 17/17] net/mlx5: Don't perform lookup after already known sec_path Leon Romanovsky
2022-04-22 17:49 ` [PATCH net-next v1 00/17] Extra IPsec cleanup Leon Romanovsky
2022-04-22 17:55 ` Saeed Mahameed
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=Ym5LQyPYeHQx2UNW@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=raeds@nvidia.com \
--cc=saeedm@nvidia.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 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.