From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3F515A0487 for ; Thu, 4 Jul 2019 09:33:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3848D1B956; Thu, 4 Jul 2019 09:33:26 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00077.outbound.protection.outlook.com [40.107.0.77]) by dpdk.org (Postfix) with ESMTP id A28A81B946; Thu, 4 Jul 2019 09:33:23 +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=XXrpWFxInoOXeJkkjXLgP6kPIUu45KuhQJVTZR5aU6M=; b=q5JkXXg5z1tH63tbsKBkQDrlfDKptvVVv9jz2ifN4u+hu6JGnIhZpCNv7g//4l1MFa+o75VtNhiA68JVkOjAajRAkEKNafRgnszBgThz1yhL8Vy57VkftaD2N6G5M4+dbgT7SEaY1VnUEjU1VpuFlQUlkE15An/5rdMUjG9KAws= Received: from DB7PR05MB5479.eurprd05.prod.outlook.com (20.177.192.84) by DB7PR05MB4971.eurprd05.prod.outlook.com (20.176.236.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.20; Thu, 4 Jul 2019 07:33:22 +0000 Received: from DB7PR05MB5479.eurprd05.prod.outlook.com ([fe80::484b:f910:ee4f:e95e]) by DB7PR05MB5479.eurprd05.prod.outlook.com ([fe80::484b:f910:ee4f:e95e%2]) with mapi id 15.20.2032.019; Thu, 4 Jul 2019 07:33:22 +0000 From: Saleh Alsouqi To: "ferruh.yigit@intel.com" , "roszenrami@gmail.com" CC: "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" , "dev@dpdk.org" , Ori Kam , "stable@dpdk.org" , "olivier.matz@6wind.com" , Saleh Alsouqi Thread-Topic: [PATCH v3 2/2] app/testpmd: fix mpls ipv4 encap fields Thread-Index: AQHVMjrClillg/nZJUOVsIvujCSNLA== Date: Thu, 4 Jul 2019 07:33:22 +0000 Message-ID: <1562225578-5818-3-git-send-email-salehals@mellanox.com> References: <1545136604-22816-1-git-send-email-salehals@mellanox.com> <1562225578-5818-1-git-send-email-salehals@mellanox.com> In-Reply-To: <1562225578-5818-1-git-send-email-salehals@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: VI1PR06CA0159.eurprd06.prod.outlook.com (2603:10a6:803:c8::16) To DB7PR05MB5479.eurprd05.prod.outlook.com (2603:10a6:10:59::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=salehals@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 783a3341-94f2-4062-db62-08d70051e3fa 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:DB7PR05MB4971; x-ms-traffictypediagnostic: DB7PR05MB4971: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-forefront-prvs: 0088C92887 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(39860400002)(346002)(366004)(396003)(136003)(189003)(199004)(2616005)(476003)(305945005)(486006)(386003)(7736002)(6506007)(102836004)(81156014)(81166006)(256004)(8676002)(71190400001)(71200400001)(2501003)(8936002)(66946007)(66446008)(64756008)(66556008)(66476007)(6436002)(73956011)(6486002)(68736007)(3846002)(6116002)(99286004)(110136005)(54906003)(50226002)(316002)(186003)(2906002)(53936002)(5660300002)(4326008)(66066001)(86362001)(36756003)(107886003)(76176011)(11346002)(446003)(14454004)(26005)(52116002)(6512007)(25786009)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4971; H:DB7PR05MB5479.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: E2D3kweeC/6ir4d+9UbNEfJbiAQrkqlEBsEAJ747whagS9Fy4wJl+c+fMr5OZvGh6GgHhlXAHTqkBG9oCtrbU5Y2DKn7AjlK/VGaJOMsqEHY0t5vOWoO4OZTzN/ZFBsx2+1Ryn+DNOzvFrVpiMcT+U9JR4KHL6fSetiFY30qeUiDJ8pYYs9UkeMRVPfCMlVZXZx864CG6OxqLi6T7QvpVsZkX3rf+jF3KbbqKK62ImWuEWy0TQ1TvK/UspZeeXCHbzQYDbI9hOXIsf9sBpH+oo/uyQVVHiLdpPAGtkC3WGsEYSgG1x2OzVMQwZNh9Rzt/m8PxF19oUmh1DWoMkjmPxdLq2+rDCXDXyk7IzuBkVG1i93DA67JUJCdtBDcEqpoksuYOykPQB3qs1tIzvz6RLQzWgF4bDIoD/Cizc1A65U= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 783a3341-94f2-4062-db62-08d70051e3fa X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2019 07:33:22.4217 (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: salehals@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4971 Subject: [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix mpls ipv4 encap fields 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" Having version and ihl set to 0 would result in a corrupted/incorrect encapsulating packet for MPLS, this commit sets these fields to 4 and 5 respectively as defined in librte_net/rte_ip.h. Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation") Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation") Cc: stable@dpdk.org Signed-off-by: Saleh AlSouqi --- app/test-pmd/cmdline_flow.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index e644efa..4e5fa7a 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -3878,11 +3878,14 @@ parse_vc_action_mplsogre_encap(struct context *ctx,= const struct token *token, .src_addr =3D mplsogre_encap_conf.ipv4_src, .dst_addr =3D mplsogre_encap_conf.ipv4_dst, .next_proto_id =3D IPPROTO_GRE, + .version_ihl =3D RTE_IPV4_VHL_DEF, + .time_to_live =3D IPDEFTTL, }, }; struct rte_flow_item_ipv6 ipv6 =3D { .hdr =3D { .proto =3D IPPROTO_GRE, + .hop_limits =3D IPDEFTTL, }, }; struct rte_flow_item_gre gre =3D { @@ -4066,11 +4069,14 @@ parse_vc_action_mplsoudp_encap(struct context *ctx,= const struct token *token, .src_addr =3D mplsoudp_encap_conf.ipv4_src, .dst_addr =3D mplsoudp_encap_conf.ipv4_dst, .next_proto_id =3D IPPROTO_UDP, + .version_ihl =3D RTE_IPV4_VHL_DEF, + .time_to_live =3D IPDEFTTL, }, }; struct rte_flow_item_ipv6 ipv6 =3D { .hdr =3D { .proto =3D IPPROTO_UDP, + .hop_limits =3D IPDEFTTL, }, }; struct rte_flow_item_udp udp =3D { --=20 2.7.4