From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A1D2E1B3F6 for ; Tue, 26 Dec 2017 10:37:39 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2017 01:37:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,459,1508828400"; d="scan'208";a="14610704" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.198]) by FMSMGA003.fm.intel.com with ESMTP; 26 Dec 2017 01:37:36 -0800 From: Zhiyong Yang To: dev@dpdk.org Cc: yliu@fridaylinux.org, maxime.coquelin@redhat.com, Zhiyong Yang Date: Tue, 26 Dec 2017 17:25:00 +0800 Message-Id: <20171226092500.53594-1-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-dev] [PATCH] net/virtio: remove unnecessary macro definitions 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: Tue, 26 Dec 2017 09:37:40 -0000 DPDK has already the definition of Ethernet numeric link speeds in Mbps in the file Rte_ethdev.h, it is unnecessary to rededine virtio specific link speeds macros again. Signed-off-by: Zhiyong Yang --- drivers/net/virtio/virtio_ethdev.c | 2 +- drivers/net/virtio/virtio_ethdev.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index e0328f61d..db89cc32d 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1965,7 +1965,7 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet virtio_dev_atomic_read_link_status(dev, &link); old = link; link.link_duplex = ETH_LINK_FULL_DUPLEX; - link.link_speed = SPEED_10G; + link.link_speed = ETH_SPEED_NUM_10G; if (hw->started == 0) { link.link_status = ETH_LINK_DOWN; diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index 2039bc547..6387a44f9 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -38,11 +38,6 @@ #include "virtio_pci.h" -#define SPEED_10 10 -#define SPEED_100 100 -#define SPEED_1000 1000 -#define SPEED_10G 10000 - #ifndef PAGE_SIZE #define PAGE_SIZE 4096 #endif -- 2.13.3