From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id 30FBD5697 for ; Sun, 25 Oct 2015 23:00:31 +0100 (CET) Received: by wicll6 with SMTP id ll6so90827514wic.1 for ; Sun, 25 Oct 2015 15:00:31 -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=BLzSG5yvjczzgvfpoEUjb27M51833mCYOKaFS535cWMZSa8FnVG797Dv6rGEyGLUbv 76MiHL9rpvUMeWbjx5dMtEpwpCM2+NE5I17OTFeZAlZkWX6u8FnprCMRySshW/ijj5N1 jrP0MdU9TWFWGBdG376ZiaMrwFn+3pzcHdGYfo/I8H/bEah0SHXCaayHHGnOqZhm7Ges fs10n6ghMs+STo4fIOjCctRm8Dd/LQ/xe0fCy1rj/sib069G7I6wi6HnpzWDn4NGoRIh /20/otf7gwQD5l/mbkkaKF04pQBxsD8W4oKBWG+WlBqtErqV8OvsYe8Eg8BICJKdx/qV nZRQ== X-Received: by 10.194.24.70 with SMTP id s6mr16621294wjf.135.1445810430981; Sun, 25 Oct 2015 15:00:30 -0700 (PDT) Received: from localhost.localdomain (189.Red-83-47-134.dynamicIP.rima-tde.net. [83.47.134.189]) by smtp.gmail.com with ESMTPSA id ev1sm8733669wic.21.2015.10.25.15.00.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Oct 2015 15:00:30 -0700 (PDT) From: Marc Sune To: dev@dpdk.org Date: Sun, 25 Oct 2015 22:59:56 +0100 Message-Id: <1445810400-8978-2-git-send-email-marcdevel@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445810400-8978-1-git-send-email-marcdevel@gmail.com> References: <1443993003-1059-1-git-send-email-marcdevel@gmail.com> <1445810400-8978-1-git-send-email-marcdevel@gmail.com> Subject: [dpdk-dev] [PATCH v6 1/5] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 22:00:31 -0000 Added constants and bitmap to struct rte_eth_dev_info to be used by PMDs. Signed-off-by: Marc Sune --- 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