public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ujjal Roy <royujjal@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Ido Schimmel <idosch@nvidia.com>,
	David Ahern <dsahern@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, Ujjal Roy <ujjal@alumnux.com>,
	bridge@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] ipv6: mld: rename mldv2_mrc() and add mldv2_qqi()
Date: Fri, 27 Mar 2026 23:49:35 +0800	[thread overview]
Message-ID: <202603272318.WLQHm8jS-lkp@intel.com> (raw)
In-Reply-To: <20260326150742.50289-3-royujjal@gmail.com>

Hi Ujjal,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]
[also build test WARNING on net/main klassert-ipsec/master linus/master v7.0-rc5 next-20260326]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ujjal-Roy/ipv4-igmp-get-rid-of-IGMPV3_-QQIC-MRC-and-simplify-calculation/20260327-083159
base:   net-next/main
patch link:    https://lore.kernel.org/r/20260326150742.50289-3-royujjal%40gmail.com
patch subject: [PATCH 2/4] ipv6: mld: rename mldv2_mrc() and add mldv2_qqi()
config: x86_64-randconfig-121-20260327 (https://download.01.org/0day-ci/archive/20260327/202603272318.WLQHm8jS-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260327/202603272318.WLQHm8jS-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603272318.WLQHm8jS-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   net/ipv6/mcast.c: note: in included file:
   include/net/mld.h:32:43: sparse: sparse: array of flexible structures
>> include/net/mld.h:147:30: sparse: sparse: cast to restricted __be16

vim +147 include/net/mld.h

    29	
    30	struct mld2_report {
    31		struct icmp6hdr		mld2r_hdr;
  > 32		struct mld2_grec	mld2r_grec[];
    33	};
    34	
    35	#define mld2r_type		mld2r_hdr.icmp6_type
    36	#define mld2r_resv1		mld2r_hdr.icmp6_code
    37	#define mld2r_cksum		mld2r_hdr.icmp6_cksum
    38	#define mld2r_resv2		mld2r_hdr.icmp6_dataun.un_data16[0]
    39	#define mld2r_ngrec		mld2r_hdr.icmp6_dataun.un_data16[1]
    40	
    41	/* MLDv2 Query */
    42	struct mld2_query {
    43		struct icmp6hdr		mld2q_hdr;
    44		struct in6_addr		mld2q_mca;
    45	#if defined(__LITTLE_ENDIAN_BITFIELD)
    46		__u8			mld2q_qrv:3,
    47					mld2q_suppress:1,
    48					mld2q_resv2:4;
    49	#elif defined(__BIG_ENDIAN_BITFIELD)
    50		__u8			mld2q_resv2:4,
    51					mld2q_suppress:1,
    52					mld2q_qrv:3;
    53	#else
    54	#error "Please fix <asm/byteorder.h>"
    55	#endif
    56		__u8			mld2q_qqic;
    57		__be16			mld2q_nsrcs;
    58		struct in6_addr		mld2q_srcs[];
    59	};
    60	
    61	#define mld2q_type		mld2q_hdr.icmp6_type
    62	#define mld2q_code		mld2q_hdr.icmp6_code
    63	#define mld2q_cksum		mld2q_hdr.icmp6_cksum
    64	#define mld2q_mrc		mld2q_hdr.icmp6_maxdelay
    65	#define mld2q_resv1		mld2q_hdr.icmp6_dataun.un_data16[1]
    66	
    67	/* RFC3810, 5.1.3. Maximum Response Code:
    68	 *
    69	 * If Maximum Response Code >= 32768, Maximum Response Code represents a
    70	 * floating-point value as follows:
    71	 *
    72	 *  0 1 2 3 4 5 6 7 8 9 A B C D E F
    73	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    74	 * |1| exp |          mant         |
    75	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    76	 */
    77	#define MLDV2_MRC_EXP(value)	(((value) >> 12) & 0x0007)
    78	#define MLDV2_MRC_MAN(value)	((value) & 0x0fff)
    79	
    80	/* RFC3810, 5.1.9. QQIC (Querier's Query Interval Code):
    81	 *
    82	 * If QQIC >= 128, QQIC represents a floating-point value as follows:
    83	 *
    84	 *  0 1 2 3 4 5 6 7
    85	 * +-+-+-+-+-+-+-+-+
    86	 * |1| exp | mant  |
    87	 * +-+-+-+-+-+-+-+-+
    88	 */
    89	#define MLDV2_QQIC_EXP(value)	(((value) >> 4) & 0x07)
    90	#define MLDV2_QQIC_MAN(value)	((value) & 0x0f)
    91	
    92	#define MLD_QQIC_MIN_THRESHOLD	128
    93	#define MLD_MRC_MIN_THRESHOLD	32768UL
    94	#define MLDV1_MRD_MAX_COMPAT	(MLD_MRC_MIN_THRESHOLD - 1)
    95	
    96	#define MLD_MAX_QUEUE		8
    97	#define MLD_MAX_SKBS		32
    98	
    99	/* V2 exponential field decoding */
   100	
   101	/* Calculate Maximum Response Delay from Maximum Response Code
   102	 *
   103	 * RFC3810, 5.1.3. defines the decoding formula:
   104	 *      0 1 2 3 4 5 6 7 8 9 A B C D E F
   105	 *     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   106	 *     |1| exp |          mant         |
   107	 *     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   108	 * Maximum Response Delay = (mant | 0x1000) << (exp+3)
   109	 */
   110	static inline unsigned long mldv2_mrd(const struct mld2_query *mlh2)
   111	{
   112		/* RFC3810, relevant sections:
   113		 *  - 5.1.3. Maximum Response Code
   114		 *  - 9.3. Query Response Interval
   115		 */
   116		unsigned long mc_mrc = ntohs(mlh2->mld2q_mrc);
   117	
   118		if (mc_mrc < MLD_MRC_MIN_THRESHOLD) {
   119			return mc_mrc;
   120		} else {
   121			unsigned long mc_man, mc_exp;
   122	
   123			mc_exp = MLDV2_MRC_EXP(mc_mrc);
   124			mc_man = MLDV2_MRC_MAN(mc_mrc);
   125	
   126			return ((mc_man | 0x1000) << (mc_exp + 3));
   127		}
   128	}
   129	
   130	/* Calculate Querier's Query Interval from Querier's Query Interval Code
   131	 *
   132	 * RFC3810, 5.1.9. defines the decoding formula:
   133	 *      0 1 2 3 4 5 6 7
   134	 *     +-+-+-+-+-+-+-+-+
   135	 *     |1| exp | mant  |
   136	 *     +-+-+-+-+-+-+-+-+
   137	 * QQI = (mant | 0x10) << (exp + 3)
   138	 */
   139	static inline unsigned long mldv2_qqi(const struct mld2_query *mlh2)
   140	{
   141		/* RFC3810, relevant sections:
   142		 *  - 5.1.9. QQIC (Querier's Query Interval Code)
   143		 *  - 9.2. Query Interval
   144		 *  - 9.12. Older Version Querier Present Timeout
   145		 *    (the [Query Interval] in the last Query received)
   146		 */
 > 147		unsigned long qqic = ntohs(mlh2->mld2q_qqic);
   148	
   149		if (qqic < MLD_QQIC_MIN_THRESHOLD) {
   150			return qqic;
   151		} else {
   152			unsigned long mc_man, mc_exp;
   153	
   154			mc_exp = MLDV2_QQIC_EXP(qqic);
   155			mc_man = MLDV2_QQIC_MAN(qqic);
   156	
   157			return ((mc_man | 0x10) << (mc_exp + 3));
   158		}
   159	}
   160	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2026-03-27 15:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 15:07 [PATCH 0/4] net: bridge: mcast: add multicast exponential field encoding Ujjal Roy
2026-03-26 15:07 ` [PATCH 1/4] ipv4: igmp: get rid of IGMPV3_{QQIC,MRC} and simplify calculation Ujjal Roy
2026-03-26 15:07 ` [PATCH 2/4] ipv6: mld: rename mldv2_mrc() and add mldv2_qqi() Ujjal Roy
2026-03-27 15:49   ` kernel test robot [this message]
2026-03-26 15:07 ` [PATCH 3/4] ipv4: igmp: encode multicast exponential fields Ujjal Roy
2026-03-27 12:19   ` Nikolay Aleksandrov
2026-03-26 15:07 ` [PATCH 4/4] ipv6: mld: " Ujjal Roy
2026-03-27  6:41 ` [PATCH 0/4] net: bridge: mcast: add multicast exponential field encoding Nikolay Aleksandrov
2026-03-27 11:31   ` Nikolay Aleksandrov

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=202603272318.WLQHm8jS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=royujjal@gmail.com \
    --cc=ujjal@alumnux.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