lkml.org 
[lkml]   [2021]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c:361 mlx5e_ipsec_handle_tx_skb() error: uninitialized symbol 'mdata'.
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 28806e4d9b97865b450d72156e9ad229f2067f0b
commit: 5be019040cb7bab4caf152cacadffee91a78b506 net/mlx5e: IPsec: Add Connect-X IPsec Tx data path offload
date: 5 months ago
config: arc-randconfig-m031-20210311 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c:361 mlx5e_ipsec_handle_tx_skb() error: uninitialized symbol 'mdata'.

vim +/mdata +361 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c

5be019040cb7ba Raed Salem 2020-06-16 313
5be019040cb7ba Raed Salem 2020-06-16 314 bool mlx5e_ipsec_handle_tx_skb(struct net_device *netdev,
5be019040cb7ba Raed Salem 2020-06-16 315 struct sk_buff *skb,
5be019040cb7ba Raed Salem 2020-06-16 316 struct mlx5e_accel_tx_ipsec_state *ipsec_st)
5be019040cb7ba Raed Salem 2020-06-16 317 {
5be019040cb7ba Raed Salem 2020-06-16 318 struct mlx5e_priv *priv = netdev_priv(netdev);
5be019040cb7ba Raed Salem 2020-06-16 319 struct xfrm_offload *xo = xfrm_offload(skb);
5be019040cb7ba Raed Salem 2020-06-16 320 struct mlx5e_ipsec_sa_entry *sa_entry;
5be019040cb7ba Raed Salem 2020-06-16 321 struct mlx5e_ipsec_metadata *mdata;
5be019040cb7ba Raed Salem 2020-06-16 322 struct xfrm_state *x;
5be019040cb7ba Raed Salem 2020-06-16 323 struct sec_path *sp;
2ac9cfe78223bb Ilan Tayari 2017-04-18 324
6362a6a04031ca Florian Westphal 2018-12-18 325 sp = skb_sec_path(skb);
6362a6a04031ca Florian Westphal 2018-12-18 326 if (unlikely(sp->len != 1)) {
2ac9cfe78223bb Ilan Tayari 2017-04-18 327 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_bundle);
2ac9cfe78223bb Ilan Tayari 2017-04-18 328 goto drop;
2ac9cfe78223bb Ilan Tayari 2017-04-18 329 }
2ac9cfe78223bb Ilan Tayari 2017-04-18 330
2ac9cfe78223bb Ilan Tayari 2017-04-18 331 x = xfrm_input_state(skb);
2ac9cfe78223bb Ilan Tayari 2017-04-18 332 if (unlikely(!x)) {
2ac9cfe78223bb Ilan Tayari 2017-04-18 333 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_no_state);
2ac9cfe78223bb Ilan Tayari 2017-04-18 334 goto drop;
2ac9cfe78223bb Ilan Tayari 2017-04-18 335 }
2ac9cfe78223bb Ilan Tayari 2017-04-18 336
2ac9cfe78223bb Ilan Tayari 2017-04-18 337 if (unlikely(!x->xso.offload_handle ||
2ac9cfe78223bb Ilan Tayari 2017-04-18 338 (skb->protocol != htons(ETH_P_IP) &&
2ac9cfe78223bb Ilan Tayari 2017-04-18 339 skb->protocol != htons(ETH_P_IPV6)))) {
2ac9cfe78223bb Ilan Tayari 2017-04-18 340 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_not_ip);
2ac9cfe78223bb Ilan Tayari 2017-04-18 341 goto drop;
2ac9cfe78223bb Ilan Tayari 2017-04-18 342 }
2ac9cfe78223bb Ilan Tayari 2017-04-18 343
2ac9cfe78223bb Ilan Tayari 2017-04-18 344 if (!skb_is_gso(skb))
2ac9cfe78223bb Ilan Tayari 2017-04-18 345 if (unlikely(mlx5e_ipsec_remove_trailer(skb, x))) {
2ac9cfe78223bb Ilan Tayari 2017-04-18 346 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_trailer);
2ac9cfe78223bb Ilan Tayari 2017-04-18 347 goto drop;
2ac9cfe78223bb Ilan Tayari 2017-04-18 348 }
5be019040cb7ba Raed Salem 2020-06-16 349
5be019040cb7ba Raed Salem 2020-06-16 350 if (MLX5_CAP_GEN(priv->mdev, fpga)) {
2ac9cfe78223bb Ilan Tayari 2017-04-18 351 mdata = mlx5e_ipsec_add_metadata(skb);
92978ee801844b Tobias Klauser 2017-09-26 352 if (IS_ERR(mdata)) {
2ac9cfe78223bb Ilan Tayari 2017-04-18 353 atomic64_inc(&priv->ipsec->sw_stats.ipsec_tx_drop_metadata);
2ac9cfe78223bb Ilan Tayari 2017-04-18 354 goto drop;
2ac9cfe78223bb Ilan Tayari 2017-04-18 355 }
5be019040cb7ba Raed Salem 2020-06-16 356 }
5be019040cb7ba Raed Salem 2020-06-16 357
cb01008390bb06 Aviad Yehezkel 2018-01-18 358 sa_entry = (struct mlx5e_ipsec_sa_entry *)x->xso.offload_handle;
cb01008390bb06 Aviad Yehezkel 2018-01-18 359 sa_entry->set_iv_op(skb, x, xo);
5be019040cb7ba Raed Salem 2020-06-16 360 if (MLX5_CAP_GEN(priv->mdev, fpga))
2ac9cfe78223bb Ilan Tayari 2017-04-18 @361 mlx5e_ipsec_set_metadata(skb, mdata, xo);
2ac9cfe78223bb Ilan Tayari 2017-04-18 362
5be019040cb7ba Raed Salem 2020-06-16 363 mlx5e_ipsec_set_state(priv, skb, x, xo, ipsec_st);
5be019040cb7ba Raed Salem 2020-06-16 364
f02bac9ad6415e Maxim Mikityanskiy 2019-12-05 365 return true;
2ac9cfe78223bb Ilan Tayari 2017-04-18 366
2ac9cfe78223bb Ilan Tayari 2017-04-18 367 drop:
2ac9cfe78223bb Ilan Tayari 2017-04-18 368 kfree_skb(skb);
f02bac9ad6415e Maxim Mikityanskiy 2019-12-05 369 return false;
2ac9cfe78223bb Ilan Tayari 2017-04-18 370 }
2ac9cfe78223bb Ilan Tayari 2017-04-18 371

:::::: The code at line 361 was first introduced by commit
:::::: 2ac9cfe78223bb88be8cff3b59e0e13551b4e29c net/mlx5e: IPSec, Add Innova IPSec offload TX data path

:::::: TO: Ilan Tayari <ilant@mellanox.com>
:::::: CC: Saeed Mahameed <saeedm@mellanox.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-03-11 23:33    [W:0.028 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site