From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30059.outbound.protection.outlook.com [40.107.3.59]) by dpdk.org (Postfix) with ESMTP id 281B96C9B; Wed, 21 Nov 2018 15:47:26 +0100 (CET) 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=YAOPAkSqDoK2gFiaTKK4YUBcaVqJhMXJ/Ws1ivmF/38=; b=uxXHsvfOCC7YhLLaLt438AG1KqwWXKysWxWC6nJeMHIwHc2IKV1n2j7A6tyLmdHOIZD4I8grNyEcJcmTfxA+ljV53hwWL78rXICHgoghSc5KwafSqf2JarkrJ4Ic5gIKh8luom45rU3puo4og3OTbMdDpmVOvkhncT8dEBzKVYs= Received: from AM5PR0501MB2369.eurprd05.prod.outlook.com (10.169.149.20) by AM5PR0501MB2083.eurprd05.prod.outlook.com (10.167.215.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1339.26; Wed, 21 Nov 2018 14:47:25 +0000 Received: from AM5PR0501MB2369.eurprd05.prod.outlook.com ([fe80::4839:e302:11fb:4db]) by AM5PR0501MB2369.eurprd05.prod.outlook.com ([fe80::4839:e302:11fb:4db%5]) with mapi id 15.20.1339.027; Wed, 21 Nov 2018 14:47:24 +0000 From: Saleh Alsouqi To: "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" CC: "dev@dpdk.org" , Ori Kam , "stable@dpdk.org" Thread-Topic: [PATCH] app/testpmd: fix mpls bos bit default value Thread-Index: AQHUgakdjk1xgdIP9k2rr4+HA2lgcA== Date: Wed, 21 Nov 2018 14:47:24 +0000 Message-ID: <20181121144709.18805-1-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.14.1 x-clientproxiedby: CWLP123CA0049.GBRP123.PROD.OUTLOOK.COM (2603:10a6:401:59::13) To AM5PR0501MB2369.eurprd05.prod.outlook.com (2603:10a6:203:9::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-microsoft-exchange-diagnostics: 1; AM5PR0501MB2083; 6:4EEi24qSVvRJHK+vG02QDY7kBGN9PO7jCqwrru5g6j3m6++FJvQnQovrcl1dUxlrxA7937rNwSOkh5RNdwS2L1VaFWHXCefwoMXarpB+WsnNtrLMA7ld80d2yUrKIeMDI9bmcprFsOb2bxUiG75O8qeKaRwcc4WFJ2uFbPuZdpxxrCVGdnR07wGNJineTBoO70Qkw6VuCPaJ2Ki8vXqR4BaPSTOZk+hbrgaqlXP4TRo9bTg6g6nYjBmq/Y/4chnzyjGfIdGj/gzrnkIdAK8whfN7MySOBCkdLU8yIo5NLBCloWEaURfOTyPTkNQmBCpNydRJ3GJGDFMyJJs/UxYpmRqEnKO7l29LEBVTpnJ8Un0hN4SYZtE9hFaorO2EWpy0yR0KZ33ZQvAJ/YPFp0PulwYN45/KrvajLbebcdTpYlRVu+//eY9gBCk6/X7pCDwkhLr8he/9cCZUdQ5lZL1uag==; 5:Cux5JlmDTza1NmYH3IjOJjbZMCWMtSc6pehJEnMLfuud9RxnXhXoxEnuMTBCDEwtPV40HvqKL0blR8CfUHHAXXUE8kxQwp0lj/QJyDVWUC7TtrJI2FgQmtYM5s3c6KgVJBmuvWzTVXw7agvRYhK0fF9EwToRU3ohi2FJdqJ43Cc=; 7:st2HTqnWUZL4gW4DIX5ApJsx/2yLdzZl1rKygeg2oVW+dvnEzhhHMWBxLl4mkP7OyRscROTd0Y3OWAjNmdatyCTD4jJnHAn4M+xXlfaQGVTlxA6zbEU2XIg1Md7SXeSXlHggShb5ta+vp3ehDUgQxQ== x-ms-office365-filtering-correlation-id: 1f579196-e651-490f-327e-08d64fc03fcd x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2083; x-ms-traffictypediagnostic: AM5PR0501MB2083: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231442)(944501410)(52105112)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:AM5PR0501MB2083; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2083; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(376002)(366004)(396003)(39860400002)(199004)(189003)(97736004)(305945005)(2501003)(68736007)(7736002)(186003)(86362001)(2906002)(81166006)(81156014)(50226002)(99286004)(8676002)(52116002)(8936002)(2201001)(54906003)(1857600001)(110136005)(105586002)(3846002)(106356001)(102836004)(6116002)(316002)(1076002)(6506007)(36756003)(5660300001)(386003)(14454004)(26005)(2616005)(476003)(25786009)(6436002)(71190400001)(486006)(478600001)(71200400001)(2900100001)(4326008)(256004)(53936002)(6486002)(6512007)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2083; H:AM5PR0501MB2369.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: m5+lTEKxKSPp1ZOfpkyiRjLsB8fMYOOlEQ5R972YBOiBz2JMQhD4BpUaUNdHBA+u6DQJfKm9r4oors1vV1CBSTafIH+7mF4Q5Wy8Lmn7+lm56mmgJCYTGwaVoZ5fS6YPaqxHCac/WBk9A/ubF3OvnYbzSg9JIJxIlLfVoIsJ86UzqPet8NxVXHpVKm6KoDiQv5q3zxFqAlLDFD8kX93eS3tlUKXZEVZo6OODjlfWEzSFXJ2wHZzeFibQhimp/8TGTS2+0Sxlbp536CPQ/m0s4q1TG1c+ztdefoZ2THC0hWXCGlIbz5yW+SsQTczsy7F04V6vvaqKiYZvG6EUzR7PISg6Bga5fjICjWHULDgDDzk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: 1f579196-e651-490f-327e-08d64fc03fcd X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 14:47:24.8794 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2083 Subject: [dpdk-dev] [PATCH] app/testpmd: fix mpls bos bit default value 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, 21 Nov 2018 14:47:26 -0000 The Bottom-of-Stack (bos) bit of MPLS indicates whether its the last MPLS layer (1) or not (0). Indicating that the encapsulating MPLS is the last MPLS layer in the packet as the default behavior is more appropriate since multiple encapsulation actions is not supported. 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 23ea7cc82..5c0108fa7 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -3808,6 +3808,7 @@ parse_vc_action_mplsogre_encap(struct context *ctx, c= onst struct token *token, header +=3D sizeof(gre); memcpy(mpls.label_tc_s, mplsogre_encap_conf.label, RTE_DIM(mplsogre_encap_conf.label)); + mpls.label_tc_s[2] |=3D 0x1; memcpy(header, &mpls, sizeof(mpls)); header +=3D sizeof(mpls); action_encap_data->conf.size =3D header - @@ -3998,6 +3999,7 @@ parse_vc_action_mplsoudp_encap(struct context *ctx, c= onst struct token *token, header +=3D sizeof(udp); memcpy(mpls.label_tc_s, mplsoudp_encap_conf.label, RTE_DIM(mplsoudp_encap_conf.label)); + mpls.label_tc_s[2] |=3D 0x1; memcpy(header, &mpls, sizeof(mpls)); header +=3D sizeof(mpls); action_encap_data->conf.size =3D header - --=20 2.14.1