From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80053.outbound.protection.outlook.com [40.107.8.53]) by dpdk.org (Postfix) with ESMTP id 604483977 for ; Wed, 10 Oct 2018 02:40:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1YXEvmFl3oKZT/LTThOWbqRX1CLf/snccLYFQufv170=; b=eJf47U7IiC93EEHSZ+C/x20Xep01z89HclNWzwcHAUHOLEfoJbwDNURf6S6uFVO+3hF6ndwgnBx8ZU2qGrcq017XSIk1phfr2zSQLyng/oKG4idiPQ2lAbgWxhwPt00sRFDMXlzuU7arBiLj1IAYlPttz0/q6rAwsE86wnoNytg= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB4076.eurprd05.prod.outlook.com (52.134.66.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.27; Wed, 10 Oct 2018 00:40:49 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::1cb0:661b:ecab:6045%2]) with mapi id 15.20.1207.029; Wed, 10 Oct 2018 00:40:49 +0000 From: Yongseok Koh To: Dekel Peled CC: Shahaf Shuler , "dev@dpdk.org" , Ori Kam Thread-Topic: [PATCH v3 2/4] net/mlx5: add Direct Verbs encap and decap defs Thread-Index: AQHUYAwIP4nZ5BUX2EyMb5WrP1oXSaUXo58A Date: Wed, 10 Oct 2018 00:40:49 +0000 Message-ID: <20181010004035.GF9031@mtidpdk.mti.labs.mlnx> References: <1538922308-9516-1-git-send-email-dekelp@mellanox.com> <1539113137-4914-3-git-send-email-dekelp@mellanox.com> In-Reply-To: <1539113137-4914-3-git-send-email-dekelp@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: CS1PR8401CA0031.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7503::17) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB4076; 6:d5h7dEkiqiBU/X7URN/ZP+ET4sucqeS+sWUn3NWKEYmKWZZrJTPEDx6cR5Ezzl0/ofD4+EHxOXQcAW0z2n8doiWaq9EJLQsBIaXxMBW5FCudavpkxD17WEMtliF/Tm3e9HDsGoE1ibJLFozh78Ermhue4cn//LQsQLABf28bcG186aN/v7GyYM21NpZqVYO16bhccIkkn3zBDIHd36cou/eDe97Fpr/PNJCuSp0pOuB9QJSm77Os2EeL8RFC9LBZtahePNUdRJxbsuZ9R5enpRBciCrSkCSewZCOKh7CeJFYdpGN02fl/PcCSLm6DOnZkvn4aegmYjxBLx6KnaC5deH4K8lwlOVsXbmFsutwnuFyeKn+dG+7i7pS4QFOov7xGsIwaDCBX355Qu63VkqfHhXkJh2QefhUEsJyicy8/isbiivVXPSsMhZGfQwYP9KVx9gAMz0ZSX1+onUSfF21+g==; 5:F37wDDf9m9B1PJNCSf7eV98Oa0ax0KKQpOnbmB0b1b6RcmRM/uzQ/sO1kgvuFmrlcrDPTVmQ9eXja+gSEG8s4dZ7Eog2RV6p+eMfmQ1OGlfR0SrtUKFHjlUMSdnEVXom0NApVJrb5iSMIlfXvLLu7RXwC5LdNcF5cDqfgi8wkM8=; 7:0CRN6nm0VXx3XBWADyUYumM9crOcFY6ZMUl+SDq7l+ml9FD4dqisj3dh6873jusRUOsJ0XxHTZVpevpQGOAijgckXUy8VVLzXhvrKd/k6ZC4pDFboKRgjDn3+5FTxOipp0WYnZXZDV5v39/ZKJ98BFXQnE9GOPnZcCi8oDoPoHubDm5kk481h+LUbH6NTp79i2oDuU35jumTOQ0ZF7pfKOflr3+ct10i8WYJaEH2afPVosmiJcYPP74keOn5bKXf x-ms-office365-filtering-correlation-id: dbd4bab1-aab8-456e-2195-08d62e490638 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB4076; x-ms-traffictypediagnostic: DB3PR0502MB4076: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991055); SRVR:DB3PR0502MB4076; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB4076; x-forefront-prvs: 08213D42D3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(136003)(396003)(39860400002)(366004)(189003)(199004)(105586002)(5250100002)(76176011)(52116002)(26005)(33896004)(71190400001)(6116002)(6436002)(97736004)(305945005)(6506007)(14454004)(2906002)(3846002)(446003)(25786009)(4326008)(476003)(6486002)(478600001)(2900100001)(107886003)(11346002)(6862004)(386003)(102836004)(7736002)(486006)(71200400001)(229853002)(1076002)(9686003)(68736007)(53936002)(86362001)(106356001)(5660300001)(6512007)(54906003)(186003)(6636002)(33656002)(256004)(6246003)(81166006)(8676002)(316002)(8936002)(66066001)(99286004)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4076; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: CiAhZUQr6AEpDYvxn8oZ1aEMMc3NELBSYMLZuN6adxT+pTN4RI+sk7ZIEFdp0WCqUtUE7mFKRJ5KK0z3HHR9gMzL0N44sqmhpKtN8rbnHOxXn1d0pRVP7MEa2SSnqsWaDF1w6PF9pBeVNbJm0w4Aj7fglr17Wd4icpJT+LfEVDbiU34ThfSC8ANMH7tlWaJKfj7iLDA0PFJ+yxFRchEw4X0SYxakdVqqrXUZ7rdQzsXTf7wZwsLLuY/ScBQe+DtNVkCkO90dkZdShGNGqySln5BeeSCSi+A21nopG6AOYn7O14IoEq+7iMntSgA0WPKOUZPZO8AcVVjabC383e8Sfs28Lnf/FmDb0PV7TpTL+wo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbd4bab1-aab8-456e-2195-08d62e490638 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2018 00:40:49.3807 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4076 Subject: Re: [dpdk-dev] [PATCH v3 2/4] net/mlx5: add Direct Verbs encap and decap defs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2018 00:40:50 -0000 On Tue, Oct 09, 2018 at 10:25:35PM +0300, Dekel Peled wrote: > This patch adds the required definitions for DV encap/decap actions. > It also adds usage of the new actions definition in validation > function of existing drop operation. >=20 > Signed-off-by: Dekel Peled > --- I've acked it in v2. So, please put my acked-by tag when you submit a new version. Acked-by: Yongseok Koh Thanks > drivers/net/mlx5/mlx5_flow.c | 8 ++++++++ > drivers/net/mlx5/mlx5_flow.h | 6 ++++++ > 2 files changed, 14 insertions(+) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 1087f67..b452e11 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -766,6 +766,14 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_de= v *dev, int32_t priority, > RTE_FLOW_ERROR_TYPE_ACTION, NULL, > "can't have 2 fate actions in" > " same flow"); > + if (action_flags & (MLX5_FLOW_ACTION_TUNNEL_DECAP | > + MLX5_FLOW_ACTION_TUNNEL_DECAP_L3 | > + MLX5_FLOW_ACTION_TUNNEL_ENCAP | > + MLX5_FLOW_ACTION_TUNNEL_ENCAP_L3)) > + return rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, NULL, > + "can't encap or decap and drop in" > + " same flow"); > if (attr->egress) > return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ATTR_EGRESS, NULL, > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index 690c597..01c73a2 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -82,6 +82,10 @@ > #define MLX5_FLOW_ACTION_OF_SET_VLAN_VID (1u << 9) > #define MLX5_FLOW_ACTION_OF_SET_VLAN_PCP (1u << 10) > #define MLX5_FLOW_ACTION_JUMP (1u << 11) > +#define MLX5_FLOW_ACTION_TUNNEL_ENCAP (1u << 12) > +#define MLX5_FLOW_ACTION_TUNNEL_DECAP (1u << 13) > +#define MLX5_FLOW_ACTION_TUNNEL_ENCAP_L3 (1u << 14) > +#define MLX5_FLOW_ACTION_TUNNEL_DECAP_L3 (1u << 15) > =20 > #define MLX5_FLOW_FATE_ACTIONS \ > (MLX5_FLOW_ACTION_DROP | MLX5_FLOW_ACTION_QUEUE | MLX5_FLOW_ACTION_RSS) > @@ -172,6 +176,8 @@ struct mlx5_flow_dv { > #ifdef HAVE_IBV_FLOW_DV_SUPPORT > struct mlx5dv_flow_action_attr actions[MLX5_DV_MAX_NUMBER_OF_ACTIONS]; > /**< Action list. */ > + struct ibv_flow_action *encap_verb; /**< Verbs object of encap. */ > + struct ibv_flow_action *decap_verb; /**< Verbs object of decap. */ > #endif > int actions_n; /**< number of actions. */ > }; > --=20 > 1.8.3.1 >=20