From patchwork Thu May 12 15:24:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 67683 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp814635qge; Thu, 12 May 2016 08:24:47 -0700 (PDT) X-Received: by 10.55.66.66 with SMTP id p63mr10468243qka.137.1463066687473; Thu, 12 May 2016 08:24:47 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 21si8853083qki.187.2016.05.12.08.24.46; Thu, 12 May 2016 08:24:47 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D53DE61649; Thu, 12 May 2016 15:24:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2A00F61630; Thu, 12 May 2016 15:24:42 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id EEA2D61646; Thu, 12 May 2016 15:24:39 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by lists.linaro.org (Postfix) with ESMTPS id 1530B61605 for ; Thu, 12 May 2016 15:24:39 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id u64so74023028lff.3 for ; Thu, 12 May 2016 08:24:39 -0700 (PDT) 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; bh=i1+wBC7HU37MGQqZymhIrank4fNbt4+3Q2Dhov4k2UM=; b=WnNiyjs6qXwhGIeenL2Vj+XOipVOQtLtaGQgvtGR4jLuHZT5LF49NQmmCD9O3OkPpT 7xIjcj1nqxaTR+090xwHiiewmmJzdkkaAvqOIB6PujZs/ALXeYj1nX7z+ThVRfe8LFpa nCbDR4HtJ/DIy9/RfjlWr6xbVgzIGWUQT5tCo+wNSQ9KWPjSzc7szCk4hTrQSyirmQhZ mwqYLDDl79ID4OFuDQc3fYjBuFfo9EpoKWZC2HIG4fnrzAOIlNMn9Hv9L9Ob0U2f9Z/w mBPmbv5+BIhI/dGa2jp5GxIgc+spY34ZLOx9+vj2AncvULNXdzsJIlPL5v2tbvD28pbn wiKQ== X-Gm-Message-State: AOPr4FWCIrO2u2MYTOxZf4jEbcatGeXHg0j1E6YFHpm7rPefxp3eiyOaaWn0gC+4YDKf3UjaokU= X-Received: by 10.25.78.68 with SMTP id c65mr4086859lfb.21.1463066677757; Thu, 12 May 2016 08:24:37 -0700 (PDT) Received: from localhost.localdomain (ppp91-77-173-31.pppoe.mtu-net.ru. [91.77.173.31]) by smtp.gmail.com with ESMTPSA id q1sm2152257lbo.4.2016.05.12.08.24.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 May 2016 08:24:37 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 12 May 2016 18:24:28 +0300 Message-Id: <1463066668-11465-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic:pktio mmap: fix nb_rx overflow X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" bug: https://bugs.linaro.org/show_bug.cgi?id=2224 Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- platform/linux-generic/pktio/socket_mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/pktio/socket_mmap.c b/platform/linux-generic/pktio/socket_mmap.c index 4170456..22a762f 100644 --- a/platform/linux-generic/pktio/socket_mmap.c +++ b/platform/linux-generic/pktio/socket_mmap.c @@ -154,7 +154,7 @@ static inline unsigned pkt_mmap_v2_rx(pktio_entry_t *pktio_entry, int pkt_len; struct ethhdr *eth_hdr; unsigned i = 0; - uint8_t nb_rx = 0; + unsigned nb_rx = 0; struct ring *ring; int ret;