From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 6EC7325D1E9 for ; Sat, 2 May 2026 06:04:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777701893; cv=none; b=DoJwdgg2NChZiEo9N3JRYxBOajkkesxYsnjl5DpJjqgsz6xil4gIOs36woDYm/iKp45nqtuZL3rdK1CdnoPQhLDIV3YCWAHLHcway8UNn0grZ2BehI4ADa3ar3chkZVEhRgzlY7g1bKEjl78j1T1LCKGqhbgVM+vyfMIZdWv/BE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777701893; c=relaxed/simple; bh=5VSyqBvoid9uFXOUdR772I1+U0H44cOPYNrNocs56ME=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aUcj2z0pouaBWcCp6cM5Id6Zy0kPT4Lyp5ybMPlU/RT+mVThw8UhdKrJ8ecmts14wagZ7HpiNzXGQTjO1Wc+l/I6WLltN59xQXhLykYawZ+zm/fLcsSdglD7ecJlvqtrSepkGPJsWmRWsq6+AtkpgJfPsb5XXfRsWqrbWNUsTJQ= 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=kG2wG6Jn; arc=none smtp.client-ip=209.85.128.46 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="kG2wG6Jn" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4891e86fabeso31550385e9.1 for ; Fri, 01 May 2026 23:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall.org; s=google; t=1777701890; x=1778306690; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ePyFY9tU1bqBeZ/CDvqIuK5nLfvL0Jsqz80NzKwHDyY=; b=kG2wG6Jnt3Cj/nb5Iw7wIlfK0BOqouM0pPso1iI1aFMM1JRGe4Rc5gGpHAUarvapK+ BDO3iNo5ZSsbbTBw0CfT2JK6mLRa9fCWNcREMIHoRVXwquDWZyZ+8aBHJN06BiQ2qSA8 iM+hzH9wyNK157wxeE8yduPVxgWhhFJwF8k0OFEp2Lb5x1ylHUiLo6P6qJQaUQw+mhgp SlZZ0Fi4ufkWTgt5hqgf/GaDt4bNT5uxerA9Lbw0OkvYUAU+Jsr/K7nuJxkVTTUcAyuO ZjYFqpAKaWWYexn/ySeK9mVByCTSCgCAOZSDR0kj4krgJwkwRvFOxJyS7bx4072CwQII 1GOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777701890; x=1778306690; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language: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=ePyFY9tU1bqBeZ/CDvqIuK5nLfvL0Jsqz80NzKwHDyY=; b=GwCaiHWiuKPzF+4fuUAdSHr8GktWTELHu7A0e4hisInimPmrfmVWF/ZOLoT/EsFwrt FKtda5nkfYxlm9jn4nq4UD8d+mKOaiY5vV3PaPufjI5ZK75SeyNVTrUiwzPOGmohIZq+ U9Lnrts7mip//4yidql+80KPps5Y3BAPwLEU8APsqpguYK1c1CpO28RUlS0FbKlVbTzj po7GvWHfqt2LardAne9SIzYFOFu4YYECiEEMsnIzXjD+SZUgqlhUIOye0cOaHymHQDIM jkt3sGsHXW+au+ZR3Xx099FVmd8b/8KsX8B3L9S7vNH6lik/RpXlvtpSuaZz/zebsSMm fecg== X-Forwarded-Encrypted: i=1; AFNElJ+eo83hb0jmhcvuBeNPwA2t5j5iR3vzszstBCckmSM9ALDs8XH+ka0zXZoM13G9m0QH1AkJLExyvxrAXZ4=@vger.kernel.org X-Gm-Message-State: AOJu0YzxGy01T6a/R5UsF0OgjzrnH3lgrCKk1Tz4SA7+DLCNn/E+XnZl SIfxaK7ScY/Ha7xyNNKuI8ALQqgB4tThw4LsaBN9zpap73wNLZ2oJQowUbIfyrzEKZM= X-Gm-Gg: AeBDiesUUGCZ45yE3gEXrbLaXPtOx4vGAeEKV9HEY3eC8exSmLcL+Yp4dqraroc2oNL 6TiIiBu66m4vHpBsh2TkCixP8muo915KzZRNO7EjKcsLcZgfeG3XJhBsrlfvADAjN/HAEr9kwiX 1xDvQju2sIA0YoGUgPCeC+3MLz2TLG+PCslp0PGRbASgfIuwTZijZ/W7ZS41F2IQj/cmDRAnBqL DnwzMcNWzuTzRP2l11hIJ0hDJY3ZRdyveZDH296mbM36Dmo/t6olNKGc0fzuixoH/XsIceAa0Ey XHmG7Mdpy2rfHjS8rB9CGcWimGNr+1UZlB/HhrVHwN4838CEBZRlme7Ip+oLAUbX3/Ac4urPVDS a633Ut8i+rVbTi9g9hTikzsWlZh4LpiYnDIarGArvWvDyE6LIe/xW8CMvQBgfhxw2f9z1iIzO4M vElvl3qOU7F35iPMnxI5EL951OkqvdTl6jZWyVW8P2qQp45x3DUoufiuzo1ZaxaXBws7emsSgj9 Mg= X-Received: by 2002:a05:600c:4450:b0:487:4eb:d125 with SMTP id 5b1f17b1804b1-48a98639086mr24427625e9.9.1777701889840; Fri, 01 May 2026 23:04:49 -0700 (PDT) Received: from [192.168.0.161] (78-154-15-182.ip.btc-net.bg. [78.154.15.182]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a8eb69698sm185348695e9.1.2026.05.01.23.04.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 May 2026 23:04:49 -0700 (PDT) Message-ID: Date: Sat, 2 May 2026 09:04:48 +0300 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 net-next v5 3/5] ipv4: igmp: encode multicast exponential fields Content-Language: en-US, bg To: Ujjal Roy , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Ido Schimmel , David Ahern , Shuah Khan , Andy Roulin , Yong Wang , Petr Machata Cc: Ujjal Roy , bridge@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20260501173130.3486-1-royujjal@gmail.com> <20260501173130.3486-4-royujjal@gmail.com> From: Nikolay Aleksandrov In-Reply-To: <20260501173130.3486-4-royujjal@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 01/05/2026 20:31, Ujjal Roy wrote: > In IGMP, MRC and QQIC fields are not correctly encoded > when generating query packets. Since the receiver of the > query interprets these fields using the IGMPv3 floating- > point decoding logic, any value that exceeds the linear > threshold is incorrectly parsed as an exponential value, > leading to an incorrect interval calculation. > > Encode and assign the corresponding protocol fields during > query generation. Introduce the logic to dynamically > calculate the exponent and mantissa using bit-scan (fls). > This ensures MRC and QQIC fields (8-bit) are properly > encoded when transmitting query packets with intervals > that exceed their respective linear threshold value of > 128 (for MRT/QQI). > > RFC3376: for both MRC and QQIC, values >= 128 represent > the same floating-point encoding as follows: > 0 1 2 3 4 5 6 7 > +-+-+-+-+-+-+-+-+ > |1| exp | mant | > +-+-+-+-+-+-+-+-+ > > Reviewed-by: Ido Schimmel > Signed-off-by: Ujjal Roy > --- > include/linux/igmp.h | 87 +++++++++++++++++++++++++++++++++++++++ > net/bridge/br_multicast.c | 14 +++---- > 2 files changed, 93 insertions(+), 8 deletions(-) > Reviewed-by: Nikolay Aleksandrov