From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 3D5028E93 for ; Mon, 14 Dec 2015 14:01:24 +0100 (CET) Received: by pabur14 with SMTP id ur14so103996782pab.0 for ; Mon, 14 Dec 2015 05:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+Ug3AfMLjrk6IrafsocmRQ52bK86nf5I3oUtGH0r/TY=; b=ySGtkaV6T0FVKCjApcGUgNBPK/P5iCeljpM0ZQb2tcupfD7ArCbmJqPm94h/sjzs+u 2/FuaUw2kQaJJgy1Zm2hMhrlJL4mgRq2bZgVyQSUjSVa7jWiH3iNRS32fcbwYIo2UNdY Iztujlpjd2+E9OSFc0G/POIsJGPsf0ecSoPUgc5RUamgEGY4yxnMeC30mnLPlojXD4Bp oVvqFC97xB5RZz0DX533xZGq0qqkd/MTe6RjXgHkoryuKCaWshZXpM7p8Z6DijYU0yUN Q9W7Gzm7ybQZkU4wHp0fhNYduCfW1TJUJSfr/Tus3xEkEFrPH5TGDPlOSxBhnO8XQ7Hu d9Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+Ug3AfMLjrk6IrafsocmRQ52bK86nf5I3oUtGH0r/TY=; b=dmlRUFUU+NCD8WELoUuCSe+C0aly7NXRcmDq6JllPM5lVt/ot8eg6gajcgj0o/cIjZ mepKv+srGD6L7aww2BhybIeVh76xqy3flO0v2WqeL6LUcZ9coKv1Eq6b2WyLAV2ky3kb RaYygqPrmdbkm7vOGjz6LFSXzVteKGv/hpRolj1WIpeNSQSPmzX71SO1ARDPU/aPFOyb ZXzpgPz0AG/0KbaciLiheToYNQhwkRIv8vfhPSatEuVbxWpyTneoPLJKCFwKKRya6gDn L0VUgiljsAZfbwUC7x0iO22RgbhFKmEufPFt0iGsu7ie1dfEu5P1iPHSOU77ora5v7Sw gJrQ== X-Gm-Message-State: ALoCoQlnmZv/YQo71wei4A5QFLI8dOGsrt+xYSL18WUcEXH9q3ZCwNvn7+Na7C4xMYYLtekyrFPpsbuycKhTzxVpXh8iH8Eelw== X-Received: by 10.66.119.136 with SMTP id ku8mr46131315pab.128.1450098083663; Mon, 14 Dec 2015 05:01:23 -0800 (PST) Received: from santosh-Latitude-E5530-non-vPro.mvista.com ([110.172.16.5]) by smtp.gmail.com with ESMTPSA id 9sm42506405pfn.51.2015.12.14.05.01.20 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Dec 2015 05:01:22 -0800 (PST) From: Santosh Shukla To: dev@dpdk.org Date: Mon, 14 Dec 2015 18:30:32 +0530 Message-Id: <1450098032-21198-14-git-send-email-sshukla@mvista.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1450098032-21198-1-git-send-email-sshukla@mvista.com> References: <1450098032-21198-1-git-send-email-sshukla@mvista.com> Cc: Rakesh Krishnamurhty Subject: [dpdk-dev] [ [PATCH v2] 13/13] virtio_ethdev : fix format specifier error for 64bit addr case X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 13:01:24 -0000 fix format specifier for func virtio_resource_init_by_ioports. %04hx-%04hx couldn't read 64bit address correctly that lead to wrong value in %mem_resource[0].addr / len; result in testpmd failure. For example, so to read this address 00001040-0000105f; default format-specifier could read 0-0 that lead to below error on arm64/ThunderX Unhandled fault: alignment fault (0x92000021) at 0x0000007fb5040002 Signed-off-by: Santosh Shukla Signed-off-by: Rakesh Krishnamurhty --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 017d49f..8107aef 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1169,7 +1169,7 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev) while (*ptr && isspace(*ptr)) ptr++; - sscanf(ptr, "%04hx-%04hx", &start, &end); + sscanf(ptr, "%hx-%hx", &start, &end); size = end - start + 1; break; -- 1.7.9.5