From patchwork Sat May 12 06:30:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Varghese, Vipin" X-Patchwork-Id: 39921 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 369301CD4A; Sat, 12 May 2018 08:30:11 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id EAC3C1CD40 for ; Sat, 12 May 2018 08:30:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 23:30:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,391,1520924400"; d="scan'208";a="45446531" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga002.fm.intel.com with ESMTP; 11 May 2018 23:30:07 -0700 From: Vipin Varghese To: ferruh.yigit@intel.com, pascal.mazon@6wind.com, stephen@networkplumber.org, dev@dpdk.org Cc: Vipin Varghese Date: Sat, 12 May 2018 12:00:12 +0530 Message-Id: <1526106612-149893-1-git-send-email-vipin.varghese@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] net/tap: update tap index to unsgined 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" Updating the logic to reflect unsigned integer as index for TAP PMD. Signed-off-by: Vipin Varghese Acked-by: Keith Wiles --- drivers/net/tap/rte_eth_tap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 48c61b3..db397d6 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -64,7 +64,7 @@ static const char *valid_arguments[] = { NULL }; -static int tap_unit; +static unsigned int tap_unit; static unsigned int tun_unit; static int tap_type; @@ -1735,7 +1735,7 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev) } speed = ETH_SPEED_NUM_10G; - snprintf(tap_name, sizeof(tap_name), "%s%d", + snprintf(tap_name, sizeof(tap_name), "%s%u", DEFAULT_TAP_NAME, tap_unit++); memset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN);