Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3115567pxj; Mon, 17 May 2021 18:10:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaZNP8P0uUSW5dpv8dy5MJxW67O2YpyJWPYBO1KfVG/iu3xCNsSRRaM4AknXSkbma+++Xf X-Received: by 2002:a17:906:3042:: with SMTP id d2mr3107668ejd.234.1621300216136; Mon, 17 May 2021 18:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621300216; cv=none; d=google.com; s=arc-20160816; b=Wggwah/8IGur/88zM3YiuTMR08AwE1rhXwQeDB6X9peS8sWCKPi2Jpc7tVFmm4scKx fZZhmfL2bke6FumdGfjvftJ5fTI3PGAnfuJwUNuKT+rjW7xROjvril7V+ZycL1ehYORP krwIDDVeJ+1zRuD3r2Lrw1rJS/hAUsccfDXxgQsc9p6I41Ut0HPtdsk2tYWezoh5o4mE Jv+HPKEdWACC4qIrhoTWLbFL0jMGnCqehvpxZta+7p2qeizbNz1z3ONQ9PVzYXIMT9xj sReF/w2Lqd8O2Mx99ige7pPza9Hk4ilVvuto6zDvQtfQ3crFLFWatkRaM+r1Krg6DmtH Oejw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m4E85G4RZbtxTYgzydEjZj9grMEQJvo22bQQCleeHt0=; b=A8CQCBKc4z9hQ+Ebu7ScZn0Mjat1YpO9d2K67Jm6GY8GFa7kWZ+vVZj9lV/Gz9pB3T wmC89boZHF4XYSCO/7Piu8DPVeWp4UW0qbyMR/7Xmx/U25ZVj2vO2GvTyz3tRulxqII0 xqcvCDa0pMFt1+oJKUEvClHh3RLp9NQozmeu+FUeXaZZnfVOuRW98AEmdOjp8ybYho/v +9FEmQBrlUA2Aroro4Dn9DDMSPNBLhNl+pS32PO4eFKRuiaFdyauq/x1VpevXzcGCvFS I5YKsCZ8QV6ElKNs3cbAfxiraWI+liRJaxBoMMkluSxbck3Dnn4GOEn9dpBTBLlpC6Oh rWzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0XSmnG38; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si9928487edv.404.2021.05.17.18.09.52; Mon, 17 May 2021 18:10:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0XSmnG38; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239244AbhEQOcR (ORCPT + 99 others); Mon, 17 May 2021 10:32:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:50404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239111AbhEQO0r (ORCPT ); Mon, 17 May 2021 10:26:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8589561584; Mon, 17 May 2021 14:13:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260835; bh=xNbWiAZJ/0F0f5hRzan40mRN57nXhscGbdj2h0dyc8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0XSmnG38yy21myr2+op5bAC1Vv1B37TNcY/nDET91ivMBaXCOSOxdYf0xKrKG/AL/ hRaWUw0mOBbtXmietU9WiCP1XKp0dvlDMQ7oldsO61XCkotHDH9p9LhG/gxK5gX6kL /45/wOKrmWYi1x8jB73S0BLR0xTEDtIussb9aOFY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arkadiusz Kubalewski , Imam Hassan Reza Biswas , Tony Nguyen , Sasha Levin Subject: [PATCH 5.12 246/363] i40e: Remove LLDP frame filters Date: Mon, 17 May 2021 16:01:52 +0200 Message-Id: <20210517140310.905329181@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arkadiusz Kubalewski [ Upstream commit 8085a36db71f54d2592426eb76bdf71b82479140 ] Remove filters from being setup in case of software DCB and allow the LLDP frames to be properly transmitted to the wire. It is not possible to transmit the LLDP frame out of the port, if they are filtered by control VSI. This prohibits software LLDP agent properly communicate its DCB capabilities to the neighbors. Fixes: 4b208eaa8078 ("i40e: Add init and default config of software based DCB") Signed-off-by: Arkadiusz Kubalewski Tested-by: Imam Hassan Reza Biswas Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e.h | 1 - .../net/ethernet/intel/i40e/i40e_ethtool.c | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 42 ------------------- 3 files changed, 44 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 15f93b355099..5069f690cf0b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h @@ -1142,7 +1142,6 @@ static inline bool i40e_is_sw_dcb(struct i40e_pf *pf) return !!(pf->flags & I40E_FLAG_DISABLE_FW_LLDP); } -void i40e_set_lldp_forwarding(struct i40e_pf *pf, bool enable); #ifdef CONFIG_I40E_DCB void i40e_dcbnl_flush_apps(struct i40e_pf *pf, struct i40e_dcbx_config *old_cfg, diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index e8da7339137c..93dd58fda272 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -5288,7 +5288,6 @@ flags_complete: i40e_aq_cfg_lldp_mib_change_event(&pf->hw, false, NULL); i40e_aq_stop_lldp(&pf->hw, true, false, NULL); } else { - i40e_set_lldp_forwarding(pf, false); status = i40e_aq_start_lldp(&pf->hw, false, NULL); if (status) { adq_err = pf->hw.aq.asq_last_status; diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 527023ee4c07..ac4b44fc19f1 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -6878,40 +6878,6 @@ out: } #endif /* CONFIG_I40E_DCB */ -/** - * i40e_set_lldp_forwarding - set forwarding of lldp frames - * @pf: PF being configured - * @enable: if forwarding to OS shall be enabled - * - * Toggle forwarding of lldp frames behavior, - * When passing DCB control from firmware to software - * lldp frames must be forwarded to the software based - * lldp agent. - */ -void i40e_set_lldp_forwarding(struct i40e_pf *pf, bool enable) -{ - if (pf->lan_vsi == I40E_NO_VSI) - return; - - if (!pf->vsi[pf->lan_vsi]) - return; - - /* No need to check the outcome, commands may fail - * if desired value is already set - */ - i40e_aq_add_rem_control_packet_filter(&pf->hw, NULL, ETH_P_LLDP, - I40E_AQC_ADD_CONTROL_PACKET_FLAGS_TX | - I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC, - pf->vsi[pf->lan_vsi]->seid, 0, - enable, NULL, NULL); - - i40e_aq_add_rem_control_packet_filter(&pf->hw, NULL, ETH_P_LLDP, - I40E_AQC_ADD_CONTROL_PACKET_FLAGS_RX | - I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC, - pf->vsi[pf->lan_vsi]->seid, 0, - enable, NULL, NULL); -} - /** * i40e_print_link_message - print link up or down * @vsi: the VSI for which link needs a message @@ -10735,10 +10701,6 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired) */ i40e_add_filter_to_drop_tx_flow_control_frames(&pf->hw, pf->main_vsi_seid); -#ifdef CONFIG_I40E_DCB - if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) - i40e_set_lldp_forwarding(pf, true); -#endif /* CONFIG_I40E_DCB */ /* restart the VSIs that were rebuilt and running before the reset */ i40e_pf_unquiesce_all_vsi(pf); @@ -15753,10 +15715,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) */ i40e_add_filter_to_drop_tx_flow_control_frames(&pf->hw, pf->main_vsi_seid); -#ifdef CONFIG_I40E_DCB - if (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) - i40e_set_lldp_forwarding(pf, true); -#endif /* CONFIG_I40E_DCB */ if ((pf->hw.device_id == I40E_DEV_ID_10G_BASE_T) || (pf->hw.device_id == I40E_DEV_ID_10G_BASE_T4)) -- 2.30.2