From: kernel test robot <lkp@intel.com>
To: Leon Romanovsky <leon@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Steffen Klassert <steffen.klassert@secunet.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Veaceslav Falico <vfalico@gmail.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Jonathan Corbet <corbet@lwn.net>,
Jay Vosburgh <j.vosburgh@gmail.com>,
oss-drivers@corigine.com, linux-doc@vger.kernel.org,
Raju Rangoju <rajur@chelsio.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Eric Dumazet <edumazet@google.com>,
netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
Ayush Sawal <ayush.sawal@chelsio.com>,
Simon Horman <simon.horman@corigine.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Paolo Abeni <pabeni@redhat.com>,
Leon Romanovsky <leonro@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [Intel-wired-lan] [PATCH net-next 04/10] net/mlx5e: Fill IPsec state validation failure reason
Date: Tue, 24 Jan 2023 15:59:55 +0800 [thread overview]
Message-ID: <202301241552.GWkgnAH7-lkp@intel.com> (raw)
In-Reply-To: <a5426033528ccef6e0e71fe06b55ae56c5596e85.1674481435.git.leon@kernel.org>
Hi Leon,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Leon-Romanovsky/xfrm-extend-add-policy-callback-to-set-failure-reason/20230123-220422
patch link: https://lore.kernel.org/r/a5426033528ccef6e0e71fe06b55ae56c5596e85.1674481435.git.leon%40kernel.org
patch subject: [Intel-wired-lan] [PATCH net-next 04/10] net/mlx5e: Fill IPsec state validation failure reason
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20230124/202301241552.GWkgnAH7-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/bd6a3bcc8978f551f83f85b9c18d199c71c29d7c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Leon-Romanovsky/xfrm-extend-add-policy-callback-to-set-failure-reason/20230123-220422
git checkout bd6a3bcc8978f551f83f85b9c18d199c71c29d7c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/ drivers/net/ethernet/mellanox/mlx5/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c:276:22: error: use of undeclared identifier 'extackx'; did you mean 'extack'?
NL_SET_ERR_MSG_MOD(extackx, "Unsupported xfrm offload type");
^~~~~~~
extack
include/linux/netlink.h:128:18: note: expanded from macro 'NL_SET_ERR_MSG_MOD'
NL_SET_ERR_MSG((extack), KBUILD_MODNAME ": " msg)
^
include/linux/netlink.h:100:38: note: expanded from macro 'NL_SET_ERR_MSG'
struct netlink_ext_ack *__extack = (extack); \
^
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c:167:34: note: 'extack' declared here
struct netlink_ext_ack *extack)
^
1 error generated.
vim +276 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
164
165 static int mlx5e_xfrm_validate_state(struct mlx5_core_dev *mdev,
166 struct xfrm_state *x,
167 struct netlink_ext_ack *extack)
168 {
169 if (x->props.aalgo != SADB_AALG_NONE) {
170 NL_SET_ERR_MSG_MOD(extack, "Cannot offload authenticated xfrm states");
171 return -EINVAL;
172 }
173 if (x->props.ealgo != SADB_X_EALG_AES_GCM_ICV16) {
174 NL_SET_ERR_MSG_MOD(extack, "Only AES-GCM-ICV16 xfrm state may be offloaded");
175 return -EINVAL;
176 }
177 if (x->props.calgo != SADB_X_CALG_NONE) {
178 NL_SET_ERR_MSG_MOD(extack, "Cannot offload compressed xfrm states");
179 return -EINVAL;
180 }
181 if (x->props.flags & XFRM_STATE_ESN &&
182 !(mlx5_ipsec_device_caps(mdev) & MLX5_IPSEC_CAP_ESN)) {
183 NL_SET_ERR_MSG_MOD(extack, "Cannot offload ESN xfrm states");
184 return -EINVAL;
185 }
186 if (x->props.family != AF_INET &&
187 x->props.family != AF_INET6) {
188 NL_SET_ERR_MSG_MOD(extack, "Only IPv4/6 xfrm states may be offloaded");
189 return -EINVAL;
190 }
191 if (x->id.proto != IPPROTO_ESP) {
192 NL_SET_ERR_MSG_MOD(extack, "Only ESP xfrm state may be offloaded");
193 return -EINVAL;
194 }
195 if (x->encap) {
196 NL_SET_ERR_MSG_MOD(extack, "Encapsulated xfrm state may not be offloaded");
197 return -EINVAL;
198 }
199 if (!x->aead) {
200 NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states without aead");
201 return -EINVAL;
202 }
203 if (x->aead->alg_icv_len != 128) {
204 NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states with AEAD ICV length other than 128bit");
205 return -EINVAL;
206 }
207 if ((x->aead->alg_key_len != 128 + 32) &&
208 (x->aead->alg_key_len != 256 + 32)) {
209 NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states with AEAD key length other than 128/256 bit");
210 return -EINVAL;
211 }
212 if (x->tfcpad) {
213 NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states with tfc padding");
214 return -EINVAL;
215 }
216 if (!x->geniv) {
217 NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states without geniv");
218 return -EINVAL;
219 }
220 if (strcmp(x->geniv, "seqiv")) {
221 NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states with geniv other than seqiv");
222 return -EINVAL;
223 }
224 switch (x->xso.type) {
225 case XFRM_DEV_OFFLOAD_CRYPTO:
226 if (!(mlx5_ipsec_device_caps(mdev) & MLX5_IPSEC_CAP_CRYPTO)) {
227 NL_SET_ERR_MSG_MOD(extack, "Crypto offload is not supported");
228 return -EINVAL;
229 }
230
231 if (x->props.mode != XFRM_MODE_TRANSPORT &&
232 x->props.mode != XFRM_MODE_TUNNEL) {
233 NL_SET_ERR_MSG_MOD(extack, "Only transport and tunnel xfrm states may be offloaded");
234 return -EINVAL;
235 }
236 break;
237 case XFRM_DEV_OFFLOAD_PACKET:
238 if (!(mlx5_ipsec_device_caps(mdev) &
239 MLX5_IPSEC_CAP_PACKET_OFFLOAD)) {
240 NL_SET_ERR_MSG_MOD(extack, "Packet offload is not supported");
241 return -EINVAL;
242 }
243
244 if (x->props.mode != XFRM_MODE_TRANSPORT) {
245 NL_SET_ERR_MSG_MOD(extack, "Only transport xfrm states may be offloaded in packet mode");
246 return -EINVAL;
247 }
248
249 if (x->replay_esn && x->replay_esn->replay_window != 32 &&
250 x->replay_esn->replay_window != 64 &&
251 x->replay_esn->replay_window != 128 &&
252 x->replay_esn->replay_window != 256) {
253 NL_SET_ERR_MSG_MOD(extack, "Unsupported replay window size");
254 return -EINVAL;
255 }
256
257 if (!x->props.reqid) {
258 NL_SET_ERR_MSG_MOD(extack, "Cannot offload without reqid");
259 return -EINVAL;
260 }
261
262 if (x->lft.hard_byte_limit != XFRM_INF ||
263 x->lft.soft_byte_limit != XFRM_INF) {
264 NL_SET_ERR_MSG_MOD(extack, "Device doesn't support limits in bytes");
265 return -EINVAL;
266 }
267
268 if (x->lft.soft_packet_limit >= x->lft.hard_packet_limit &&
269 x->lft.hard_packet_limit != XFRM_INF) {
270 /* XFRM stack doesn't prevent such configuration :(. */
271 NL_SET_ERR_MSG_MOD(extack, "Hard packet limit must be greater than soft one");
272 return -EINVAL;
273 }
274 break;
275 default:
> 276 NL_SET_ERR_MSG_MOD(extackx, "Unsupported xfrm offload type");
277 return -EINVAL;
278 }
279 return 0;
280 }
281
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-01-24 8:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 14:00 [PATCH net-next 00/10] Convert drivers to return XFRM configuration errors through extack Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 01/10] xfrm: extend add policy callback to set failure reason Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 02/10] net/mlx5e: Fill IPsec policy validation " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 03/10] xfrm: extend add state callback to set " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 04/10] net/mlx5e: Fill IPsec state validation " Leon Romanovsky
2023-01-23 17:12 ` Leon Romanovsky
2023-01-24 7:59 ` kernel test robot [this message]
2023-01-23 14:00 ` [PATCH net-next 05/10] netdevsim: " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 06/10] nfp: fill " Leon Romanovsky
2023-01-23 15:09 ` Simon Horman
2023-01-23 16:34 ` Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 07/10] ixgbevf: " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 08/10] ixgbe: " Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 09/10] bonding: " Leon Romanovsky
2023-01-23 23:01 ` [Intel-wired-lan] " Jay Vosburgh
2023-01-24 6:22 ` Leon Romanovsky
2023-01-23 14:00 ` [PATCH net-next 10/10] cxgb4: " Leon Romanovsky
2023-01-24 9:42 ` 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=202301241552.GWkgnAH7-lkp@intel.com \
--to=lkp@intel.com \
--cc=andy@greyhouse.net \
--cc=anthony.l.nguyen@intel.com \
--cc=ayush.sawal@chelsio.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=j.vosburgh@gmail.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=rajur@chelsio.com \
--cc=saeedm@nvidia.com \
--cc=simon.horman@corigine.com \
--cc=steffen.klassert@secunet.com \
--cc=vfalico@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).