Re: [bug report] net/mlx5e: TC, map tc action cookie to a hw counter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Dan,

We will send fixes.

On 16/02/2023 17:55, Dan Carpenter wrote:
Hello Oz Shlomo,

The patch d13674b1d14c: "net/mlx5e: TC, map tc action cookie to a hw
counter" from Feb 12, 2023, leads to the following Smatch static
checker warning:

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:5032 mlx5e_stats_flower() warn: missing error code here? 'mlx5e_tc_get_counter()' failed. 'err' = '0'
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:5019 mlx5e_stats_flower() warn: missing error code here? 'mlx5_devcom_get_peer_data()' failed. 'err' = '0'
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:5379 mlx5e_tc_nic_init() warn: missing error code 'err'
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:5515 mlx5e_tc_esw_init() warn: missing error code 'err'

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
     5375         mlx5e_tc_debugfs_init(tc, mlx5e_fs_get_debugfs_root(priv->fs));
     5376
     5377         tc->action_stats_handle = mlx5e_tc_act_stats_create();
     5378         if (IS_ERR(tc->action_stats_handle))
--> 5379                 goto err_act_stats;

This one is clearly a bug, but I'm not really sure about the first two
warnings.

     5380
     5381         return 0;
     5382
     5383 err_act_stats:
     5384         unregister_netdevice_notifier_dev_net(priv->netdev,
     5385                                               &tc->netdevice_nb,
     5386                                               &tc->netdevice_nn);
     5387 err_reg:
     5388         mlx5_tc_ct_clean(tc->ct);
     5389         mlx5e_tc_post_act_destroy(tc->post_act);
     5390         mlx5_chains_destroy(tc->chains);
     5391 err_miss:
     5392         mlx5e_tc_nic_destroy_miss_table(priv);
     5393 err_chains:
     5394         mapping_destroy(chains_mapping);
     5395 err_mapping:
     5396         rhashtable_destroy(&tc->ht);
     5397         return err;
     5398 }

regards,
dan carpenter



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux