From: kernel test robot <lkp@intel.com>
To: Toms Atteka <cpp.code.lv@gmail.com>, netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Toms Atteka <cpp.code.lv@gmail.com>
Subject: Re: [PATCH net-next v3] net: openvswitch: IPv6: Add IPv6 extension header support
Date: Sat, 4 Sep 2021 10:18:48 +0800 [thread overview]
Message-ID: <202109041054.Uh4croSi-lkp@intel.com> (raw)
In-Reply-To: <20210903205332.707905-1-cpp.code.lv@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6668 bytes --]
Hi Toms,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Toms-Atteka/net-openvswitch-IPv6-Add-IPv6-extension-header-support/20210904-045602
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 29ce8f9701072fc221d9c38ad952de1a9578f95c
config: i386-randconfig-a012-20210904 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1104e3258b5064e7110cc297e2cec60ac9acfc0a)
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/0day-ci/linux/commit/dbd8852a931c7418829a31dcd51d8b2245f27f79
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Toms-Atteka/net-openvswitch-IPv6-Add-IPv6-extension-header-support/20210904-045602
git checkout dbd8852a931c7418829a31dcd51d8b2245f27f79
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/openvswitch/flow.c:268:6: warning: no previous prototype for function 'get_ipv6_ext_hdrs' [-Wmissing-prototypes]
void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
^
net/openvswitch/flow.c:268:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
^
static
1 warning generated.
vim +/get_ipv6_ext_hdrs +268 net/openvswitch/flow.c
241
242 /**
243 * Parses packet and sets IPv6 extension header flags.
244 *
245 * skb buffer where extension header data starts in packet
246 * nh ipv6 header
247 * ext_hdrs flags are stored here
248 *
249 * OFPIEH12_UNREP is set if more than one of a given IPv6 extension header
250 * is unexpectedly encountered. (Two destination options headers may be
251 * expected and would not cause this bit to be set.)
252 *
253 * OFPIEH12_UNSEQ is set if IPv6 extension headers were not in the order
254 * preferred (but not required) by RFC 2460:
255 *
256 * When more than one extension header is used in the same packet, it is
257 * recommended that those headers appear in the following order:
258 * IPv6 header
259 * Hop-by-Hop Options header
260 * Destination Options header
261 * Routing header
262 * Fragment header
263 * Authentication header
264 * Encapsulating Security Payload header
265 * Destination Options header
266 * upper-layer header
267 */
> 268 void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
269 {
270 u8 next_type = nh->nexthdr;
271 unsigned int start = skb_network_offset(skb) + sizeof(struct ipv6hdr);
272 int dest_options_header_count = 0;
273
274 *ext_hdrs = 0;
275
276 while (ipv6_ext_hdr(next_type)) {
277 struct ipv6_opt_hdr _hdr, *hp;
278
279 switch (next_type) {
280 case IPPROTO_NONE:
281 *ext_hdrs |= OFPIEH12_NONEXT;
282 /* stop parsing */
283 return;
284
285 case IPPROTO_ESP:
286 if (*ext_hdrs & OFPIEH12_ESP)
287 *ext_hdrs |= OFPIEH12_UNREP;
288 if ((*ext_hdrs & ~(OFPIEH12_HOP | OFPIEH12_DEST |
289 OFPIEH12_ROUTER | IPPROTO_FRAGMENT |
290 OFPIEH12_AUTH | OFPIEH12_UNREP)) ||
291 dest_options_header_count >= 2) {
292 *ext_hdrs |= OFPIEH12_UNSEQ;
293 }
294 *ext_hdrs |= OFPIEH12_ESP;
295 break;
296
297 case IPPROTO_AH:
298 if (*ext_hdrs & OFPIEH12_AUTH)
299 *ext_hdrs |= OFPIEH12_UNREP;
300 if ((*ext_hdrs &
301 ~(OFPIEH12_HOP | OFPIEH12_DEST | OFPIEH12_ROUTER |
302 IPPROTO_FRAGMENT | OFPIEH12_UNREP)) ||
303 dest_options_header_count >= 2) {
304 *ext_hdrs |= OFPIEH12_UNSEQ;
305 }
306 *ext_hdrs |= OFPIEH12_AUTH;
307 break;
308
309 case IPPROTO_DSTOPTS:
310 if (dest_options_header_count == 0) {
311 if (*ext_hdrs &
312 ~(OFPIEH12_HOP | OFPIEH12_UNREP))
313 *ext_hdrs |= OFPIEH12_UNSEQ;
314 *ext_hdrs |= OFPIEH12_DEST;
315 } else if (dest_options_header_count == 1) {
316 if (*ext_hdrs &
317 ~(OFPIEH12_HOP | OFPIEH12_DEST |
318 OFPIEH12_ROUTER | OFPIEH12_FRAG |
319 OFPIEH12_AUTH | OFPIEH12_ESP |
320 OFPIEH12_UNREP)) {
321 *ext_hdrs |= OFPIEH12_UNSEQ;
322 }
323 } else {
324 *ext_hdrs |= OFPIEH12_UNREP;
325 }
326 dest_options_header_count++;
327 break;
328
329 case IPPROTO_FRAGMENT:
330 if (*ext_hdrs & OFPIEH12_FRAG)
331 *ext_hdrs |= OFPIEH12_UNREP;
332 if ((*ext_hdrs & ~(OFPIEH12_HOP |
333 OFPIEH12_DEST |
334 OFPIEH12_ROUTER |
335 OFPIEH12_UNREP)) ||
336 dest_options_header_count >= 2) {
337 *ext_hdrs |= OFPIEH12_UNSEQ;
338 }
339 *ext_hdrs |= OFPIEH12_FRAG;
340 break;
341
342 case IPPROTO_ROUTING:
343 if (*ext_hdrs & OFPIEH12_ROUTER)
344 *ext_hdrs |= OFPIEH12_UNREP;
345 if ((*ext_hdrs & ~(OFPIEH12_HOP |
346 OFPIEH12_DEST |
347 OFPIEH12_UNREP)) ||
348 dest_options_header_count >= 2) {
349 *ext_hdrs |= OFPIEH12_UNSEQ;
350 }
351 *ext_hdrs |= OFPIEH12_ROUTER;
352 break;
353
354 case IPPROTO_HOPOPTS:
355 if (*ext_hdrs & OFPIEH12_HOP)
356 *ext_hdrs |= OFPIEH12_UNREP;
357 /* OFPIEH12_HOP is set to 1 if a hop-by-hop IPv6
358 * extension header is present as the first
359 * extension header in the packet.
360 */
361 if (*ext_hdrs == 0)
362 *ext_hdrs |= OFPIEH12_HOP;
363 else
364 *ext_hdrs |= OFPIEH12_UNSEQ;
365 break;
366
367 default:
368 return;
369 }
370
371 hp = skb_header_pointer(skb, start, sizeof(_hdr), &_hdr);
372 if (!hp)
373 break;
374 next_type = hp->nexthdr;
375 start += ipv6_optlen(hp);
376 };
377 }
378
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37119 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH net-next v3] net: openvswitch: IPv6: Add IPv6 extension header support
Date: Sat, 04 Sep 2021 10:18:48 +0800 [thread overview]
Message-ID: <202109041054.Uh4croSi-lkp@intel.com> (raw)
In-Reply-To: <20210903205332.707905-1-cpp.code.lv@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6849 bytes --]
Hi Toms,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Toms-Atteka/net-openvswitch-IPv6-Add-IPv6-extension-header-support/20210904-045602
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 29ce8f9701072fc221d9c38ad952de1a9578f95c
config: i386-randconfig-a012-20210904 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1104e3258b5064e7110cc297e2cec60ac9acfc0a)
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/0day-ci/linux/commit/dbd8852a931c7418829a31dcd51d8b2245f27f79
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Toms-Atteka/net-openvswitch-IPv6-Add-IPv6-extension-header-support/20210904-045602
git checkout dbd8852a931c7418829a31dcd51d8b2245f27f79
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/openvswitch/flow.c:268:6: warning: no previous prototype for function 'get_ipv6_ext_hdrs' [-Wmissing-prototypes]
void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
^
net/openvswitch/flow.c:268:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
^
static
1 warning generated.
vim +/get_ipv6_ext_hdrs +268 net/openvswitch/flow.c
241
242 /**
243 * Parses packet and sets IPv6 extension header flags.
244 *
245 * skb buffer where extension header data starts in packet
246 * nh ipv6 header
247 * ext_hdrs flags are stored here
248 *
249 * OFPIEH12_UNREP is set if more than one of a given IPv6 extension header
250 * is unexpectedly encountered. (Two destination options headers may be
251 * expected and would not cause this bit to be set.)
252 *
253 * OFPIEH12_UNSEQ is set if IPv6 extension headers were not in the order
254 * preferred (but not required) by RFC 2460:
255 *
256 * When more than one extension header is used in the same packet, it is
257 * recommended that those headers appear in the following order:
258 * IPv6 header
259 * Hop-by-Hop Options header
260 * Destination Options header
261 * Routing header
262 * Fragment header
263 * Authentication header
264 * Encapsulating Security Payload header
265 * Destination Options header
266 * upper-layer header
267 */
> 268 void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
269 {
270 u8 next_type = nh->nexthdr;
271 unsigned int start = skb_network_offset(skb) + sizeof(struct ipv6hdr);
272 int dest_options_header_count = 0;
273
274 *ext_hdrs = 0;
275
276 while (ipv6_ext_hdr(next_type)) {
277 struct ipv6_opt_hdr _hdr, *hp;
278
279 switch (next_type) {
280 case IPPROTO_NONE:
281 *ext_hdrs |= OFPIEH12_NONEXT;
282 /* stop parsing */
283 return;
284
285 case IPPROTO_ESP:
286 if (*ext_hdrs & OFPIEH12_ESP)
287 *ext_hdrs |= OFPIEH12_UNREP;
288 if ((*ext_hdrs & ~(OFPIEH12_HOP | OFPIEH12_DEST |
289 OFPIEH12_ROUTER | IPPROTO_FRAGMENT |
290 OFPIEH12_AUTH | OFPIEH12_UNREP)) ||
291 dest_options_header_count >= 2) {
292 *ext_hdrs |= OFPIEH12_UNSEQ;
293 }
294 *ext_hdrs |= OFPIEH12_ESP;
295 break;
296
297 case IPPROTO_AH:
298 if (*ext_hdrs & OFPIEH12_AUTH)
299 *ext_hdrs |= OFPIEH12_UNREP;
300 if ((*ext_hdrs &
301 ~(OFPIEH12_HOP | OFPIEH12_DEST | OFPIEH12_ROUTER |
302 IPPROTO_FRAGMENT | OFPIEH12_UNREP)) ||
303 dest_options_header_count >= 2) {
304 *ext_hdrs |= OFPIEH12_UNSEQ;
305 }
306 *ext_hdrs |= OFPIEH12_AUTH;
307 break;
308
309 case IPPROTO_DSTOPTS:
310 if (dest_options_header_count == 0) {
311 if (*ext_hdrs &
312 ~(OFPIEH12_HOP | OFPIEH12_UNREP))
313 *ext_hdrs |= OFPIEH12_UNSEQ;
314 *ext_hdrs |= OFPIEH12_DEST;
315 } else if (dest_options_header_count == 1) {
316 if (*ext_hdrs &
317 ~(OFPIEH12_HOP | OFPIEH12_DEST |
318 OFPIEH12_ROUTER | OFPIEH12_FRAG |
319 OFPIEH12_AUTH | OFPIEH12_ESP |
320 OFPIEH12_UNREP)) {
321 *ext_hdrs |= OFPIEH12_UNSEQ;
322 }
323 } else {
324 *ext_hdrs |= OFPIEH12_UNREP;
325 }
326 dest_options_header_count++;
327 break;
328
329 case IPPROTO_FRAGMENT:
330 if (*ext_hdrs & OFPIEH12_FRAG)
331 *ext_hdrs |= OFPIEH12_UNREP;
332 if ((*ext_hdrs & ~(OFPIEH12_HOP |
333 OFPIEH12_DEST |
334 OFPIEH12_ROUTER |
335 OFPIEH12_UNREP)) ||
336 dest_options_header_count >= 2) {
337 *ext_hdrs |= OFPIEH12_UNSEQ;
338 }
339 *ext_hdrs |= OFPIEH12_FRAG;
340 break;
341
342 case IPPROTO_ROUTING:
343 if (*ext_hdrs & OFPIEH12_ROUTER)
344 *ext_hdrs |= OFPIEH12_UNREP;
345 if ((*ext_hdrs & ~(OFPIEH12_HOP |
346 OFPIEH12_DEST |
347 OFPIEH12_UNREP)) ||
348 dest_options_header_count >= 2) {
349 *ext_hdrs |= OFPIEH12_UNSEQ;
350 }
351 *ext_hdrs |= OFPIEH12_ROUTER;
352 break;
353
354 case IPPROTO_HOPOPTS:
355 if (*ext_hdrs & OFPIEH12_HOP)
356 *ext_hdrs |= OFPIEH12_UNREP;
357 /* OFPIEH12_HOP is set to 1 if a hop-by-hop IPv6
358 * extension header is present as the first
359 * extension header in the packet.
360 */
361 if (*ext_hdrs == 0)
362 *ext_hdrs |= OFPIEH12_HOP;
363 else
364 *ext_hdrs |= OFPIEH12_UNSEQ;
365 break;
366
367 default:
368 return;
369 }
370
371 hp = skb_header_pointer(skb, start, sizeof(_hdr), &_hdr);
372 if (!hp)
373 break;
374 next_type = hp->nexthdr;
375 start += ipv6_optlen(hp);
376 };
377 }
378
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37119 bytes --]
next prev parent reply other threads:[~2021-09-04 2:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 20:53 [PATCH net-next v3] net: openvswitch: IPv6: Add IPv6 extension header support Toms Atteka
2021-09-03 23:25 ` Jakub Kicinski
2021-09-04 0:39 ` kernel test robot
2021-09-04 0:39 ` kernel test robot
2021-09-04 2:18 ` kernel test robot [this message]
2021-09-04 2:18 ` kernel test robot
2021-09-04 12:35 ` kernel test robot
2021-09-04 12:35 ` kernel test robot
2021-09-04 12:36 ` [RFC PATCH] net: openvswitch: IPv6: get_ipv6_ext_hdrs() can be static kernel test robot
2021-09-04 12:36 ` 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=202109041054.Uh4croSi-lkp@intel.com \
--to=lkp@intel.com \
--cc=cpp.code.lv@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
/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.