Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp274677ybi; Wed, 29 May 2019 21:09:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdgoPr/LZVXxj7YWVDKXplwHJ7SxyFQF/a3UVsOmCjF6TaaQ5nqgrFkxBpLFVxE9yvpKSm X-Received: by 2002:a63:c50c:: with SMTP id f12mr1841095pgd.71.1559189396355; Wed, 29 May 2019 21:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189396; cv=none; d=google.com; s=arc-20160816; b=OtvL+iIt6UMWoP+EWqpOwGwpIppven+zzxZRnm/9FuBC4gDI5MAjucxjWbpgbtc5/m FXsaWHykS/V/XERFZOjgg3Yc3Y7yKtEeug37fCgfFLGcVcJpnJap/v/lYPeiXcTwSil+ fsx/mlEVrBuTXkJcrrBkETZ2yTII6lCK/Qnd5uoka0NB6YDdz4UfnDGlktNS+ySNYkXL CYgCb/UMDPlRJY60iMJM5iajBkvYwfgcmsn1OAPDRAnRPFy9QoKccLWn1z43fo5xJqyG IH6ODMCfYvnZlAhm7bg440jwHNcL5AeneFu2r10QzzXkQX4K3pzYjwh/KeGTWav4qkSR RLMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jtmqlpbSO9rmUbKy3QVGs2lYQ9sLWRCB9mYCzmBBPXA=; b=AuAW2RK9LAY4DBnByH4XT/DWTcoqc+6XeNgdDjj9kVUEv3wp22kix/UznkeUq+vrw1 SS6BDTi/5uSQRUZaJho3GdoWs7kweRp6L/fM5hh5xzCzAHy65Wa59B3+m+giwn6mMna2 /IkWQ8xp2m1bB1dc/LbatcDKOnUI3oK2fudjV5uA3pNpom0ZY6C5El05gbAo9CDlxiym 3+4BqIpdBbdQlYNzkYxMdT3ZnMO4payjd3PokEzUbmcnKVTiCK4nV8kh1bW0c8l1Gfhf EA3Z1izxd0UubwwCS3AhoLqyIcDRMctvP48JvDOXFr1eqGeblpkuxPVGg3I3E45yhY+M NiVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=idGxML0p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si1900798pgl.216.2019.05.29.21.09.39; Wed, 29 May 2019 21:09:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=idGxML0p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727054AbfE3EI3 (ORCPT + 99 others); Thu, 30 May 2019 00:08:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:46034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731074AbfE3DRT (ORCPT ); Wed, 29 May 2019 23:17:19 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3D4AE246BE; Thu, 30 May 2019 03:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186239; bh=FjfK/RamjqEShfTjBAQ5NavTeA4udxDVHYeDtM2xaqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=idGxML0pZvkP0we+6tl4DJRqw937Jec2qy15Rb4gpdGT7y2phSvcTa1xrFJZ3oDhY A8M9LuxtCTwXabY1fNyr8FvHVJLLwmvW8gez2A/z99Op9LKgFz5B1pivRARjx5A/RA pZliycdHZXcyujJcpPWGzm9tHejes+zW0XCAOrmY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Nunley , Jeff Kirsher , Sasha Levin Subject: [PATCH 4.19 150/276] i40e: dont allow changes to HW VLAN stripping on active port VLANs Date: Wed, 29 May 2019 20:05:08 -0700 Message-Id: <20190530030534.974271194@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit bfb0ebed53857cfc57f11c63fa3689940d71c1c8 ] Modifying the VLAN stripping options when a port VLAN is configured will break traffic for the VSI, and conceptually doesn't make sense, so don't allow this. Signed-off-by: Nicholas Nunley Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index f81ad0aa8b095..df8808cd7e114 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -2654,6 +2654,10 @@ void i40e_vlan_stripping_enable(struct i40e_vsi *vsi) struct i40e_vsi_context ctxt; i40e_status ret; + /* Don't modify stripping options if a port VLAN is active */ + if (vsi->info.pvid) + return; + if ((vsi->info.valid_sections & cpu_to_le16(I40E_AQ_VSI_PROP_VLAN_VALID)) && ((vsi->info.port_vlan_flags & I40E_AQ_VSI_PVLAN_MODE_MASK) == 0)) @@ -2684,6 +2688,10 @@ void i40e_vlan_stripping_disable(struct i40e_vsi *vsi) struct i40e_vsi_context ctxt; i40e_status ret; + /* Don't modify stripping options if a port VLAN is active */ + if (vsi->info.pvid) + return; + if ((vsi->info.valid_sections & cpu_to_le16(I40E_AQ_VSI_PROP_VLAN_VALID)) && ((vsi->info.port_vlan_flags & I40E_AQ_VSI_PVLAN_EMOD_MASK) == -- 2.20.1