lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2a08a1aa-6aa8-c361-f825-458d234d975f@ucloud.cn>
Date:   Thu, 21 Nov 2019 15:30:14 +0800
From:   wenxu <wenxu@...oud.cn>
To:     paulb@...lanox.com
Cc:     pablo@...filter.org, netdev@...r.kernel.org, markb@...lanox.com
Subject: Question about flow table offload in mlx5e

Hi  paul,

The flow table offload in the mlx5e is based on TC_SETUP_FT.


It is almost the same as TC_SETUP_BLOCK.

It just set MLX5_TC_FLAG(FT_OFFLOAD) flags and change cls_flower.common.chain_index = FDB_FT_CHAIN;

In following codes line 1380 and 1392

1368 static int mlx5e_rep_setup_ft_cb(enum tc_setup_type type, void *type_data,
1369                                  void *cb_priv)
1370 {
1371         struct flow_cls_offload *f = type_data;
1372         struct flow_cls_offload cls_flower;
1373         struct mlx5e_priv *priv = cb_priv;
1374         struct mlx5_eswitch *esw;
1375         unsigned long flags;
1376         int err;
1377
1378         flags = MLX5_TC_FLAG(INGRESS) |
1379                 MLX5_TC_FLAG(ESW_OFFLOAD) |
1380                 MLX5_TC_FLAG(FT_OFFLOAD);
1381         esw = priv->mdev->priv.eswitch;
1382
1383         switch (type) {
1384         case TC_SETUP_CLSFLOWER:
1385                 if (!mlx5_eswitch_prios_supported(esw) || f->common.chain_index)
1386                         return -EOPNOTSUPP;
1387
1388                 /* Re-use tc offload path by moving the ft flow to the
1389                  * reserved ft chain.
1390                  */
1391                 memcpy(&cls_flower, f, sizeof(*f));
1392                cls_flower.common.chain_index = FDB_FT_CHAIN;
1393                 err = mlx5e_rep_setup_tc_cls_flower(priv, &cls_flower, flags);
1394                 memcpy(&f->stats, &cls_flower.stats, sizeof(f->stats));


I want to add tunnel offload support in the flow table, I  add some patches in nf_flow_table_offload.

Also add the indr setup support in the mlx driver. And Now I can  flow table offload with decap.


But I meet a problem with the encap.  The encap rule can be added in hardware  successfully But it can't be offloaded.

But I think the rule I added is correct.  If I mask the line 1392. The rule also can be add success and can be offloaded.

So there are some limit for encap operation for FT_OFFLOAD in FDB_FT_CHAIN?


BR

wenxu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ