From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BF4B9A00C5; Wed, 31 Aug 2022 07:36:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50FB840395; Wed, 31 Aug 2022 07:36:21 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 10E29400D6 for ; Wed, 31 Aug 2022 07:36:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661924179; x=1693460179; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=a202SsuBIppe3nBKDcdWJRbeXYPXEYqxDJV3S9zh0Ls=; b=eBIHvdLXz0XPjKtQ7Ro1Mz6kE3PpDLrBmuNcoUVxv25CbKwSyTYK1HKa 2YPbyLyrBt2SXI+zZRJdNwbEQRxJgU1dqfwuEvYKbOw/xYTIYZmvruq0R OZf+l3TCI6lvm5FfJjw1JyyzlhH6aV+DWyi+hKPjROW2+nud7OUvz02/N dcB6lI1ogrYQygBO+ZIIhlllyUdKBWPu8O85rgIPPNGIcYTfOYXl72M5Q v4xbcAN+6jDKLyE8dNC9UV1qhBAyG3LgMfthUWsE7PKhnlqf+d8HLEfIo aiwV6wc3dNukFs0oW2pWuUDwI3eAY/RSKlQRIwlntz9l2/t7ve4kdLGdf w==; X-IronPort-AV: E=McAfee;i="6500,9779,10455"; a="359336570" X-IronPort-AV: E=Sophos;i="5.93,276,1654585200"; d="scan'208";a="359336570" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 22:36:18 -0700 X-IronPort-AV: E=Sophos;i="5.93,276,1654585200"; d="scan'208";a="673213536" Received: from unknown (HELO localhost.localdomain) ([10.239.252.103]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 22:36:16 -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:37:18 +0800 Message-Id: <20220831053718.279128-1-zhichaox.zeng@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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; -- 2.25.1