From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 8E129A0AC5 for ; Mon, 27 May 2019 04:35:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9DC6CA49; Mon, 27 May 2019 04:35:25 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60062.outbound.protection.outlook.com [40.107.6.62]) by dpdk.org (Postfix) with ESMTP id A295AA3 for ; Mon, 27 May 2019 04:35:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X+kRaI2Ak4GHCU5ez4uoENHCY2BIMUifiSk6fS/Hn2k=; b=HP/lLWG85HBnm2Mk7rDABtWIHg9D4BAq8o5ryaNHN7K2ZvZyP40uhzdw1G5m4H9VqVLsBwrDUeGoBetxGe5I9Ap2tOMifBSIO+uGg7Lvqk1pTpCviWZU1braqCPWbXRaPdPpnRUvuw2A5HK4qHcCal0RqwaZmTlsyCZSDBb7byE= Received: from AM6PR05MB6567.eurprd05.prod.outlook.com (20.179.6.215) by AM6PR05MB5943.eurprd05.prod.outlook.com (20.179.3.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.19; Mon, 27 May 2019 02:35:22 +0000 Received: from AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::1da7:7c33:b730:38f4]) by AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::1da7:7c33:b730:38f4%6]) with mapi id 15.20.1922.021; Mon, 27 May 2019 02:35:22 +0000 From: Jack Min To: Shahaf Shuler CC: Yongseok Koh , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: match on TCP flags via DV/DR engine Thread-Index: AQHVBi3+613GHBrfc0Wzb0Zp3D9rjKZ+XRQA Date: Mon, 27 May 2019 02:35:22 +0000 Message-ID: <20190527023434.tapwjnjz5jq2s42i@mellanox.com> References: <20190509061053.181091-1-jackmin@mellanox.com> In-Reply-To: <20190509061053.181091-1-jackmin@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR0401CA0024.apcprd04.prod.outlook.com (2603:1096:202:2::34) To AM6PR05MB6567.eurprd05.prod.outlook.com (2603:10a6:20b:bc::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [139.227.41.19] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f62a77ff-538f-4e4d-4559-08d6e24bf759 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR05MB5943; x-ms-traffictypediagnostic: AM6PR05MB5943: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 0050CEFE70 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(376002)(396003)(366004)(346002)(189003)(199004)(99286004)(316002)(6512007)(6486002)(54906003)(229853002)(8676002)(386003)(6506007)(37006003)(71200400001)(71190400001)(66446008)(66476007)(66556008)(478600001)(52116002)(66946007)(76176011)(8936002)(26005)(73956011)(81166006)(81156014)(64756008)(6246003)(6862004)(102836004)(305945005)(66066001)(86362001)(7736002)(486006)(476003)(11346002)(68736007)(2616005)(446003)(1076003)(6436002)(2906002)(4326008)(53936002)(36756003)(14444005)(256004)(25786009)(5660300002)(3846002)(6636002)(14454004)(6116002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB5943; H:AM6PR05MB6567.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: f3wr2px6hHU0hLvxMpXpom3Sn5Sinkul2/ros6a4019HBYC/gGBQ9BrwRuk4vZALlfO+hKe46X21ni0cWKBTz98gZM9Mp7QlmKwoNKRjOROqRkRtkpDDiQde8LutYYRP3+nNWCxam6gBEWfV+8ukcUFIs8Hky4E+T3eBAUe0qgJle92fKJZON5euTsthEDLwOU3eoG2+XRLCTaylUKLpISH0IkKnmneZddB4dZcE63DHBRM6Ji74ZD9rLG23dqMQy9O6Z+dh1t4ZpKD9Pp8sP1uznqN348jb+8WN9ZiZz2eHdx0DzI6pxkm8OS1+JF6dJxWkE2+WTEgox/86kog25FcmtgtsExZOfSs56ejZSp0RHgh60tcJ6bbMwUhr39rC2Fvk4QLGZ3G7PQ/7UZCUb5iK//vyaSLVlrtOxLNnTg0= Content-Type: text/plain; charset="us-ascii" Content-ID: <141301774E3CD045BC62ACFA4ACACE79@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f62a77ff-538f-4e4d-4559-08d6e24bf759 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 May 2019 02:35:22.6057 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jackmin@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5943 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: match on TCP flags via DV/DR engine 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 19-05-27, 03:20, Shahaf Shuler wrote: > From: Jack Min >=20 > >Add support to match all TCP control bits (flags) > >except "NS (ECN-nonce)" via Direct Verbs (DV) or Direct Rule (DR) > >engine. > > > >Signed-off-by: Xiaoyu Min > >Acked-by: Ori Kam >=20 > Applied to next-net-mlx, with few points to address: Thank you, shahaf. > 1. Your author name is not the same as your signed-of name. please take > care. It seems the MS exchange mangled my email name... > 2. fixed some identation issues > 3. modifed the title. please have a look. Ok.=20 > thanks.=20 >=20 >=20 > >--- > > drivers/net/mlx5/mlx5_flow_dv.c | 12 +++++++++++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flo= w_dv.c > >index cf255ca95c..44b4f40404 100644 > >--- a/drivers/net/mlx5/mlx5_flow_dv.c > >+++ b/drivers/net/mlx5/mlx5_flow_dv.c > >@@ -2066,6 +2066,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const s= truct rte_flow_attr *attr, > > uint64_t last_item =3D 0; > > uint8_t next_protocol =3D 0xff; > > int actions_n =3D 0; > >+ struct rte_flow_item_tcp nic_tcp_mask =3D { > >+ .hdr =3D { .tcp_flags =3D 0xFF, > >+ .src_port =3D RTE_BE16(UINT16_MAX), > >+ .dst_port =3D RTE_BE16(UINT16_MAX), > >+ } > >+ }; > >=20 > > if (items =3D=3D NULL) > > return -1; > >@@ -2146,7 +2152,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const st= ruct rte_flow_attr *attr, > > ret =3D mlx5_flow_validate_item_tcp > > (items, item_flags, > > next_protocol, > >- &rte_flow_item_tcp_mask, > >+ &nic_tcp_mask, > > error); > > if (ret < 0) > > return ret; > >@@ -2862,6 +2868,10 @@ flow_dv_translate_item_tcp(void *matcher, void *k= ey, > > rte_be_to_cpu_16(tcp_m->hdr.dst_port)); > > MLX5_SET(fte_match_set_lyr_2_4, headers_v, tcp_dport, > > rte_be_to_cpu_16(tcp_v->hdr.dst_port & tcp_m->hdr.dst_port)); > >+ MLX5_SET(fte_match_set_lyr_2_4, headers_m, tcp_flags, > >+ tcp_m->hdr.tcp_flags); > >+ MLX5_SET(fte_match_set_lyr_2_4, headers_v, tcp_flags, > >+ (tcp_v->hdr.tcp_flags & tcp_m->hdr.tcp_flags)); > > } > >=20 > > /**