From patchwork Mon Aug 2 22:12:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Swiatkowski X-Patchwork-Id: 1512743 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gf3nB4Pxxz9sRK for ; Tue, 3 Aug 2021 15:47:56 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id DA74D40258; Tue, 3 Aug 2021 05:47:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jnRVMfiVhxpc; Tue, 3 Aug 2021 05:47:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id B4F8D40287; Tue, 3 Aug 2021 05:47:50 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 543361BF363 for ; Tue, 3 Aug 2021 05:47:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3CDBE401CB for ; Tue, 3 Aug 2021 05:47:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1W9BSriQamSH for ; Tue, 3 Aug 2021 05:47:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by smtp2.osuosl.org (Postfix) with ESMTPS id 80B104016F for ; Tue, 3 Aug 2021 05:47:48 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10064"; a="193876360" X-IronPort-AV: E=Sophos;i="5.84,291,1620716400"; d="scan'208";a="193876360" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2021 22:47:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,291,1620716400"; d="scan'208";a="510878335" Received: from wasp.igk.intel.com ([10.102.20.192]) by FMSMGA003.fm.intel.com with ESMTP; 02 Aug 2021 22:47:46 -0700 From: Michal Swiatkowski To: intel-wired-lan@lists.osuosl.org Date: Mon, 2 Aug 2021 18:12:45 -0400 Message-Id: <20210802221245.6056-1-michal.swiatkowski@linux.intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Intel-wired-lan] [PATCH net-next] ice: disable VLAN stripping on control VSI X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Port representators don't support stripping VLAN tag. Control VSI should reflect this setting. As default all VSIs have stripping enabled. Disable it for control VSI to allow passing VLAN traffic in switchdev mode. Control VSI exists only in switchdev mode, so this change doesn't impact legacy mode driver. Signed-off-by: Michal Swiatkowski --- This commit should be squashed with "ice: setting and releasing switchdev environment" drivers/net/ethernet/intel/ice/ice_eswitch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c index ec2aa789e214..21f3e72a9a35 100644 --- a/drivers/net/ethernet/intel/ice/ice_eswitch.c +++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c @@ -22,6 +22,8 @@ static int ice_eswitch_setup_env(struct ice_pf *pf) struct ice_port_info *pi = pf->hw.port_info; bool rule_added = false; + ice_vsi_manage_vlan_stripping(ctrl_vsi, false); + ice_remove_vsi_fltr(&pf->hw, uplink_vsi->idx); if (ice_vsi_add_vlan(uplink_vsi, 0, ICE_FWD_TO_VSI))