From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AD884F8A3 for ; Thu, 18 Apr 2024 18:58:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713466736; cv=none; b=gfREoNPptrLiknfcVJq9S+dAL/H75apqXerk1/R71Xf6bcdykn3+R/ztFoPAbOfX/zKs7iydZcmrNp1iA8XhlYSdOjjJ1M1K4XXpQN9VrweOyzxIvKuCpK5+1oE/z8WU6mYHS+772VCuwfIc5VKEoPxjxgCVKdtfW8TCUrQjbXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713466736; c=relaxed/simple; bh=OJfrxBgGuxh2+UES3b54DAD8DCWEFeHj2lVIMs8BWl4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mrL7RTVjCPp4F8wXSYD+wPlRyRpM+Z7/VFMOk6HvE5sV1QVeSu2Or6I8xkr1fhdD5ZFOl/JAhqEGF9a21HDNzSJujCrFtxCAlv/GI8SUV/b64R4giAfKAfysTWvFYgQ8pYCdc3tMoCSw55YjVbkB2pqcoEYqQHDx9JX4XUp3crA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kvzJ3FAL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kvzJ3FAL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 741F0C113CC; Thu, 18 Apr 2024 18:58:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713466735; bh=OJfrxBgGuxh2+UES3b54DAD8DCWEFeHj2lVIMs8BWl4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kvzJ3FALQKZutgAccVqLPrreL1NnjF0Y0heaInmrFqB05NwlbHZklHSC3v7GHFWTC JnScCOPWFYTKIli0iXyxxJVZlQ+u2NzTrrzO324tNF8pWQFWMFsI62o58ITvJAhLcx OEi6byn5ePG/8X+TxxccIa90rWmh52MfzOTolyVoW8IqLJR/Alcswh1i00iNY3fNSE O1ntRBnzNy5gwecIBkmrqZgLp6XuXDEeqxm/nSax0oh+TKYv1Pn7r8vJVPI2YiWiHn PvoLYbttabkf92OimyMsgn2PNM3+yquv0+96CzJY/nR5t7mZvfGXUUanWWyTcX9hZe ouMyzm3AcFnZw== Date: Thu, 18 Apr 2024 19:58:51 +0100 From: Simon Horman To: Jiawen Wu Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, rmk+kernel@armlinux.org.uk, andrew@lunn.ch, netdev@vger.kernel.org, mengyuanlou@net-swift.com, duanqiangwen@net-swift.com Subject: Re: [PATCH net 4/5] net: wangxun: change NETIF_F_HW_VLAN_STAG_* to fixed features Message-ID: <20240418185851.GQ3975545@kernel.org> References: <20240416062952.14196-1-jiawenwu@trustnetic.com> <20240416062952.14196-5-jiawenwu@trustnetic.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240416062952.14196-5-jiawenwu@trustnetic.com> On Tue, Apr 16, 2024 at 02:29:51PM +0800, Jiawen Wu wrote: > Because the hardware doesn't support the configuration of VLAN STAG, > remove NETIF_F_HW_VLAN_STAG_* in netdev->features, and set their state > to be consistent with NETIF_F_HW_VLAN_CTAG_*. > > Fixes: 6670f1ece2c8 ("net: txgbe: Add netdev features support") > Signed-off-by: Jiawen Wu Hi Jiawen Wu, I am having trouble reconciling "hardware doesn't support the configuration of VLAN STAG" with both "set their state to be consistent with NETIF_F_HW_VLAN_CTAG_*" and the code changes. Is the problem here not that VLAN STAGs aren't supported by the HW, but rather that the HW requires that corresponding CTAG and STAG configuration always matches? I.e, the HW requires: f & NETIF_F_HW_VLAN_CTAG_FILTER == f & NETIF_F_HW_VLAN_STAG_FILTER f & NETIF_F_HW_VLAN_CTAG_RX == f & NETIF_F_HW_VLAN_STAG_RX f & NETIF_F_HW_VLAN_CTAG_TX == f & NETIF_F_HW_VLAN_STAG_TX If so, I wonder if only the wx_fix_features() portion of this patch is required. ...