From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f179.google.com (mail-qk0-f179.google.com [209.85.220.179]) by dpdk.org (Postfix) with ESMTP id 497AC9A9E for ; Wed, 3 Jun 2015 23:13:19 +0200 (CEST) Received: by qkx62 with SMTP id 62so13428716qkx.3 for ; Wed, 03 Jun 2015 14:13:18 -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:in-reply-to :references; bh=8ZhvUYef6bRhGjOa7SfJyzLZYZUXFXFuMPqXIBlXeyE=; b=M1azQnqu34gxrp/dWja0u0IpT6if6+fbBO+f+Swg7XkXwLOBIL3MCcPxiYUeQASpyk Gam+12XZxxVyS9ru6JXqCgVzRWrdtEGSoRSoupKyHywlv2cCQCjZ1mwwR+RQleWWj6HF gk4nGcXSW+/oEJPHAPKjr611NTc+0/5YOD6FuXt1BN4EOTntQqt4ETyJhZKfIO/yOGa/ yGW7Yc8D/DEFfHqz8kqHmdvmuUpOnO/0OysqK4Es5O428AXwv92rCnpKZEzh/FBjGCJI kCoZAq7Bbylfm1cHaHbNbSjPcfeZnOTweopX8WjRutNu14HlNeCD8yNoLClw9wGpU0f2 8yXQ== X-Gm-Message-State: ALoCoQmY4OIVPfDJNJrk2D/W2HX2RFffdIsNAMhyQttDe6okfVxFLVHIJp7sgTqmKPoQQU0YzvLN X-Received: by 10.55.41.24 with SMTP id p24mr62446117qkh.55.1433365998881; Wed, 03 Jun 2015 14:13:18 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id x137sm1123906qkx.28.2015.06.03.14.13.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jun 2015 14:13:18 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Date: Wed, 3 Jun 2015 14:13:10 -0700 Message-Id: <1433365992-9173-2-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1433365992-9173-1-git-send-email-stephen@networkplumber.org> References: <1433365992-9173-1-git-send-email-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 1/3] bonding: remove useless memset 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: Wed, 03 Jun 2015 21:13:19 -0000 Remove 2 unneeded memset's. The info area is already cleared rte_eth_dev_info_get and the statistics buffer is cleared by rte_eth_stats_get Signed-off-by: Stephen Hemminger --- drivers/net/bonding/rte_eth_bond_api.c | 1 - drivers/net/bonding/rte_eth_bond_pmd.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c index e91a623..d4caa83 100644 --- a/drivers/net/bonding/rte_eth_bond_api.c +++ b/drivers/net/bonding/rte_eth_bond_api.c @@ -363,7 +363,6 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) /* Add slave details to bonded device */ slave_add(internals, slave_eth_dev); - memset(&dev_info, 0, sizeof(dev_info)); rte_eth_dev_info_get(slave_port_id, &dev_info); if (internals->slave_count < 1) { diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c937e6b..8bad2e1 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1730,12 +1730,8 @@ bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) { struct bond_dev_private *internals = dev->data->dev_private; struct rte_eth_stats slave_stats; - int i; - /* clear bonded stats before populating from slaves */ - memset(stats, 0, sizeof(*stats)); - for (i = 0; i < internals->slave_count; i++) { rte_eth_stats_get(internals->slaves[i].port_id, &slave_stats); -- 2.1.4