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 0EDC9A0C47; Tue, 12 Oct 2021 19:04:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC2C8410D7; Tue, 12 Oct 2021 19:03:59 +0200 (CEST) Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by mails.dpdk.org (Postfix) with ESMTP id DABF140E50 for ; Tue, 12 Oct 2021 19:03:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4962; q=dns/txt; s=iport; t=1634058237; x=1635267837; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=v7mH/dLqq1br04mhaF8j5vLK4riTf19tiTFIGhG/gmw=; b=ev8RsXhWvoz9cmy6KEFwrvYNw4nwsdkhsxxvQoBS1XhypeR/tZZ+ldUM QkFzu/rHn0V/+FctS0UgqQosT8NPxBA4jLBbLD5o5QbstHSOXN2Ykjpa5 Yk2+Hyb8LRHCqoKj2q+OP2Xm+SipT9X2L9Y6gDnaCiceMguE5QMUj90v0 A=; IronPort-PHdr: =?us-ascii?q?A9a23=3AriHHFhebqeYE1JBioR7driq0lGM/UYqcDmcuA?= =?us-ascii?q?tIPjLFSf7in9p75elbCtr1hj17MCIPc7f8My+/bqLvpVmFI55Gd+GsDf5pBW?= =?us-ascii?q?15g640WkgUsDdTDBRj9K/jnPCs5AMleUFZv5DehLBsdFMP3fVaHpHq04HYbE?= =?us-ascii?q?Qn+MgwgIOPzF8bSgs272vr09YfUZlBDhSG2ZvV5KxDlxTg=3D?= IronPort-Data: =?us-ascii?q?A9a23=3A+bdcoKBSeVJMDRVW/9/hw5YqxClBgxIJ4kV8j?= =?us-ascii?q?S/XYbTApGgjhDdTyDAXD2GOOqyCZmqmKdwiOd/l8B9XvZ7XyNM2OVdlrnsFo?= =?us-ascii?q?1CmBibm6XV1Fqp7Vs+rBpWroHlPsoNON7EsEOhuFiWF/0/0aOC7xZVB/fjgq?= =?us-ascii?q?oTUWbas1h9ZHWeIeA954f5Ss7ZRbrxA2LBVMCvV0T/GmPAzDXf+s9JC3s343?= =?us-ascii?q?IrYwP9nlKyaVDr1JTXSb9gT1LPVvyF94J7yuciMw3XErol8RoZWRs7Zx72/u?= =?us-ascii?q?2je5RpoVZWuk63wdQsBRbu60Qqm0yUNHfP9xEkZ4HVuic7XN9JEAatTozWYm?= =?us-ascii?q?NZyydBlvp2rQgBvNarJ8AgYe0gEQ38gY/YdqNcrJlD666R/1Xbuen3g2fhxS?= =?us-ascii?q?lsnN4YY9+B0BklJ9uAVNDQEZAvFnf/e6LWhS+plrsI9LcXqNcUUvXQI5S3ZC?= =?us-ascii?q?vMvWrjGRKPI7Ntf2nE2i9wmNfrTeeIVcTZsKhPabHVnO0keDtQ7leOvmFH4c?= =?us-ascii?q?CFVtFacr7Fx+XW78eDb+NABK/LPcdCMAM5ShEvd+STN/n/yBVcRM9n39NZMy?= =?us-ascii?q?Vr07senoM8xcNl6+GWEy8NX?= IronPort-HdrOrdr: =?us-ascii?q?A9a23=3AyFB5uKrqw+cypNsn9lffbBMaV5tzLNV00z?= =?us-ascii?q?EX/kB9WHVpm5Oj9vxGzc506farslkssSkb6K+90KnpewK6yXcH2/huAV7EZn?= =?us-ascii?q?inhILIFvAi0WKG+V3d8kLFh5VgPMtbAs1D4ZjLfCRHZKXBkUqF+rQbsaO6Gc?= =?us-ascii?q?mT7I+0pRoAPGIaCZ2IrT0JdzpzeXcGIjWucKBJbKZ0kfA33gZIF05nCviTNz?= =?us-ascii?q?0gZazuttfLnJXpbVotHBg88jSDijuu9frTDwWY9g12aUIM/Z4StUz+1yDp7K?= =?us-ascii?q?SqtP+2jjXG0XXI0phQkNz9jvNeGc23jNQPIDmEsHfsWG0hYczHgNkGmpDo1L?= =?us-ascii?q?8YqqiUn/7mBbUq15rlRBDznfIq4Xi67N9h0Q659bbSuwqTnSWwfkNLNyMGv/?= =?us-ascii?q?MFTvMcgHBQ4+2VF8lwrj6kXtNsfGD9tTW46N7SWx5wkE2o5XIkjO4IlnRaFZ?= =?us-ascii?q?ATcblLsOUkjQ9o+bo7bWjHAbocYaRT5QDnlYBrWELfa2qcsnhkwdSqUHh2Fh?= =?us-ascii?q?CaQlIassjQ1zRNhnh2w0YR2cRaxx47hdwAYogB4/6BPrVjlblIQMNTZaVhBP?= =?us-ascii?q?0ZSc/yDmDWWxrDPG+bPFyiHqAaPHDGrYLx/dwOla6XUY1NyIF3lIXKUVteu2?= =?us-ascii?q?J3c0XyCdeW1JkO6RzJSHXVZ0Wn9iif3ekwhlTYfsudDcSuciFaryKQmYRXPi?= =?us-ascii?q?SAYYfABHt/OY6WEVfT?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0B9AADuvmVh/49dJa1aHQEBAQEJARI?= =?us-ascii?q?BBQUBQIFFCAELAYFQUQeBUTcxiA4DhFlgiAsDmnCBLoElA1QLAQEBDQEBQQQ?= =?us-ascii?q?BAYR+AoJIAiU0CQ4BAgQBAQESAQEFAQEBAgEGBIERE4VoDYZCAQEBAQIBEhU?= =?us-ascii?q?TBgEBNwEEBwQCAQgRBAEBHxAyHQgCBAENBQgahSUDDiEBonIBgToCih94gQE?= =?us-ascii?q?ygQGCCAEBBgQEhQoYgjUJgToBgwKLByccgUlEgRVDeYFuPoRHg02CLosQdQd?= =?us-ascii?q?7ExwnZB2BJb5GCoMwnwoUpxeWCB+lSAIEAgQFAg4BAQaBYTuBWXAVgyRRGQ+?= =?us-ascii?q?OIAwWFYM7il50OAIGCwEBAwmUFQEB?= X-IronPort-AV: E=Sophos;i="5.85,368,1624320000"; d="scan'208";a="948666338" Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by rcdn-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 12 Oct 2021 17:03:56 +0000 Received: from mail.cisco.com (xbe-aln-007.cisco.com [173.36.7.22]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id 19CH3uNw011774 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=OK); Tue, 12 Oct 2021 17:03:56 GMT Received: from xfe-rtp-003.cisco.com (64.101.210.233) by xbe-aln-007.cisco.com (173.36.7.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 12 Oct 2021 12:03:56 -0500 Received: from xfe-rcd-001.cisco.com (173.37.227.249) by xfe-rtp-003.cisco.com (64.101.210.233) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Tue, 12 Oct 2021 13:03:55 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (72.163.14.9) by xfe-rcd-001.cisco.com (173.37.227.249) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15 via Frontend Transport; Tue, 12 Oct 2021 12:03:55 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZkLm9w/qSSnxYsan8pSQeb90Bhj+xtyJ0ox3cQzMvUK2/Xsa8jFuHM52yyaZJUEVjZ3ayE+lBp+2gssEva81AlPcVr4tJvgFJX1Ugd5psNoIKpjj8+GJOstoD3jnWf6zua3xSnstCp7eTK1Vwg5lhT6SVEy44IILm+9YY33YAG1gpuPndtv1QINFifO7eZ3y9VYJ2Pninz2iYMJ75Cg1UtuHRROwSjJj7Ilg+gJDMTVEgxCMSvCn00FHfLWpAyGCYvikCXPtdywGUgYiVOcyR4BnwuQOr5wOVFqeEcGGetBRd4IubM2Z4mZgq7fnRiCCY3PgYRc6BdYJJ0fg6jzDDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LfmFIJCL3ixvq7z/NaXg1XZT0WLstvmgdbmHitXjCYY=; b=MNgnlOzmlx36nrBSOMC2XZKjDCzxCWl4yUOMfGMGcKQ9FOAwlDkKiOFLXMoG6eLYbXKpI2QfqxFBTgX4NLWzIDMZXZRbdePDIVlfYcQhXsLUqoWg38fR0zrgpID+sWjkBz5S0mkt5fQetCMVSmrOXIf3/Awd7OauXM7+5JEkRZR0VY/gSfwFaBs/EI9u4cpCRH5XDjR8B1j5JH29ivEHwzOkfmsx6BU49ewQ2fFFVZkczAtrY/RoQET/qZY2SSTEF40Nbo55bbfG9+eUx1c/v8q1ncxbOD9uu3uyklVidzqnExskVP6h8qjyy5fN1socqlVMyEbXOHFBPvw7PfJYFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LfmFIJCL3ixvq7z/NaXg1XZT0WLstvmgdbmHitXjCYY=; b=WtslV7GXjy1KnJwNHfbq+syruShG29QEf2izVY087lGK/+dxEjy8beQNJt8Lih5cQCXwQ9d/66ab7ZNYGQgxosTQQGBG8CfmcaZUbEglvzqtQLNlgeElkewyzNANmxWdT20+QXV9lyoIaVPiaaAoab+Brp9WxActsktQVq12UOM= Received: from CO1PR11MB5154.namprd11.prod.outlook.com (2603:10b6:303:95::7) by MW5PR11MB5860.namprd11.prod.outlook.com (2603:10b6:303:19f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Tue, 12 Oct 2021 17:03:52 +0000 Received: from CO1PR11MB5154.namprd11.prod.outlook.com ([fe80::6111:3d29:64ad:c763]) by CO1PR11MB5154.namprd11.prod.outlook.com ([fe80::6111:3d29:64ad:c763%5]) with mapi id 15.20.4587.026; Tue, 12 Oct 2021 17:03:52 +0000 From: "Hyong Youb Kim (hyonkim)" To: Ivan Malov , "dev@dpdk.org" CC: Thomas Monjalon , Ori Kam , "Andrew Rybchenko" , "John Daley (johndale)" Thread-Topic: [PATCH v3 09/12] net/enic: support meta flow actions to overrule destinations Thread-Index: AQHXveTR5RdfC2VCiUm6nDqvlzWmkavPmUdg Date: Tue, 12 Oct 2021 17:03:52 +0000 Message-ID: References: <20211001134716.1608857-1-andrew.rybchenko@oktetlabs.ru> <20211010143930.4985-1-ivan.malov@oktetlabs.ru> <20211010143930.4985-10-ivan.malov@oktetlabs.ru> In-Reply-To: <20211010143930.4985-10-ivan.malov@oktetlabs.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: oktetlabs.ru; dkim=none (message not signed) header.d=none;oktetlabs.ru; dmarc=none action=none header.from=cisco.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ed552922-f49c-442e-cba3-08d98da244ad x-ms-traffictypediagnostic: MW5PR11MB5860: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: r/aI1WOekrSzRIlJkigqAdPw12n0C7o1yRd3/7NREKi7sUIGnTpD76eqiR7W/1I7TloNPcoXOk0aCduAgQQbl7w1WpKTOTJNcWIYwxGaqtbWCs/B5evAaboREcUbI3JIYNtatos7VAA5sWyn+H5Tzpa+sTyZdq9zlimRm2VHMRY4NOAVBuVFFqd394GgGDcS3c75k/e+d910pKgsYkmtLiNUNG1aB2SX+yBQethVYJnxXyVLWLC9B3JcgekFJP+a0o97nOFaEmAclkPh9PJvRj5gnCAXhp6uks1yXx6J2DCSbtifCrCaGqYc/A88L/eXld3eqgt5FfrBpfZEuRnalOyBdNtUR/ip1AYgmIhQk9xJQJgeGwujUdOz/gtUICOaorDBbm4kx62tqsrcM4sPZ26oft97xEos1YR9EYKief2otHg5SLAf5qGeSFXHFfEAts/5yBq/rBHyTSLsTAdW/wTyGUEottSrv9HhaxyaOicO7t579F/65FYQtdZxiaqFQ973G4hjCK0U1l+9Wap6OLOc8xu1ISwfk3HRqLxfRj8l9JKubD6LdczNss7+R8hA6yu5frOSu2mEdWBtYcu2CIPIIQyjT0CTLfWrECdVXs0bmMPqh/DDA57cHDFBLov263BjD4FtBZuCVYYRXint56W5wZ54Ft7fxiBgSLoJzi9i7CktkLWN0LfTXhscnI4x+LaEJZSH/Li1uWdWQBAA7g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5154.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(38100700002)(53546011)(508600001)(2906002)(6506007)(8936002)(122000001)(38070700005)(71200400001)(8676002)(52536014)(186003)(83380400001)(26005)(55016002)(9686003)(86362001)(76116006)(5660300002)(107886003)(66946007)(316002)(64756008)(66446008)(66476007)(33656002)(66556008)(110136005)(54906003)(4326008)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?a85ggsB3jfCGYMhOPOruZwSx6G5pn6cL6b6Q84jYfKHGthYcGXuLFZGpk7Wt?= =?us-ascii?Q?lx+13QGy1ZSSdI1ZOR4yuCJQdIf4FppteCoV7tFSOp9i9Gr+lrYh3Ezyo1DM?= =?us-ascii?Q?EaU0JaukyfxFMaa9ZdxN0mqWOCyDxBUYQKvcs92rXRuA46FIMQi2mCJdvAx+?= =?us-ascii?Q?5iIynmAhJ9Abgw3DoOF2Kv05rNhcgGeoXUMM7uIFfHYnDA86Sx/ajQ8uGQFW?= =?us-ascii?Q?wp5PbksYebvqwa2SXfXyqx3pku1SV8GFJW9/GKrw7aB/bBJNC6Z06Rbw7YI4?= =?us-ascii?Q?G0duzGGgai5MPkmt+a1HUryC0qsva4652CxPCYgKlAzpCvSbKZCST/o69SP8?= =?us-ascii?Q?rldvQC6RbJiHeb+3KZZaVmCWGyAdqCaW6lHUrni+eQQxaZ5NslXg2lQzXW//?= =?us-ascii?Q?eLWY+1G/bvysd+7I9ve5ccWaAIgL+5UB5puXOdlHGfGZ7KOlm9kTl4+gq4hy?= =?us-ascii?Q?Y/Rt7NstVhr/QPCNxP/u3mKAtdZydLqZzmXXUDYSQmd08J1j4Zt3G/FU86o5?= =?us-ascii?Q?iZPwqw/VbUBJI+WDBeJpt11asFsF4BVEu4QqEoxE3iDn7il1P7lnGLBsFArS?= =?us-ascii?Q?zxzU2oQHcQjE0osQ4RXrgHTX3JOF3xYRoiRxyE3p5nZgb5tIRUwSyHZwhOyl?= =?us-ascii?Q?HtVmj8iwIJCs+I1AgebG3mNiS7yE7LygZCOTqkLAt/nJBFWyP6jwtRwedEMv?= =?us-ascii?Q?FpwimGwF3oGW480SJFt3FUmYbaDvLE7oBhqATyKMYChw4qV7m05lNgLrDP61?= =?us-ascii?Q?mDSpCi8UNW0HaVeINBUAoRckiOjbp/Ep45+j6zHz4+MlGwd4wNM+yWzJoeP2?= =?us-ascii?Q?br90zU8zn/2DG5h43Lun9sWeX9B2UGrrtkiNdkNfy0KBc0XKekhi2SUfWLVT?= =?us-ascii?Q?jGDr3SQMmw9QzoEc1nq+Pybgmm44RreKtCx0mfFnDFOX0q+I3YfoR69F4qB5?= =?us-ascii?Q?icYhhqlqj5GrkYPCLEcGU0v/2kTWR/+nJr0mE7VQr7KORezxVmGWHJB0b3Ul?= =?us-ascii?Q?ISmmdr5p+t6kQNJlrjjYY+NrxzNfkyXyJ6OvwyYYT3/fIVoaZGF/S+SFBnNO?= =?us-ascii?Q?T2eaEB8+bOz+jb68gWCjINaXU36M/uLCcspbrNjfWl7oRMrVehCGpTcwdMmi?= =?us-ascii?Q?WEaWiHp5//xinp72g4ysnfzeZA5OGBkXxXq+5enUJs8FfPI+oa3zb5HMVWYM?= =?us-ascii?Q?gPgPx9MeB6KVCvDiCpCiUw07akEwVts2mMam4Hgl2iN9fEwI1WNLO4F6Q0nt?= =?us-ascii?Q?OXhXopr/6c4BH0x4h8IEX74VbI3hRIolt1ZIvXBiuNhTnl0N8MtnvFSuITWS?= =?us-ascii?Q?TgvEvUCmGOjtc0ieTlCMslka?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5154.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed552922-f49c-442e-cba3-08d98da244ad X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2021 17:03:52.4521 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rGy8QFr/cbIKay0URBLIiLx8hYJwLSMcBEFW44kfcWmvqB/ZQJ5ffZSv4YgRSdz2zCErKkELGaW52NEij3QS3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5860 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.36.7.22, xbe-aln-007.cisco.com X-Outbound-Node: rcdn-core-7.cisco.com Subject: Re: [dpdk-dev] [PATCH v3 09/12] net/enic: support meta flow actions to overrule destinations 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 Sender: "dev" > -----Original Message----- > From: Ivan Malov > Sent: Sunday, October 10, 2021 11:39 PM > To: dev@dpdk.org > Cc: Thomas Monjalon ; Ori Kam > ; Andrew Rybchenko > ; John Daley (johndale) > ; Hyong Youb Kim (hyonkim) > Subject: [PATCH v3 09/12] net/enic: support meta flow actions to overrule > destinations >=20 > From: Andrew Rybchenko >=20 > Add support for actions PORT_REPRESENTOR and REPRESENTED_PORT > based on the existing support for action PORT_ID. >=20 > Signed-off-by: Andrew Rybchenko > --- > drivers/net/enic/enic_fm_flow.c | 93 ++++++++++++++++++++++++++----- > -- > 1 file changed, 75 insertions(+), 18 deletions(-) >=20 Looks good to me. Thanks a lot. Acked-by: Hyong Youb Kim -Hyong > diff --git a/drivers/net/enic/enic_fm_flow.c > b/drivers/net/enic/enic_fm_flow.c > index cd364ee16b..4092ff1f61 100644 > --- a/drivers/net/enic/enic_fm_flow.c > +++ b/drivers/net/enic/enic_fm_flow.c > @@ -1242,6 +1242,35 @@ vf_egress_port_id_action(struct enic_flowman > *fm, > return 0; > } >=20 > +static int > +enic_fm_check_transfer_dst(struct enic *enic, uint16_t dst_port_id, > + struct rte_eth_dev **dst_dev, > + struct rte_flow_error *error) > +{ > + struct rte_eth_dev *dev; > + > + ENICPMD_LOG(DEBUG, "port id %u", dst_port_id); > + if (!rte_eth_dev_is_valid_port(dst_port_id)) { > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, > + NULL, "invalid port_id"); > + } > + dev =3D &rte_eth_devices[dst_port_id]; > + if (!dev_is_enic(dev)) { > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, > + NULL, "port_id is not enic"); > + } > + if (enic->switch_domain_id !=3D pmd_priv(dev)->switch_domain_id) { > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, > + NULL, "destination and source ports are not in the > same switch domain"); > + } > + > + *dst_dev =3D dev; > + return 0; > +} > + > /* Translate flow actions to flowman TCAM entry actions */ > static int > enic_fm_copy_action(struct enic_flowman *fm, > @@ -1446,24 +1475,10 @@ enic_fm_copy_action(struct enic_flowman *fm, > vnic_h =3D enic->fm_vnic_handle; /* This port > */ > break; > } > - ENICPMD_LOG(DEBUG, "port id %u", port->id); > - if (!rte_eth_dev_is_valid_port(port->id)) { > - return rte_flow_error_set(error, EINVAL, > - RTE_FLOW_ERROR_TYPE_ACTION, > - NULL, "invalid port_id"); > - } > - dev =3D &rte_eth_devices[port->id]; > - if (!dev_is_enic(dev)) { > - return rte_flow_error_set(error, EINVAL, > - RTE_FLOW_ERROR_TYPE_ACTION, > - NULL, "port_id is not enic"); > - } > - if (enic->switch_domain_id !=3D > - pmd_priv(dev)->switch_domain_id) { > - return rte_flow_error_set(error, EINVAL, > - RTE_FLOW_ERROR_TYPE_ACTION, > - NULL, "destination and source ports > are not in the same switch domain"); > - } > + ret =3D enic_fm_check_transfer_dst(enic, port->id, > &dev, > + error); > + if (ret) > + return ret; > vnic_h =3D pmd_priv(dev)->fm_vnic_handle; > overlap |=3D PORT_ID; > /* > @@ -1560,6 +1575,48 @@ enic_fm_copy_action(struct enic_flowman *fm, > ovlan |=3D rte_be_to_cpu_16(vid->vlan_vid); > break; > } > + case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR: { > + const struct rte_flow_action_ethdev *ethdev; > + struct rte_eth_dev *dev; > + > + ethdev =3D actions->conf; > + ret =3D enic_fm_check_transfer_dst(enic, ethdev- > >port_id, > + &dev, error); > + if (ret) > + return ret; > + vnic_h =3D pmd_priv(dev)->fm_vnic_handle; > + overlap |=3D PORT_ID; > + /* > + * Action PORT_REPRESENTOR implies ingress > destination. > + * Noting to do. We add an implicit stree at the > + * end if needed. > + */ > + ingress =3D 1; > + break; > + } > + case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT: { > + const struct rte_flow_action_ethdev *ethdev; > + struct rte_eth_dev *dev; > + > + if (overlap & PORT_ID) { > + ENICPMD_LOG(DEBUG, "cannot have > multiple egress PORT_ID actions"); > + goto unsupported; > + } > + ethdev =3D actions->conf; > + ret =3D enic_fm_check_transfer_dst(enic, ethdev- > >port_id, > + &dev, error); > + if (ret) > + return ret; > + vnic_h =3D pmd_priv(dev)->fm_vnic_handle; > + overlap |=3D PORT_ID; > + /* Action REPRESENTED_PORT: always egress > destination */ > + ingress =3D 0; > + ret =3D vf_egress_port_id_action(fm, dev, vnic_h, > &fm_op, > + error); > + if (ret) > + return ret; > + break; > + } > default: > goto unsupported; > } > -- > 2.20.1