From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00078.outbound.protection.outlook.com [40.107.0.78]) by dpdk.org (Postfix) with ESMTP id 54355200 for ; Wed, 3 Oct 2018 09:27:44 +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=rZN2QkIfu6OyI6scP+0Th04NkPdBCJn8Ou3vNkE0YKo=; b=D8aYgB7Mlx7PZTeeXWuj5Zzw1OgB6F4jVonuFEUcBxfXHc+jDQDnpblkCBcaI9JAMZflqtnvrW7UNefvFDsyrlZBE99nx0QTcVY3vTo69r2K6eG5aOe7jUAUA7kLxUPfS/6x0rcygshpsHtuNgputenuXzw13EGo77AIoFORibA= Received: from VI1PR05MB4224.eurprd05.prod.outlook.com (52.133.12.13) by VI1PR05MB1453.eurprd05.prod.outlook.com (10.164.85.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Wed, 3 Oct 2018 07:27:42 +0000 Received: from VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::f911:fe8:927d:400b]) by VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::f911:fe8:927d:400b%3]) with mapi id 15.20.1207.018; Wed, 3 Oct 2018 07:27:42 +0000 From: Dekel Peled To: Yongseok Koh CC: "dev@dpdk.org" , Shahaf Shuler , Ori Kam Thread-Topic: [PATCH 2/4] net/mlx5: add definitions for DV encap and decap Thread-Index: AQHUWsT/8Q2FC1M1tEapsOa1BNOT8KUNHL3g Date: Wed, 3 Oct 2018 07:27:42 +0000 Message-ID: References: <1538059845-35896-1-git-send-email-dekelp@mellanox.com> <1538059845-35896-3-git-send-email-dekelp@mellanox.com> <20181003025829.GC10028@mtidpdk.mti.labs.mlnx> In-Reply-To: <20181003025829.GC10028@mtidpdk.mti.labs.mlnx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dekelp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB1453; 6:pkhmO74F/9+EG421lfGCmR2CyOV8dNT8uvum371qZVS142QiZfSUM5L36pCtuPjFFlJjdxJ+ZT/mGMIS8dOcfJ0Ca+kd8T0ZZRFVirx/HYEREVO18NNMtrx9sRsALdF2SkpoBEd0tqR94kFXZNUQa9XKuUNuptVc3yl8xHIr6hyBu6bJHCkbwtVmTTQvDH+uBXMb+OhMupn0IlKcCXe7/HedAX/w5JFzTHFiEhoolJsQxOUjMMEyAQWRxMcxTLoDgQyU04JWbzw8d0jmRXeVgb/WmYf0VD1ZNlWI7+RG4dGWu056PW8MTun926DoPvpayAddq/d3bf05PhgWHpaPoeF68e8XmTXQxvv2iOth0CIN/m6K4drPf3ZSJnIwmD6oQ5j/Kgps3vyrX7rteGtSs0ocGpJqymxPGKmAG7ol90KRZ8EogoKIwN3QOLXhxlk1/CAcJFPTc5KZg+RxgACS2w==; 5:F1WsiuYny4YWUBpLfJjEEdRY63OdPKnRh0/qK+31eUP8+2BPT2rmUwXw4jUMUDTuoJfOUO4pFCpJx5F0jQeYBoMtD9TS3CPJC+bT81ZlxIiQsKP3IHonE8an8ZQ3wSypHlWp2Z27HjvV8mrq/Oh7md4+0nHgbtSI91sQ2QfN3GI=; 7:xoBVz/SQi+Hbr7OYBYb/Z+O/lRidICBTbgmnZgKw8iyd25jJOHnkKBHR3ImkGzv292HrDqDtNtOR3EhhxG9Et7lhYLH3XpSCIibZk/ZuVMRkVtkBSQA/Cl+tnNEK6Dis0vnud3Mopvfw5Zmgi2IUeGpACL/iMoVMDgguuZ4uy1De3oISm0cn6UNmIV/DgKl0PPD5WbVFN8EUY+zzIVIcrY7gc7SgYu09XHVytuYorlJhRx02/2eZkPjMMuu6S4NS x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 5eae4ec4-8cc0-4d18-f79e-08d62901b4e4 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:VI1PR05MB1453; x-ms-traffictypediagnostic: VI1PR05MB1453: 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)(3002001)(93006095)(93001095)(3231355)(944501410)(52105095)(10201501046)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051); SRVR:VI1PR05MB1453; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1453; x-forefront-prvs: 0814A2C7A3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(136003)(396003)(346002)(376002)(189003)(199004)(13464003)(26005)(7696005)(33656002)(186003)(229853002)(97736004)(6636002)(6436002)(105586002)(106356001)(8676002)(55016002)(66066001)(5250100002)(81156014)(476003)(81166006)(446003)(11346002)(8936002)(5660300001)(6506007)(53546011)(7736002)(74316002)(54906003)(305945005)(316002)(256004)(68736007)(53936002)(9686003)(71190400001)(71200400001)(6116002)(76176011)(99286004)(6862004)(107886003)(6246003)(4326008)(2906002)(25786009)(3846002)(2900100001)(575784001)(102836004)(14454004)(478600001)(86362001)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1453; H:VI1PR05MB4224.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: 2sXXP6q99g7vrtwqSbermc+kwFoTNp5c3uAc51812NTWoGZnAZwfNHsAsneaQxUOnbGHd+UT+BdVZ5hq+YtbBZhzLzfgUyytBru5/tfZoPFjQBhWzBToFmDogLc4KyeSvXdUM7fy0XwNFguhR+UDUGSlQMSYY/+Fjf/79Aw2AlE7IsXYblAebbhO+HqZ9/IikpoovVdmfYagOz3nUp7dJqPaprtXnK3UwweEtn3YYLjTlncYt6Zqnr0n8c3uS3wygFVOV/CwOE6XPjhL08MB3PlPrR1XRMV5RRfEc+sbApxYEDxtmSLt361zlla9+qG6tu9krISBSXxuKRTrFRofj/kdF1pzU92lYlxbGvjjG04= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5eae4ec4-8cc0-4d18-f79e-08d62901b4e4 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2018 07:27:42.5645 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1453 Subject: Re: [dpdk-dev] [PATCH 2/4] net/mlx5: add definitions for DV encap and decap 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, 03 Oct 2018 07:27:44 -0000 Thanks, PSB. > -----Original Message----- > From: Yongseok Koh > Sent: Wednesday, October 3, 2018 5:59 AM > To: Dekel Peled > Cc: dev@dpdk.org; Shahaf Shuler ; Ori Kam > > Subject: Re: [PATCH 2/4] net/mlx5: add definitions for DV encap and decap >=20 > On Thu, Sep 27, 2018 at 05:50:43PM +0300, Dekel Peled wrote: > > This patch add the required definitions for DV encap/decap actions. > > It also adds usage of the new actions definition in validation > > function of existing drop operation. > > > > Signed-off-by: Dekel Peled > > --- > > drivers/net/mlx5/mlx5_flow.c | 10 ++++++++++ > > drivers/net/mlx5/mlx5_flow.h | 7 +++++++ > > 2 files changed, 17 insertions(+) > > > > diff --git a/drivers/net/mlx5/mlx5_flow.c > > b/drivers/net/mlx5/mlx5_flow.c index 79a06df..fed0d29 100644 > > --- a/drivers/net/mlx5/mlx5_flow.c > > +++ b/drivers/net/mlx5/mlx5_flow.c > > @@ -768,6 +768,16 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > > RTE_FLOW_ERROR_TYPE_ACTION, > NULL, > > "can't have 2 fate actions in" > > " same flow"); > > + if (action_flags & (MLX5_ACTION_TUNNEL_DECAP | > > + MLX5_ACTION_TUNNEL_DECAP_L3 | > > + MLX5_ACTION_TUNNEL_ENCAP | > > + MLX5_ACTION_TUNNEL_ENCAP_L3)) > > + return rte_flow_error_set(error, > > + ENOTSUP, >=20 > Shouldn't it be EINVAL? OK. >=20 > > + 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, diff --git > > a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index > > a353d07..4a4f923 100644 > > --- a/drivers/net/mlx5/mlx5_flow.h > > +++ b/drivers/net/mlx5/mlx5_flow.h > > @@ -90,6 +90,10 @@ > > #define MLX5_ACTION_OF_PUSH_VLAN (1u << 8) #define > > MLX5_ACTION_OF_SET_VLAN_VID (1u << 9) #define > > MLX5_ACTION_OF_SET_VLAN_PCP (1u << 10) > > +#define MLX5_ACTION_TUNNEL_ENCAP (1u << 11) #define > > +MLX5_ACTION_TUNNEL_DECAP (1u << 12) #define > > +MLX5_ACTION_TUNNEL_ENCAP_L3 (1u << 13) #define > > +MLX5_ACTION_TUNNEL_DECAP_L3 (1u << 14) >=20 > Please rebase it on top of my multi-table patchset, which is PR #878 beca= use > it also adds new actions. Will do. > > > > /* possible L3 layers protocols filtering. */ #define > > MLX5_IP_PROTOCOL_TCP 6 @@ -175,6 +179,9 @@ struct mlx5_flow_dv { > > #ifdef HAVE_IBV_FLOW_DV_SUPPORT > > struct mlx5dv_flow_action_attr > actions[MLX5_DV_MAX_NUMBER_OF_ACTIONS]; > > /**< Action list. */ > > + >=20 > No blank line. OK. >=20 > > + 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. */ }; > > -- > > 1.8.3.1 > >