From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40059.outbound.protection.outlook.com [40.107.4.59]) by dpdk.org (Postfix) with ESMTP id 3FD171B2A6; Wed, 27 Dec 2017 04:51:54 +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; bh=WimkaoDHxKWbHnk3UUxlHFIjri5e2E7arJ8W0WHfSzc=; b=KuBVDpMCzCF057lry6iWRZOCWlrsblDX5+563CZ/8oMUYir5NmEii0jK9ryrJGARIWzBxCTzi8LK/3DSvmmBj6WfcmZ6yUUXsjyK8jrkGP9O8f1gni5p84uRazLqUadEpEoTy67X+IozoiSSiP0dpX1TvuYNCugv9IIHIYY/wPI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (209.116.155.178) by AM5PR0501MB2033.eurprd05.prod.outlook.com (2603:10a6:203:1a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Wed, 27 Dec 2017 03:51:51 +0000 From: Yongseok Koh To: jingjing.wu@intel.com Cc: dev@dpdk.org, Yongseok Koh , stable@dpdk.org Date: Tue, 26 Dec 2017 19:51:38 -0800 Message-Id: <20171227035138.28299-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: SN4PR0801CA0007.namprd08.prod.outlook.com (2603:10b6:803:29::17) To AM5PR0501MB2033.eurprd05.prod.outlook.com (2603:10a6:203:1a::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9f0f3c01-e8d5-4dd9-c4be-08d54cdd2a50 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603307)(7153060); SRVR:AM5PR0501MB2033; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2033; 3:pv+dv8dSOB6uD0bIick6vRxQSXG8/f3M8UCX30uCaNwovWsgVK/wt/QktJ3S66M5cTDjQWvzoi6kCsNxY9CpeZ1zIh/0HaFBeRP/yCp0Gc06rxDJqZVrYibk2sx1dpE8MpyqsTFJjStLc06UAp76XFia6gjYWC2wi/w5sQfvY/tjg3qNYiQPpoGhwNBLshLp46UrP3oFifpY2tXg3DjsPScdq2T60Va5EUjXC1IvifGorKLPY86upIlA5VlD6j9w; 25:7uQH8XjVRC/FEXQ8fAilKY6F8lv9P1apv3fxwhWBrlQzZ3T/TsRqa3Qrhkd97LYDoIKJqkktj+tdqfcU2bGWeIvkQrscE28DFMPSt8BYzsI9tl2OtztcooE/PAK4QnUcfnMjiV/ys8h3Nk0lZfS4u4un0FtHrbZhnLsJkFzihjeVrG21QzM6nhVAsmk1sfe1uRtkYGhJe7GyItuoHtqApXQI35jbxPaCBVHWI1cSc1uQoNwxyxbB/tGqpI1Q0V14/NL4lpsSgBApO3JJ8dYlWFBjD3ipK0fek/qwhRGqS6TmUozO9yLz6umZxd0jcGFk1A2eQBXmEgtoy/13f5ej3A==; 31:rf9BffdvEb1knzYl80AFIgsXGtXxNp2wG5/ir4ewfRCVhFMOH2chA6EYm2LgmHdaF1RWcg8uzSc13J040SCN0VPj816UNgjusihlszKttHAr87Kh+RodRdOTZWKbla2yoUuZEad7gs6N6CUcx19k+0cQdBDhSJ/o5mzt+pJPLytuoWwY6DXARliultr4PJevGRzv5Xc/tUW7N6SPvOeDbR675CJKstSS/6S0LRcPDxI= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2033: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2033; 20:bzUK6nS8s2Fo0eU/IAs6XEVpZfvXF3LZZiiX7zwTTg4YIq1xBsAaRqMy5lrES9zQYpNX0b+AkekfDpcPio3OV2JEKQVfryQdbU/9/KC9hhQq2wmZWwrxO98iVx6gXMwM/kAFqSslnCvSCK+ggnpSLtbd4bkW+x21fJGHJ+a3ATR3gAoK6mYKkP5tQ0/spz3+xT5B0SPPyA9kl2DfciDewk5SqnnAZQ56YrqWbkYBx0AmBRAGBUrlYd9VAjmFvQMgbBWt8zVk8CP3zcyxGnbs+LDYyJ0JEvVq49pb0OIQMKP5XFU6W8l0EeMeRTU0Z4YXd5reN8qK5MhnreWvu1g7pXrkFJDNvvEQOeXWyeiiH0/rkaqXUixk3MkyAAS3OqBE/JGofXujFgDGXBvID8qS1BnYsvtFdWDJT1uvZ9sBHl7HtyZjIdEcsvCuK7bQeotPuXYaiExBPjfRDrNgmxBZsGowbGIHSplmf32GFJU7U/jxENMOOaeXO4k86K5qziod; 4:LqGokyq5II+BImFH57fnZ3JmcEdcoEuw4d4EUQs1LaSUMExntD1GYfcgkH1U5Tt4sktiN1VhUv/itj7Q+132NDtN+0axlvl2dSSMYNpNDYea4PqhGGczJDwvJxNezqucaNwylf/G8FsR7NA1f9eegeJ1qqlKi3CgFNmWouSrMyYpBX8hfJwEM5Pkt6zn3LL71TrbiB0wESCO04mqtXZ6OQFtTCTeiowXEgooAF+Pp3gaYrjnJA5M0pWE7W9HIuU00XmxHi5Ne6WiT35ySK6gTw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(944501075)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041268)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011); SRVR:AM5PR0501MB2033; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM5PR0501MB2033; X-Forefront-PRVS: 0534947130 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(39380400002)(376002)(396003)(366004)(189003)(199004)(106356001)(2351001)(69596002)(2361001)(105586002)(53936002)(7736002)(66066001)(47776003)(25786009)(21086003)(68736007)(2906002)(4326008)(52116002)(7696005)(51416003)(97736004)(55016002)(48376002)(50466002)(305945005)(16586007)(316002)(386003)(81156014)(1076002)(8936002)(8676002)(5660300001)(6116002)(3846002)(478600001)(16526018)(81166006)(6916009)(50226002)(6666003)(86362001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2033; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2033; 23:Tm9yN1s2EGbz6ZEN/AKI49l/nscQ0PrvO0VysHn?= =?us-ascii?Q?640Zr7a48S5rTDv3Vqob0VNY/75kvd6YGQJEqW+9PXgApWSdbdvhKzU591Kz?= =?us-ascii?Q?3qWQk0KR2LWOtT5VorqpAeE5hF3rcEE87rT0gM17+UO+hD08hZ+NoYpEaPNo?= =?us-ascii?Q?c+wAjQYZRQ/iHC+B4zbK2udAZv0lenhzGQSnkG9fpk+jiReWPG28vpka67Qo?= =?us-ascii?Q?u6jyWD3+IFT+jlXw6lNRytfc+sNv3brSgAYckHv9L1yCBVEmWQaCKGq2rLWQ?= =?us-ascii?Q?ppWqOEzU6t75bjmpxUuUnZu9OmD6FpXk8ZKWqhiwtMAUnn9+N+ezeMxUlE9F?= =?us-ascii?Q?obhr72Q3b6qOll8SoK6teWbZXrnQUq+HL6wBLASL9z9cytQ7Xh0HP0alUmiX?= =?us-ascii?Q?wVQpWVZJU7ATg3pzT5SgOIoxtvCMPiWyideJb9X/T1kWNAdnHwByjbmtu9yN?= =?us-ascii?Q?Iq+AoPBKFBHlRPdItPlghGoDYgNhHCIiYE2R79JOvWeZs1Zb6XZYolJbEUy/?=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JyN6z1ht8hnWMdhf/XcKTbkeq0YHp4uwFgvFUP1fMDT4fSMBwwFAjg=; 5:WmJ5TevtqAMPgHZBfBc7U3gwM3rcbHmsi2K+B5KFMOW7IMB6Lxz8Cga9o0HB+skU7wF+YZm9fiOgJKIuw5cjyeb0Fs3taEKAIcqUZF61gQmDSUrboql/JKDWyBBCpMTO9x4manghPySDgeTVb+3Yzf3yhjawWrKrAZ+z0h4idUM=; 24:lj3qC9WzVPDqXh9amzxg1/IPy1zfrbO31SnQcNx1hJsZbSL0FGdWNH9w+FURKo088JWOU24s7dPsUA4z8dGV61DUQGOaSjHPbnqk+c83+Q0=; 7:e94sEc2DmgDtIiGyCziBqIy6Zx25yXl4Gs+rU2Kk7Fto5mrQ87GdzHUbA6+UOFettLUXL5nGxWMKBwq9q6q4iqDDgZlUBg3QX44iqMiwmfEtebPQk6G47oxd8lSQY1IBlh8n/NGQuKhWsENxpwxm3Jiv2mLiHbeO/oJumlCw0GO23Mx43y3RdPbwfU25YKtrGHrH3xdwqG2ckVDagOH1zVrDGcUeeM2Rr9aYiOaTiqv5dLaDOd3TYD83/U5wIAf3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2017 03:51:51.4212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f0f3c01-e8d5-4dd9-c4be-08d54cdd2a50 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2033 Subject: [dpdk-dev] [PATCH] app/testpmd: fix crash of txonly with multiple segments 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, 27 Dec 2017 03:51:54 -0000 Running txonly mode can crash with "--txpkts=20,470". copy_len should be properly adjusted. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh --- app/test-pmd/txonly.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index 309c73893..4ce4d61cc 100644 --- a/app/test-pmd/txonly.c +++ b/app/test-pmd/txonly.c @@ -104,6 +104,7 @@ copy_buf_to_pkt_segs(void* buf, unsigned len, struct rte_mbuf *pkt, buf = ((char*) buf + copy_len); seg = seg->next; seg_buf = rte_pktmbuf_mtod(seg, char *); + copy_len = seg->data_len; } rte_memcpy(seg_buf, buf, (size_t) len); } -- 2.11.0