From patchwork Wed Aug 31 05:42:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhichao Zeng X-Patchwork-Id: 115685 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4C026A00C5; Wed, 31 Aug 2022 07:41:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A8C340395; Wed, 31 Aug 2022 07:41:25 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id AA242400D6 for ; Wed, 31 Aug 2022 07:41:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661924483; x=1693460483; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a202SsuBIppe3nBKDcdWJRbeXYPXEYqxDJV3S9zh0Ls=; b=XGFrUiTZLOHYywGqMooJlK100GTLR3TjAzlPXS45iIWb0IuvF/aDL33s vdiQ6KkU+ytnLmFxYQAKB1fH3TB96Dz264MFTZ2+k/UA0zzGhfpKvl0BK G/5+E5/0G4JVtJkY48PhfbByUpXAwqBgXuNfgPgTFL8pMre1Gx57U/q2m S+dvOvr2lOPWo/AyV6c+hHaEae6jpRY7ZhkN/1w1izXRyckkgGAbHnkYn F1Fvb2ZQzPiL1OsUXooZbJTCDt+xAQclvuTWIcVOL104ED+CEaznFiJv3 3GkbRMIUUL9OOG0+388+ZXd497RqkHgeRoWUoWWwzFoC/a8WOuFw82U+b Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10455"; a="381673105" X-IronPort-AV: E=Sophos;i="5.93,276,1654585200"; d="scan'208";a="381673105" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 22:41:22 -0700 X-IronPort-AV: E=Sophos;i="5.93,276,1654585200"; d="scan'208";a="608087316" Received: from unknown (HELO localhost.localdomain) ([10.239.252.103]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 22:41:20 -0700 From: Zhichao Zeng To: dev@dpdk.org Cc: qiming.yang@intel.com, yidingx.zhou@intel.com, Zhichao Zeng , Qi Zhang Subject: [PATCH v2] net/ice: support original represented_port action Date: Wed, 31 Aug 2022 13:42:26 +0800 Message-Id: <20220831054226.279211-1-zhichaox.zeng@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220826072545.18127-1-zhichaox.zeng@intel.com> References: <20220826072545.18127-1-zhichaox.zeng@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add support to send matching traffic to the original DCF port with represented_port action by using DCF port id as ethdev_port_id. Signed-off-by: Zhichao Zeng Acked-by: Qi Zhang Tested-by: Ke Xu --- v2: use id instead of name to represent port for comparing --- drivers/net/ice/ice_switch_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index da81e49bfa..240fa10750 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -1639,7 +1639,8 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad, rule_port_id = ad->parent.pf.dev_data->port_id; backer_port_id = repr_dev->data->backer_port_id; - if (backer_port_id != rule_port_id) + if (backer_port_id != rule_port_id && + act_ethdev->port_id != rule_port_id) goto invalid; rule_info->sw_act.vsi_handle = repr_dev->data->representor_id;