From nobody Thu Dec 19 17:31:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YDczB677wz5hVCX; Thu, 19 Dec 2024 17:31:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YDczB2mMtz462B; Thu, 19 Dec 2024 17:31:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-844d67eb693so78231539f.3; Thu, 19 Dec 2024 09:31:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734629476; x=1735234276; darn=freebsd.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=TJLUuVtcW/LYTAfY7TGzO0itJtkzJ10UOINpysQ/gCc=; b=MEOejgh0g1/Xfq66ib+VjNV+ahmEuVwHcgjKPTKjEticMN/i0xK15KIanM0hHh0sCr PiFwQ3TmtkfGZQZ4/pLVBLyGq7lgEhlXPnBTdVQszIHjZFuIdxMWjBx5yDURaI1jc3Yb e6QD4hkawP3qYp8wtNkldzV9DTuieyeiKLU4drk2F6Nv1x3DOyyO27//gErDlvqZSAH5 X6k6ScDQrxgoIaCdRckAR2Li57tyQqxTs30NGLOc6tLFuTK/ghkfGCZUi7c89nXvieGC M0st7H6YxC4dmNMWWwusE7kGad9UNHEdo/3jAPazP565hU/Rylh2qy+g+PF3TBsLm7Xa q/TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734629476; x=1735234276; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TJLUuVtcW/LYTAfY7TGzO0itJtkzJ10UOINpysQ/gCc=; b=w3Rf0IRZx4Wz3LxVthA0d/1wnN2fYjROZyeb1t9Vj2GlsYw2FkaU4swGaO2b0JTXS3 tDJ1/eI65mmA+RblXIKF0M44SXMEfU+uct1unjR2JgejcoN2iXtp5b2Ag0bZ63N7jUc6 NQ0BSBLXiiYzZF0VURj8xthaZEkaoZH+Do+hCTBRDUEpnepIx5o0lst+oFmjPujl974+ VjYoD7MOPE+aEJkP1EpOJzPOKrL6isAMcRIDvUjE+D1CynFnH799BRqM0slefnSU8oOQ y3B5xfk0NvK5xOmpIlXKmDJxJqZuyRhdAsz8DJ+m4OrsqK0H4ciX12CLxzfo6976UhcU qEaQ== X-Forwarded-Encrypted: i=1; AJvYcCUNaD3SrDyH2FhhGfsJU/atCO+7I0G7esc67ZfEoP8d7xKWv5ujNuzqsDGoAKCfFdz1VtuY3uD/RlP13ffVbvA/PQnd@freebsd.org, AJvYcCXQmn4xN1XlD4SBmMREijbnN90h9MRGV/shS1+RpqfeRTsXK5LTdWC90HfHXyy8io8eiB6VO1gh6f4NgzxzsKSISUK6u8g=@freebsd.org X-Gm-Message-State: AOJu0YxzgVG/ImNCVvuEGT95rDeAsToUFTEggMOQr8xtKhzzm0rHBPSv nY+e2YEXD7N1Ie0/+4pwq7Imyz7v2nwm3TOP66Dwl7QutOm5v66bCl1U3A== X-Gm-Gg: ASbGncvgHY4tvxGVziXygcTke6V14kPleO8SJ9tJ041b3pspSm5XKSaQ0eY6miVudTp UjR4wTpqCJS8YA3tElPkQQuS2Res+g8vbljIsBo6DyLfGRQM18GB6zssKO7nCrBOmasKM9hedCe tgpeB/N4lV6yKE59UnGgYfLpzQtZk0nUe46OBlaiJmr4OUaSt5dloYlSQp4QmrIFg7IYVJ450Vp Y4a2zD+SZqQlh0VdBjpizukJOvu0cJUmqw7GvVidoi/fDJAzJB2+cENxVykLQmCdPs8nOA= X-Google-Smtp-Source: AGHT+IEUW4Dm9+3/sX3ytZnA06G5yDB4ysEE68FOaOXNdtgfK00euel5CAs3tdBHaqLPK1dDTtpkcA== X-Received: by 2002:a05:6e02:188e:b0:3a7:e147:812f with SMTP id e9e14a558f8ab-3c011b4944cmr43412485ab.12.1734629476460; Thu, 19 Dec 2024 09:31:16 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3c0df949b76sm4164165ab.35.2024.12.19.09.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 09:31:14 -0800 (PST) Date: Thu, 19 Dec 2024 12:31:11 -0500 From: Mark Johnston To: Ravi Pokala Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: 38663adb6144 - main - Revert "ixl: fix multicast filters handling" Message-ID: References: <202412191349.4BJDnnV4010675@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4YDczB2mMtz462B X-Spamd-Bar: ---- On Thu, Dec 19, 2024 at 09:08:26AM -0800, Ravi Pokala wrote: > > Revert "ixl: fix multicast filters handling" > > Yes, but *why*? Per the linked pull request and bug report, it breaks igmp-proxy for an unknown reason. > -Ravi (rpokala@) > > -----Original Message----- > From: > on behalf of Mark Johnston > > Date: Thursday, December 19, 2024 at 05:49 > To: >, >, > > Subject: git: 38663adb6144 - main - Revert "ixl: fix multicast filters handling" > > > The branch main has been updated by markj: > > > URL: https://cgit.FreeBSD.org/src/commit/?id=38663adb61440bd659fb457909782b71ba8806fa > > > commit 38663adb61440bd659fb457909782b71ba8806fa > Author: Franco Fichtner > > AuthorDate: 2024-12-11 14:08:40 +0000 > Commit: Mark Johnston > > CommitDate: 2024-12-19 13:49:30 +0000 > > > Revert "ixl: fix multicast filters handling" > > > This reverts commit 89e73359424a338a7900a4854ad7439f5848ebb8. > > > PR: 281125 > Reviewed by: Krzysztof Galazka > > MFC after: 3 days > Pull Request: https://github.com/freebsd/freebsd-src/pull/1545 > --- > sys/dev/ixl/ixl_pf_main.c | 97 +++++------------------------------------------ > 1 file changed, 10 insertions(+), 87 deletions(-) > > > diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c > index 9755136df848..1752efc02fff 100644 > --- a/sys/dev/ixl/ixl_pf_main.c > +++ b/sys/dev/ixl/ixl_pf_main.c > @@ -593,15 +593,6 @@ ixl_add_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt) > * Routines for multicast and vlan filter management. > * > *********************************************************************/ > - > -/** > - * ixl_add_multi - Add multicast filters to the hardware > - * @vsi: The VSI structure > - * > - * In case number of multicast filters in the IFP exceeds 127 entries, > - * multicast promiscuous mode will be enabled and the filters will be removed > - * from the hardware > - */ > void > ixl_add_multi(struct ixl_vsi *vsi) > { > @@ -609,20 +600,14 @@ ixl_add_multi(struct ixl_vsi *vsi) > struct i40e_hw *hw = vsi->hw; > int mcnt = 0; > struct ixl_add_maddr_arg cb_arg; > - enum i40e_status_code status; > > > IOCTL_DEBUGOUT("ixl_add_multi: begin"); > > > mcnt = if_llmaddr_count(ifp); > if (__predict_false(mcnt >= MAX_MULTICAST_ADDR)) { > - status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, > - TRUE, NULL); > - if (status != I40E_SUCCESS) > - if_printf(ifp, "Failed to enable multicast promiscuous " > - "mode, status: %s\n", i40e_stat_str(hw, status)); > - else > - if_printf(ifp, "Enabled multicast promiscuous mode\n"); > - /* Delete all existing MC filters */ > + i40e_aq_set_vsi_multicast_promiscuous(hw, > + vsi->seid, TRUE, NULL); > + /* delete all existing MC filters */ > ixl_del_multi(vsi, true); > return; > } > @@ -648,92 +633,30 @@ ixl_match_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt) > return (0); > } > > > -/** > - * ixl_dis_multi_promisc - Disable multicast promiscuous mode > - * @vsi: The VSI structure > - * @vsi_mcnt: Number of multicast filters in the VSI > - * > - * Disable multicast promiscuous mode based on number of entries in the IFP > - * and the VSI, then re-add multicast filters. > - * > - */ > -static void > -ixl_dis_multi_promisc(struct ixl_vsi *vsi, int vsi_mcnt) > -{ > - struct ifnet *ifp = vsi->ifp; > - struct i40e_hw *hw = vsi->hw; > - int ifp_mcnt = 0; > - enum i40e_status_code status; > - > - ifp_mcnt = if_llmaddr_count(ifp); > - /* > - * Equal lists or empty ifp list mean the list has not been changed > - * and in such case avoid disabling multicast promiscuous mode as it > - * was not previously enabled. Case where multicast promiscuous mode has > - * been enabled is when vsi_mcnt == 0 && ifp_mcnt > 0. > - */ > - if (ifp_mcnt == vsi_mcnt || ifp_mcnt == 0 || > - ifp_mcnt >= MAX_MULTICAST_ADDR) > - return; > - > - status = i40e_aq_set_vsi_multicast_promiscuous(hw, vsi->seid, > - FALSE, NULL); > - if (status != I40E_SUCCESS) { > - if_printf(ifp, "Failed to disable multicast promiscuous " > - "mode, status: %s\n", i40e_stat_str(hw, status)); > - > - return; > - } > - > - if_printf(ifp, "Disabled multicast promiscuous mode\n"); > - > - ixl_add_multi(vsi); > -} > - > -/** > - * ixl_del_multi - Delete multicast filters from the hardware > - * @vsi: The VSI structure > - * @all: Bool to determine if all the multicast filters should be removed > - * > - * In case number of multicast filters in the IFP drops to 127 entries, > - * multicast promiscuous mode will be disabled and the filters will be reapplied > - * to the hardware. > - */ > void > ixl_del_multi(struct ixl_vsi *vsi, bool all) > { > - int to_del_cnt = 0, vsi_mcnt = 0; > + struct ixl_ftl_head to_del; > if_t ifp = vsi->ifp; > struct ixl_mac_filter *f, *fn; > - struct ixl_ftl_head to_del; > + int mcnt = 0; > > > IOCTL_DEBUGOUT("ixl_del_multi: begin"); > > > LIST_INIT(&to_del); > /* Search for removed multicast addresses */ > LIST_FOREACH_SAFE(f, &vsi->ftl, ftle, fn) { > - if ((f->flags & IXL_FILTER_MC) == 0) > - continue; > - > - /* Count all the multicast filters in the VSI for comparison */ > - vsi_mcnt++; > - > - if (!all && if_foreach_llmaddr(ifp, ixl_match_maddr, f) != 0) > + if ((f->flags & IXL_FILTER_MC) == 0 || > + (!all && (if_foreach_llmaddr(ifp, ixl_match_maddr, f) == 0))) > continue; > > > LIST_REMOVE(f, ftle); > LIST_INSERT_HEAD(&to_del, f, ftle); > - to_del_cnt++; > - } > - > - if (to_del_cnt > 0) { > - ixl_del_hw_filters(vsi, &to_del, to_del_cnt); > - return; > + mcnt++; > } > > > - ixl_dis_multi_promisc(vsi, vsi_mcnt); > - > - IOCTL_DEBUGOUT("ixl_del_multi: end"); > + if (mcnt > 0) > + ixl_del_hw_filters(vsi, &to_del, mcnt); > } > > > void > > > >