Message ID | 20200923062438.15997-1-saeed@kernel.org |
---|---|
Headers | show |
Series | mlx5 Connection Tracking in NIC mode | expand |
On Tue, 22 Sep 2020 23:24:28 -0700 saeed@kernel.org wrote: > Signed-off-by: Ariel Levkovich <lariel@mellanox.com> > Reviewed-by: Roi Dayan <roid@mellanox.com> > Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> > > fixup! net/mlx5: Refactor tc flow attributes structure > > Init the parse_attr pointer in the beginning of parse_tc_fdb_actions > so it will be valid for the entire method. > > Signed-off-by: Ariel Levkovich <lariel@mellanox.com> > Reviewed-by: Vlad Buslov <vladbu@nvidia.com> > Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> fixup
On Tue, 22 Sep 2020 23:24:23 -0700 saeed@kernel.org wrote: > This series adds the support for connection tracking in NIC mode, > and attached to this series some trivial cleanup patches. > > For more information please see tag log below. > > Please pull and let me know if there is any problem. > This series includes mlx5 updates > > 1) Add support for Connection Tracking offload in NIC mode. > 1.1) Refactor current flow steering chains infrastructure and > updates TC nic mode implementation to use flow table chains. > 1.2) Refactor current Connection Tracking (CT) infrastructure to not > assume E-switch backend, and make the CT layer agnostic to > underlying steering mode (E-Switch/NIC) > 1.3) Plumbing to support CT offload in NIC mode. > > 2) Trivial code cleanups. I'm surprised you need so much surgery here. Am I understanding correctly that you're talking "switchdev mode" vs legacy mode? Could you add a little bit more color about use cases and challenges? What happens to the rules installed in "NIC mode" when you switch to "switchdev mode"? IIUC you don't recreated netdevs on switch, right?
On Wed, 2020-09-23 at 10:21 -0700, Jakub Kicinski wrote: > On Tue, 22 Sep 2020 23:24:23 -0700 saeed@kernel.org wrote: > > This series adds the support for connection tracking in NIC mode, > > and attached to this series some trivial cleanup patches. > > > > For more information please see tag log below. > > > > Please pull and let me know if there is any problem. > > This series includes mlx5 updates > > > > 1) Add support for Connection Tracking offload in NIC mode. > > 1.1) Refactor current flow steering chains infrastructure and > > updates TC nic mode implementation to use flow table chains. > > 1.2) Refactor current Connection Tracking (CT) infrastructure to > > not > > assume E-switch backend, and make the CT layer agnostic to > > underlying steering mode (E-Switch/NIC) > > 1.3) Plumbing to support CT offload in NIC mode. > > > > 2) Trivial code cleanups. > > I'm surprised you need so much surgery here. > Well, we have this problem with most of our switchdev features.. the main issue is Switch model vs NIC model, it is not an easy task to write the offloads to work on any model transparently, since the model is different so HW configuration will be different, we are lucky in this series we managed to re-use 95% of the CT code .. > Am I understanding correctly that you're talking "switchdev mode" vs > legacy mode? > Not exactly legacy, Connection tracking for single NIC mode is the actual use case no sriov involved. But yes we are taking a feature that was only supported on switchdev mode and now can also work in single NIC mode. > Could you add a little bit more color about use cases and challenges? > Will add it to v2. > What happens to the rules installed in "NIC mode" when you switch to > "switchdev mode"? IIUC you don't recreated netdevs on switch, right? We still recreate netdevs, so everything is flushed when netdev is unregistered, we have an upcoming series that will re-use the same netdev to become the uplink representor in switchdev mode, in such case we will block any mode changes until user removes all the TC rules.
On Wed, 2020-09-23 at 10:18 -0700, Jakub Kicinski wrote: > On Tue, 22 Sep 2020 23:24:28 -0700 saeed@kernel.org wrote: > > Signed-off-by: Ariel Levkovich <lariel@mellanox.com> > > Reviewed-by: Roi Dayan <roid@mellanox.com> > > Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> > > > > fixup! net/mlx5: Refactor tc flow attributes structure > > > > Init the parse_attr pointer in the beginning of > > parse_tc_fdb_actions > > so it will be valid for the entire method. > > > > Signed-off-by: Ariel Levkovich <lariel@mellanox.com> > > Reviewed-by: Vlad Buslov <vladbu@nvidia.com> > > Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> > > fixup :-/ .. no clue how this happened will fix, thanks.
From: Saeed Mahameed <saeedm@nvidia.com> Hi Dave, Jakub, This series adds the support for connection tracking in NIC mode, and attached to this series some trivial cleanup patches. For more information please see tag log below. Please pull and let me know if there is any problem. Thanks, Saeed. --- The following changes since commit 748d1c8a425ec529d541f082ee7a81f6a51fa120: Merge branch 'devlink-Use-nla_policy-to-validate-range' (2020-09-22 17:38:42 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-updates-2020-09-22 for you to fetch changes up to 6e9a79f0d4e98ef8b48f2a059fadf755a464bcc7: net/mlx5: remove unreachable return (2020-09-22 23:15:59 -0700) ---------------------------------------------------------------- mlx5-updates-2020-09-22 This series includes mlx5 updates 1) Add support for Connection Tracking offload in NIC mode. 1.1) Refactor current flow steering chains infrastructure and updates TC nic mode implementation to use flow table chains. 1.2) Refactor current Connection Tracking (CT) infrastructure to not assume E-switch backend, and make the CT layer agnostic to underlying steering mode (E-Switch/NIC) 1.3) Plumbing to support CT offload in NIC mode. 2) Trivial code cleanups. ---------------------------------------------------------------- Ariel Levkovich (9): net/mlx5: Refactor multi chains and prios support net/mlx5: Allow ft level ignore for nic rx tables net/mlx5e: Tc nic flows to use mlx5_chains flow tables net/mlx5e: Split nic tc flow allocation and creation net/mlx5: Refactor tc flow attributes structure net/mlx5e: Add tc chains offload support for nic flows net/mlx5e: rework ct offload init messages net/mlx5e: Support CT offload for tc nic flows net/mlx5e: Keep direct reference to mlx5_core_dev in tc ct Denis Efremov (2): net/mlx5e: IPsec: Use kvfree() for memory allocated with kvzalloc() net/mlx5e: Use kfree() to free fd->g in accel_fs_tcp_create_groups() Oz Shlomo (1): net/mlx5e: CT: Use the same counter for both directions Pavel Machek (CIP) (1): net/mlx5: remove unreachable return Qinglang Miao (1): net/mlx5: simplify the return expression of mlx5_ec_init() Saeed Mahameed (1): net/mlx5e: TC: Remove unused parameter from mlx5_tc_ct_add_no_trk_match() drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 7 +- .../net/ethernet/mellanox/mlx5/core/en/rep/tc.c | 22 +- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 525 +++++++----- drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.h | 75 +- .../ethernet/mellanox/mlx5/core/en_accel/fs_tcp.c | 2 +- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 865 +++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 97 +++ .../net/ethernet/mellanox/mlx5/core/esw/chains.c | 944 --------------------- .../net/ethernet/mellanox/mlx5/core/esw/chains.h | 68 -- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 39 +- .../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 309 +++++-- .../mellanox/mlx5/core/eswitch_offloads_termtbl.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 5 +- .../net/ethernet/mellanox/mlx5/core/lib/clock.c | 2 - .../ethernet/mellanox/mlx5/core/lib/fs_chains.c | 911 ++++++++++++++++++++ .../ethernet/mellanox/mlx5/core/lib/fs_chains.h | 93 ++ 21 files changed, 2339 insertions(+), 1658 deletions(-) delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/esw/chains.c delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/esw/chains.h create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.h