From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/net/ethernet/mellanox/mlx5/core/lib/ipsec_fs_roce.c:170 ipsec_fs_roce_rx_rule_setup() warn: missing error code 'err'
Date: Sun, 21 Jan 2024 07:48:41 +0800 [thread overview]
Message-ID: <202401210739.xiykyqPN-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Patrisious Haddad <phaddad@nvidia.com>
CC: Leon Romanovsky <leon@kernel.org>
CC: Mark Bloch <mbloch@nvidia.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 80fc600fafee8ba981da6ed41a572800c8e11de6
commit: f2f0231cfe8905af217e5bf1a08bfb8e4d3b74fb net/mlx5: Configure IPsec steering for ingress RoCEv2 MPV traffic
date: 4 months ago
:::::: branch date: 83 minutes ago
:::::: commit date: 4 months ago
config: x86_64-randconfig-161-20240120 (https://download.01.org/0day-ci/archive/20240121/202401210739.xiykyqPN-lkp@intel.com/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202401210739.xiykyqPN-lkp@intel.com/
smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/lib/ipsec_fs_roce.c:170 ipsec_fs_roce_rx_rule_setup() warn: missing error code 'err'
vim +/err +170 drivers/net/ethernet/mellanox/mlx5/core/lib/ipsec_fs_roce.c
69c08efcbe7fa8 Patrisious Haddad 2023-09-21 121
899577600b25b3 Mark Zhang 2023-01-04 122 static int
899577600b25b3 Mark Zhang 2023-01-04 123 ipsec_fs_roce_rx_rule_setup(struct mlx5_core_dev *mdev,
899577600b25b3 Mark Zhang 2023-01-04 124 struct mlx5_flow_destination *default_dst,
899577600b25b3 Mark Zhang 2023-01-04 125 struct mlx5_ipsec_rx_roce *roce)
899577600b25b3 Mark Zhang 2023-01-04 126 {
f2f0231cfe8905 Patrisious Haddad 2023-09-21 127 bool is_mpv_slave = mlx5_core_is_mp_slave(mdev);
899577600b25b3 Mark Zhang 2023-01-04 128 struct mlx5_flow_destination dst = {};
899577600b25b3 Mark Zhang 2023-01-04 129 MLX5_DECLARE_FLOW_ACT(flow_act);
899577600b25b3 Mark Zhang 2023-01-04 130 struct mlx5_flow_handle *rule;
899577600b25b3 Mark Zhang 2023-01-04 131 struct mlx5_flow_spec *spec;
899577600b25b3 Mark Zhang 2023-01-04 132 int err = 0;
899577600b25b3 Mark Zhang 2023-01-04 133
899577600b25b3 Mark Zhang 2023-01-04 134 spec = kvzalloc(sizeof(*spec), GFP_KERNEL);
899577600b25b3 Mark Zhang 2023-01-04 135 if (!spec)
899577600b25b3 Mark Zhang 2023-01-04 136 return -ENOMEM;
899577600b25b3 Mark Zhang 2023-01-04 137
899577600b25b3 Mark Zhang 2023-01-04 138 ipsec_fs_roce_setup_udp_dport(spec, ROCE_V2_UDP_DPORT);
899577600b25b3 Mark Zhang 2023-01-04 139
899577600b25b3 Mark Zhang 2023-01-04 140 flow_act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 141 if (is_mpv_slave) {
f2f0231cfe8905 Patrisious Haddad 2023-09-21 142 dst.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 143 dst.ft = roce->goto_alias_ft;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 144 } else {
899577600b25b3 Mark Zhang 2023-01-04 145 dst.type = MLX5_FLOW_DESTINATION_TYPE_TABLE_TYPE;
899577600b25b3 Mark Zhang 2023-01-04 146 dst.ft = roce->ft_rdma;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 147 }
899577600b25b3 Mark Zhang 2023-01-04 148 rule = mlx5_add_flow_rules(roce->ft, spec, &flow_act, &dst, 1);
899577600b25b3 Mark Zhang 2023-01-04 149 if (IS_ERR(rule)) {
899577600b25b3 Mark Zhang 2023-01-04 150 err = PTR_ERR(rule);
899577600b25b3 Mark Zhang 2023-01-04 151 mlx5_core_err(mdev, "Fail to add RX RoCE IPsec rule err=%d\n",
899577600b25b3 Mark Zhang 2023-01-04 152 err);
f2f0231cfe8905 Patrisious Haddad 2023-09-21 153 goto out;
899577600b25b3 Mark Zhang 2023-01-04 154 }
899577600b25b3 Mark Zhang 2023-01-04 155
899577600b25b3 Mark Zhang 2023-01-04 156 roce->rule = rule;
899577600b25b3 Mark Zhang 2023-01-04 157
899577600b25b3 Mark Zhang 2023-01-04 158 memset(spec, 0, sizeof(*spec));
899577600b25b3 Mark Zhang 2023-01-04 159 rule = mlx5_add_flow_rules(roce->ft, spec, &flow_act, default_dst, 1);
899577600b25b3 Mark Zhang 2023-01-04 160 if (IS_ERR(rule)) {
899577600b25b3 Mark Zhang 2023-01-04 161 err = PTR_ERR(rule);
899577600b25b3 Mark Zhang 2023-01-04 162 mlx5_core_err(mdev, "Fail to add RX RoCE IPsec miss rule err=%d\n",
899577600b25b3 Mark Zhang 2023-01-04 163 err);
899577600b25b3 Mark Zhang 2023-01-04 164 goto fail_add_default_rule;
899577600b25b3 Mark Zhang 2023-01-04 165 }
899577600b25b3 Mark Zhang 2023-01-04 166
899577600b25b3 Mark Zhang 2023-01-04 167 roce->roce_miss.rule = rule;
899577600b25b3 Mark Zhang 2023-01-04 168
f2f0231cfe8905 Patrisious Haddad 2023-09-21 169 if (!is_mpv_slave)
f2f0231cfe8905 Patrisious Haddad 2023-09-21 @170 goto out;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 171
f2f0231cfe8905 Patrisious Haddad 2023-09-21 172 flow_act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 173 dst.type = MLX5_FLOW_DESTINATION_TYPE_TABLE_TYPE;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 174 dst.ft = roce->ft_rdma;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 175 rule = mlx5_add_flow_rules(roce->nic_master_ft, NULL, &flow_act, &dst,
f2f0231cfe8905 Patrisious Haddad 2023-09-21 176 1);
f2f0231cfe8905 Patrisious Haddad 2023-09-21 177 if (IS_ERR(rule)) {
f2f0231cfe8905 Patrisious Haddad 2023-09-21 178 err = PTR_ERR(rule);
f2f0231cfe8905 Patrisious Haddad 2023-09-21 179 mlx5_core_err(mdev, "Fail to add RX RoCE IPsec rule for alias err=%d\n",
f2f0231cfe8905 Patrisious Haddad 2023-09-21 180 err);
f2f0231cfe8905 Patrisious Haddad 2023-09-21 181 goto fail_add_nic_master_rule;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 182 }
f2f0231cfe8905 Patrisious Haddad 2023-09-21 183 roce->nic_master_rule = rule;
f2f0231cfe8905 Patrisious Haddad 2023-09-21 184
899577600b25b3 Mark Zhang 2023-01-04 185 kvfree(spec);
899577600b25b3 Mark Zhang 2023-01-04 186 return 0;
899577600b25b3 Mark Zhang 2023-01-04 187
f2f0231cfe8905 Patrisious Haddad 2023-09-21 188 fail_add_nic_master_rule:
f2f0231cfe8905 Patrisious Haddad 2023-09-21 189 mlx5_del_flow_rules(roce->roce_miss.rule);
899577600b25b3 Mark Zhang 2023-01-04 190 fail_add_default_rule:
899577600b25b3 Mark Zhang 2023-01-04 191 mlx5_del_flow_rules(roce->rule);
f2f0231cfe8905 Patrisious Haddad 2023-09-21 192 out:
899577600b25b3 Mark Zhang 2023-01-04 193 kvfree(spec);
899577600b25b3 Mark Zhang 2023-01-04 194 return err;
899577600b25b3 Mark Zhang 2023-01-04 195 }
899577600b25b3 Mark Zhang 2023-01-04 196
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-01-20 23:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-20 23:48 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-22 7:17 drivers/net/ethernet/mellanox/mlx5/core/lib/ipsec_fs_roce.c:170 ipsec_fs_roce_rx_rule_setup() warn: missing error code 'err' Dan Carpenter
2024-01-29 9:07 ` Leon Romanovsky
2024-10-21 11:54 kernel test robot
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=202401210739.xiykyqPN-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.