From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E19C39FCD1 for ; Fri, 27 Mar 2026 06:41:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774593724; cv=none; b=k08d9HCWiS6U0qvx7H/QAU63Pc1REVCQmnCgNS42IMq37dGY8TEp29AQXJER653Zc39bn5BTEfmTWBt9WPhHjbsR5jIUThYV+g4w7XLTGBVAGP9ifzQ9o/jIzAVtKFtijbdg+4uk+xK3bcJ5aqk1ZDClUfzQ9F7G2c6RavoZTkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774593724; c=relaxed/simple; bh=1DVvOQT5/+mxb45EgxQ4bZpWpNiDNjMj+xSlK6Mjv9U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=utLQnFoylHNh2idj3Fds7Vs6U5YOYyA9UjT4j6TFsWNnEzbyWJGxhuFc6DMTb2qXBuhNNvbzpSNhJ3jgElbofmGWEWWNJ0VLBFZkTrpFuHKwPSiN4JWpHAZl8ADtCNHkclPnzPVvfYmb2A/FoFlp/J4pFdDRzvMuH2QpNkWtRgw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=blackwall.org; spf=none smtp.mailfrom=blackwall.org; dkim=pass (2048-bit key) header.d=blackwall.org header.i=@blackwall.org header.b=SR6FD+wu; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=blackwall.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=blackwall.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=blackwall.org header.i=@blackwall.org header.b="SR6FD+wu" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-482f454be5bso25839995e9.0 for ; Thu, 26 Mar 2026 23:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall.org; s=google; t=1774593711; x=1775198511; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=n1sYbnxelvK9CSuY2huaIB6H/ZT6wbmHM2ZeRybED1c=; b=SR6FD+wuqPzTfyRQC6bbpZHIf8uftPjGtLmJUY1lt1oIut/utxYsVoqxY4bBmAWD+E dZB/rEWv6jzrmeWUylt8H0z6tFjkWzQX7NZvaAA2ju3pCQmtJA24nH64YnjJrojmEtiu jwbTUnzQ3ZeHn2Q4w9SptYJdq2u4R8HByaQ8qAB756HUGaxqtd46WgaTidjha7KqA1Hm AcApR2AaTzOozJsS/FTvkT6MpwkfJnKL+ISj0F6ShS1JSskmVR4jgNNFiaNyCus2CMMb 4uBoG/nrj5zRX2IOzkxI6cMdcy0CdQHs8fgVF5lNROGcZPJe2p6rVtRAr/hMO2ghEAE6 7ESg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774593711; x=1775198511; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=n1sYbnxelvK9CSuY2huaIB6H/ZT6wbmHM2ZeRybED1c=; b=k1QcK7Ejs1u0dT0x9ANbjeCd0N/116Uh3QCJZH2nhtdyPe+x1hQeM/TbbAbxcwW3+B a7T3C1UDNL5IQitm5yDm/1k2O7tKACFVb/W11KQ4AmYbeWR/gT4HYD6valzo0OneP9wT kfMEdH1QQFL0S3AR5e3EEtV2yPE2bQBmKQpMRDssa2abW2l6kY5N4Tfdtw9DyW3zA06s 8qRLfeRpTXdihb8Advus+GXiaV4t+NdA2RjoqBb/ZePgGVPeQdiYKt5LAhSNyKkKmLXQ U0AiGYE2cceDaB2wFByhh60uyiuBit5LIW2ej7cKJ2AsUqrWGDvQlHlufl1MpzDwXQe5 XmHg== X-Forwarded-Encrypted: i=1; AJvYcCUgRDLQBbJfzJm0qIyyOIS50uLfN4nXXvaH0tpyXFxLOG+wu3IwRpuU+sEfYK+E2J7bC5yIcLat7CSyK6s=@vger.kernel.org X-Gm-Message-State: AOJu0Yz8BPcaxrUyU6sMAGCbpvXCUE6K8Cyn52lqE5+QTwfRQR2JEuoC uZJzli9xznPuieIFUlRnjrkLyHb6Ox7QshEkucwQjiYIdRnB/TebAUd1YYDt+dFnbZE= X-Gm-Gg: ATEYQzwZi1lrhMAF+pRf35pk9r0LgnY6F/hR69VeKBmaLu4CSHZunClkqWN/0541b11 SN0xIntM1erv1qEmiZrGvZCLOSUH89REEIsSFWOew4dHWw28AgncMMxttGgw5W5yb5oCoKxqBrd d6aMcthtYC3wWHCKTUvKzUmDzjnC3yBBF3oQfUOFPCfmWeMVo7a7O/Z1Me+45hQvJguAn9TiGBC f/XYr7hzl4phvORDmIO7lt8me/MwcBnaXNkebm/awHbkesl4N02sNUmdnvKP4pcYG7Dj0dgdgFp 04rt+bUwax5gFt6cGoT+p8LjzoSVNKayAnPbmeUOFzk++JWY3h4QvX9BktK4G8QrjRBfS/tR7uy OlmTTUERxvIjNnYPty/YEIQGkpM7n/o7rAg2XDqBUlLJbmHx4jWUH7aIhlIz+O6MaohVqSTnSPY 4evCswm/yJsIJrN0DHW1vmWabqeBl50vs15++U6y0nIAcNgs0h7dNSDbrmdC5nSzsc X-Received: by 2002:a05:600c:45cd:b0:486:fbc4:8fe2 with SMTP id 5b1f17b1804b1-4872912dd2bmr13078015e9.15.1774593711374; Thu, 26 Mar 2026 23:41:51 -0700 (PDT) Received: from [192.168.0.161] (78-154-15-142.ip.btc-net.bg. [78.154.15.142]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48722c9f58fsm121225245e9.11.2026.03.26.23.41.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Mar 2026 23:41:50 -0700 (PDT) Message-ID: <0e8a01b0-9b83-405f-a0ad-7b335135962f@blackwall.org> Date: Fri, 27 Mar 2026 08:41:49 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/4] net: bridge: mcast: add multicast exponential field encoding To: Ujjal Roy , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Ido Schimmel , David Ahern Cc: Ujjal Roy , bridge@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260326150742.50289-1-royujjal@gmail.com> Content-Language: en-US From: Nikolay Aleksandrov In-Reply-To: <20260326150742.50289-1-royujjal@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 26/03/2026 17:07, Ujjal Roy wrote: > Description: > This series addresses a mismatch in how multicast query > intervals and response codes are handled across IPv4 (IGMPv3) > and IPv6 (MLDv2). While decoding logic currently exists, > the corresponding encoding logic is missing during query > packet generation. This leads to incorrect intervals being > transmitted when values exceed their linear thresholds. > > The patches introduce a unified floating-point encoding > approach based on RFC3376 and RFC3810, ensuring that large > intervals are correctly represented in QQIC and MRC fields > using the exponent-mantissa format. > > Key Changes: > * ipv4: igmp: get rid of IGMPV3_{QQIC,MRC} and simplify calculation > Removes legacy macros in favor of a cleaner, unified > calculation for retrieving intervals from encoded fields, > improving code maintainability. > > * ipv6: mld: rename mldv2_mrc() and add mldv2_qqi() > Standardizes MLDv2 terminology by renaming mldv2_mrc() > to mldv2_mrd() (Maximum Response Delay) and introducing > a new API mldv2_qqi for QQI calculation, improving code > readability. > > * ipv4: igmp: encode multicast exponential fields > Introduces the logic to dynamically calculate the exponent > and mantissa using bit-scan (fls). This ensures QQIC and > MRC fields (8-bit) are properly encoded when transmitting > query packets with intervals that exceed their respective > linear threshold value of 128 (for QQI/MRT). > > * ipv6: mld: encode multicast exponential fields > Applies similar encoding logic for MLDv2. This ensures > QQIC (8-bit) and MRC (16-bit) fields are properly encoded > when transmitting query packets with intervals that exceed > their respective linear thresholds (128 for QQI; 32768 > for MRD). > > Impact: > These changes ensure that multicast queriers and listeners > stay synchronized on timing intervals, preventing protocol > timeouts or premature group membership expiration caused > by incorrectly formatted packet headers. > Can you add selftests which cover these cases?