From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <marcdevel@gmail.com>
Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com
 [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id E7D8D8D99
 for <dev@dpdk.org>; Sun,  4 Oct 2015 23:13:53 +0200 (CEST)
Received: by wiclk2 with SMTP id lk2so90248137wic.1
 for <dev@dpdk.org>; Sun, 04 Oct 2015 14:13:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:date:message-id:in-reply-to:references;
 bh=nCkDdyD+X5pqVKJTPQq10Xs1dTbP6KUjloUgqT9yJlY=;
 b=Xo0+sgDsbjWGHauAd0p7cp1YUIFKCxMofgX7Vv3E6f5g1ZqEJWbCO4hVIViYKEk43n
 FfP4CeRcyWpDKRrmSbkheL/vJdaOjZMOxVVvXpACF+d0amFN5tUJecgK90WYhIiz4kdL
 tCo0xKvkM39IStkg0p6xSR+wseGhDn5G2oWdW9uMxciTsLz3qg45Tlq22jIaZKtF7ZqZ
 ElDJ+TTOm8CTL75vlVMBFO15l71Nz3eetYkY5hn8ucCSfj3YAoLq6zGUCwyvQw4ueVt/
 eSunlA3FeCpSdcMxRhf3raXkh6UgQC7CpQ8a7ihNZg8MG7N6PEhcystTB1Xp+AIub+Uj
 QquQ==
X-Received: by 10.194.71.83 with SMTP id s19mr26348336wju.150.1443993233862;
 Sun, 04 Oct 2015 14:13:53 -0700 (PDT)
Received: from localhost.localdomain (22.Red-83-53-192.dynamicIP.rima-tde.net.
 [83.53.192.22])
 by smtp.gmail.com with ESMTPSA id uq5sm23401596wjc.3.2015.10.04.14.13.53
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Sun, 04 Oct 2015 14:13:53 -0700 (PDT)
From: Marc Sune <marcdevel@gmail.com>
To: dev@dpdk.org
Date: Sun,  4 Oct 2015 23:12:44 +0200
Message-Id: <1443993167-1150-2-git-send-email-marcdevel@gmail.com>
X-Mailer: git-send-email 2.1.4
In-Reply-To: <1443993167-1150-1-git-send-email-marcdevel@gmail.com>
References: <1440807373-24770-1-git-send-email-marc.sune@bisdn.de>
 <1443993167-1150-1-git-send-email-marcdevel@gmail.com>
Subject: [dpdk-dev] [PATCH v5 1/4] ethdev: Added ETH_SPEED_CAP bitmap for
	ports
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Oct 2015 21:13:54 -0000

Added constants and bitmap to struct rte_eth_dev_info to be used by PMDs.

Signed-off-by: Marc Sune <marcdevel@gmail.com>
---
 lib/librte_ether/rte_ethdev.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 8a8c82b..951a423 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -811,6 +811,29 @@ struct rte_eth_conf {
 #define DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM 0x00000080 /**< Used for tunneling packet. */
 #define DEV_TX_OFFLOAD_QINQ_INSERT 0x00000100
 
+/**
+ * Device supported speeds
+ */
+#define ETH_SPEED_CAP_NOT_PHY	(0)  /*< No phy media > */
+#define ETH_SPEED_CAP_10M_HD	(1 << 0)  /*< 10 Mbps half-duplex> */
+#define ETH_SPEED_CAP_10M_FD	(1 << 1)  /*< 10 Mbps full-duplex> */
+#define ETH_SPEED_CAP_100M_HD	(1 << 2)  /*< 100 Mbps half-duplex> */
+#define ETH_SPEED_CAP_100M_FD	(1 << 3)  /*< 100 Mbps full-duplex> */
+#define ETH_SPEED_CAP_1G	(1 << 4)  /*< 1 Gbps > */
+#define ETH_SPEED_CAP_2_5G	(1 << 5)  /*< 2.5 Gbps > */
+#define ETH_SPEED_CAP_5G	(1 << 6)  /*< 5 Gbps > */
+#define ETH_SPEED_CAP_10G	(1 << 7)  /*< 10 Mbps > */
+#define ETH_SPEED_CAP_20G	(1 << 8)  /*< 20 Gbps > */
+#define ETH_SPEED_CAP_25G	(1 << 9)  /*< 25 Gbps > */
+#define ETH_SPEED_CAP_40G	(1 << 10)  /*< 40 Gbps > */
+#define ETH_SPEED_CAP_50G	(1 << 11)  /*< 50 Gbps > */
+#define ETH_SPEED_CAP_56G	(1 << 12)  /*< 56 Gbps > */
+#define ETH_SPEED_CAP_100G	(1 << 13)  /*< 100 Gbps > */
+
+
+/**
+ * Ethernet device information
+ */
 struct rte_eth_dev_info {
 	struct rte_pci_device *pci_dev; /**< Device PCI information. */
 	const char *driver_name; /**< Device Driver name. */
@@ -837,6 +860,7 @@ struct rte_eth_dev_info {
 	uint16_t vmdq_queue_base; /**< First queue ID for VMDQ pools. */
 	uint16_t vmdq_queue_num;  /**< Queue number for VMDQ pools. */
 	uint16_t vmdq_pool_base;  /**< First ID of VMDQ pools. */
+	uint32_t speed_capa;  /**< Supported speeds bitmap (ETH_SPEED_CAP_). */
 };
 
 /** Maximum name length for extended statistics counters */
-- 
2.1.4