From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AFD549E3 for ; Mon, 26 Jun 2017 11:42:32 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2017 02:42:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,395,1493708400"; d="scan'208";a="871755986" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jun 2017 02:42:28 -0700 From: Radu Nicolau To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, reshma.pattan@intel.com, michalx.k.jastrzebski@intel.com, deepak.k.jain@intel.com, harry.van.haaren@intel.com, piotrx.t.azarewicz@intel.com, radu.nicolau@intel.com Date: Mon, 26 Jun 2017 10:39:07 +0100 Message-Id: <1498469947-29496-1-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <20170522143202.22424-4-michalx.k.jastrzebski@intel.com> References: <20170522143202.22424-4-michalx.k.jastrzebski@intel.com> Subject: [dpdk-dev] [PATCH v2] drivers/net: add support for IF-MIB and EtherLike-MIB for ixgbe 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: Mon, 26 Jun 2017 09:42:33 -0000 From: Michal Jastrzebski If-MIB xstats: ifNumber ifIndex ifType ifMtu ifSpeed ifPhysAddress ifOperStatus ifLastChange ifHighSpeed ifConnectorPresent ifCounterDiscontinuityTime EtherLike-MIB xstats: dot3PauseOperMode dot3StatsDuplexStatus dot3StatsRateControlAbility dot3StatsRateControlStatus dot3ControlFunctionsSupported -updated in v2: coding style Signed-off-by: Piotr Azarewicz Signed-off-by: Michal Jastrzebski Signed-off-by: Radu Nicolau --- drivers/net/ixgbe/ixgbe_ethdev.c | 275 ++++++++++++++++++++++++++++++++++++--- drivers/net/ixgbe/ixgbe_ethdev.h | 59 +++++++++ 2 files changed, 317 insertions(+), 17 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index ebc5467..16f79c2 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -809,6 +809,45 @@ static const struct rte_ixgbe_xstats_name_off rte_ixgbevf_stats_strings[] = { #define IXGBEVF_NB_XSTATS (sizeof(rte_ixgbevf_stats_strings) / \ sizeof(rte_ixgbevf_stats_strings[0])) +static const struct rte_ixgbe_xstats_name_off ixgbe_if_mib_strings[] = { + {"ifNumber", offsetof(struct ixgbe_if_mib_stats, if_number)}, + {"ifIndex", offsetof(struct ixgbe_if_mib_stats, if_index)}, + {"ifType", offsetof(struct ixgbe_if_mib_stats, if_type)}, + {"ifMtu", offsetof(struct ixgbe_if_mib_stats, if_mtu)}, + {"ifSpeed", offsetof(struct ixgbe_if_mib_stats, if_speed)}, + {"ifPhysAddress", offsetof(struct ixgbe_if_mib_stats, if_phys_address)}, + {"ifOperStatus", offsetof(struct ixgbe_if_mib_stats, if_oper_status)}, + {"ifLastChange", offsetof(struct ixgbe_if_mib_stats, if_last_change)}, + {"ifHighSpeed", offsetof(struct ixgbe_if_mib_stats, if_high_speed)}, + {"ifConnectorPresent", offsetof(struct ixgbe_if_mib_stats, + if_connector_present)}, + {"ifCounterDiscontinuityTime", offsetof(struct ixgbe_if_mib_stats, + if_counter_discontinuity_time)}, +}; + +#define IXGBE_NB_IF_MIB_XSTATS (sizeof(ixgbe_if_mib_strings) / \ + sizeof(ixgbe_if_mib_strings[0])) + +static const struct rte_ixgbe_xstats_name_off ixgbe_ether_like_mib_strings[] = { + {"dot3PauseOperMode", offsetof(struct ixgbe_ether_like_mib_stats, + dot3_pause_oper_mode)}, + {"dot3StatsDuplexStatus", offsetof(struct ixgbe_ether_like_mib_stats, + dot3_stats_duplex_status)}, + {"dot3StatsRateControlAbility", offsetof( + struct ixgbe_ether_like_mib_stats, + dot3_stats_rate_control_ability)}, + {"dot3StatsRateControlStatus", offsetof( + struct ixgbe_ether_like_mib_stats, + dot3_stats_rate_control_status)}, + {"dot3ControlFunctionsSupported", offsetof( + struct ixgbe_ether_like_mib_stats, + dot3_control_functions_supported)}, +}; + +#define IXGBE_NB_ETHER_LIKE_MIB_XSTATS \ + (sizeof(ixgbe_ether_like_mib_strings) / \ + sizeof(ixgbe_ether_like_mib_strings[0])) + /** * Atomically reads the link status information from global * structure rte_eth_dev. @@ -1134,6 +1173,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) IXGBE_DEV_PRIVATE_TO_FILTER_INFO(eth_dev->data->dev_private); struct ixgbe_bw_conf *bw_conf = IXGBE_DEV_PRIVATE_TO_BW_CONF(eth_dev->data->dev_private); + struct ixgbe_adapter *adapter = + (struct ixgbe_adapter *)eth_dev->data->dev_private; uint32_t ctrl_ext; uint16_t csum; int diag, i; @@ -1316,6 +1357,11 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) eth_dev->data->port_id, pci_dev->id.vendor_id, pci_dev->id.device_id); + /* indicate sysUpTime start */ + adapter->sys_up_time_start = rte_rdtsc(); + adapter->if_last_change = 0; + adapter->if_counter_discontinuity_time = 0; + rte_intr_callback_register(intr_handle, ixgbe_dev_interrupt_handler, eth_dev); @@ -1596,6 +1642,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) struct ixgbe_hwstrip *hwstrip = IXGBE_DEV_PRIVATE_TO_HWSTRIP_BITMAP(eth_dev->data->dev_private); struct ether_addr *perm_addr = (struct ether_addr *) hw->mac.perm_addr; + struct ixgbe_adapter *adapter = + (struct ixgbe_adapter *)eth_dev->data->dev_private; PMD_INIT_FUNC_TRACE(); @@ -1719,6 +1767,11 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) return -EIO; } + /* indicate sysUpTime start */ + adapter->sys_up_time_start = rte_rdtsc(); + adapter->if_last_change = 0; + adapter->if_counter_discontinuity_time = 0; + rte_intr_callback_register(intr_handle, ixgbevf_dev_interrupt_handler, eth_dev); rte_intr_enable(intr_handle); @@ -3110,12 +3163,17 @@ ixgbe_dev_stats_reset(struct rte_eth_dev *dev) { struct ixgbe_hw_stats *stats = IXGBE_DEV_PRIVATE_TO_STATS(dev->data->dev_private); + struct ixgbe_adapter *adapter = + (struct ixgbe_adapter *)dev->data->dev_private; /* HW registers are cleared on read */ ixgbe_dev_stats_get(dev, NULL); /* Reset software totals */ memset(stats, 0, sizeof(*stats)); + + adapter->if_counter_discontinuity_time = + rte_rdtsc() - adapter->sys_up_time_start; } /* This function calculates the number of xstats based on the current config */ @@ -3123,7 +3181,8 @@ static unsigned ixgbe_xstats_calc_num(void) { return IXGBE_NB_HW_STATS + IXGBE_NB_MACSEC_STATS + (IXGBE_NB_RXQ_PRIO_STATS * IXGBE_NB_RXQ_PRIO_VALUES) + - (IXGBE_NB_TXQ_PRIO_STATS * IXGBE_NB_TXQ_PRIO_VALUES); + (IXGBE_NB_TXQ_PRIO_STATS * IXGBE_NB_TXQ_PRIO_VALUES) + + IXGBE_NB_IF_MIB_XSTATS + IXGBE_NB_ETHER_LIKE_MIB_XSTATS; } static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, @@ -3178,10 +3237,32 @@ static int ixgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, count++; } } + + /* Get stats from IF-MIB objects */ + for (i = 0; i < IXGBE_NB_IF_MIB_XSTATS; i++) { + snprintf(xstats_names[count].name, + sizeof(xstats_names[count].name), + "%s", ixgbe_if_mib_strings[i].name); + count++; + } + + /* Get stats from Ethernet-like-MIB objects */ + for (i = 0; i < IXGBE_NB_ETHER_LIKE_MIB_XSTATS; i++) { + snprintf(xstats_names[count].name, + sizeof(xstats_names[count].name), + "%s", ixgbe_ether_like_mib_strings[i].name); + count++; + } } return cnt_stats; } +static unsigned int +ixgbevf_xstats_calc_num(void) { + return IXGBEVF_NB_XSTATS + IXGBE_NB_IF_MIB_XSTATS + + IXGBE_NB_ETHER_LIKE_MIB_XSTATS; +} + static int ixgbe_dev_xstats_get_names_by_id( struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, @@ -3261,19 +3342,117 @@ static int ixgbe_dev_xstats_get_names_by_id( } static int ixgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, - struct rte_eth_xstat_name *xstats_names, unsigned limit) + struct rte_eth_xstat_name *xstats_names, + __rte_unused unsigned int limit) { - unsigned i; + unsigned int i, count = 0; - if (limit < IXGBEVF_NB_XSTATS && xstats_names != NULL) - return -ENOMEM; + if (xstats_names == NULL) + return ixgbevf_xstats_calc_num(); + + for (i = 0; i < IXGBEVF_NB_XSTATS; i++) { + snprintf(xstats_names[count].name, + sizeof(xstats_names[count].name), + "%s", rte_ixgbevf_stats_strings[i].name); + count++; + } + + /* Get stats from IF-MIB objects */ + for (i = 0; i < IXGBE_NB_IF_MIB_XSTATS; i++) { + snprintf(xstats_names[count].name, + sizeof(xstats_names[count].name), + "%s", ixgbe_if_mib_strings[i].name); + count++; + } + + /* Get stats from Ethernet-like-MIB objects */ + for (i = 0; i < IXGBE_NB_ETHER_LIKE_MIB_XSTATS; i++) { + snprintf(xstats_names[count].name, + sizeof(xstats_names[count].name), + "%s", ixgbe_ether_like_mib_strings[i].name); + count++; + } + + return count; +} + +static void +ixgbe_read_if_mib(struct rte_eth_dev *dev, struct ixgbe_if_mib_stats *stats) +{ + struct rte_eth_dev_data *data = dev->data; + struct rte_device *device = dev->device; + struct ixgbe_adapter *adapter = + (struct ixgbe_adapter *)dev->data->dev_private; + + stats->if_number = rte_eth_dev_count(); + stats->if_index = data->port_id + 1; + stats->if_type = IXGBE_MIB_IF_TYPE_ETHERNETCSMACD; + stats->if_mtu = data->mtu; + stats->if_speed = (data->dev_link.link_speed < (UINT32_MAX / 1000000)) ? + (data->dev_link.link_speed * 1000000) : UINT32_MAX; + stats->if_phys_address = 0; + ether_addr_copy(data->mac_addrs, + (struct ether_addr *)&stats->if_phys_address); + stats->if_oper_status = data->dev_link.link_status ? + IXGBE_MIB_TRUTH_TRUE : IXGBE_MIB_TRUTH_FALSE; + stats->if_last_change = adapter->if_last_change / + (rte_get_tsc_hz() * 100); + stats->if_high_speed = data->dev_link.link_speed; + if (device->devargs) + stats->if_connector_present = + (device->devargs->type == RTE_DEVTYPE_VIRTUAL) ? + IXGBE_MIB_TRUTH_FALSE : + IXGBE_MIB_TRUTH_TRUE; + else + stats->if_connector_present = 0; + stats->if_counter_discontinuity_time = + adapter->if_counter_discontinuity_time / + (rte_get_tsc_hz() * 100); +} + +static void +ixgbe_read_ether_like_mib(struct rte_eth_dev *dev, + struct ixgbe_ether_like_mib_stats *stats) +{ + struct rte_eth_dev_data *data = dev->data; + struct ixgbe_hw *hw = + IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + + switch (hw->fc.current_mode) { + case ixgbe_fc_none: + stats->dot3_pause_oper_mode = IXGBE_DOT3_PAUSE_DISABLED; + break; + case ixgbe_fc_rx_pause: + stats->dot3_pause_oper_mode = IXGBE_DOT3_PAUSE_ENABLEDRCV; + break; + case ixgbe_fc_tx_pause: + stats->dot3_pause_oper_mode = IXGBE_DOT3_PAUSE_ENABLEDXMIT; + break; + case ixgbe_fc_full: + stats->dot3_pause_oper_mode = + IXGBE_DOT3_PAUSE_ENABLEDXMITANDRCV; + break; + default: + stats->dot3_pause_oper_mode = 0; + break; + } - if (xstats_names != NULL) - for (i = 0; i < IXGBEVF_NB_XSTATS; i++) - snprintf(xstats_names[i].name, - sizeof(xstats_names[i].name), - "%s", rte_ixgbevf_stats_strings[i].name); - return IXGBEVF_NB_XSTATS; + switch (data->dev_link.link_duplex) { + case ETH_LINK_FULL_DUPLEX: + stats->dot3_stats_duplex_status = IXGBE_DOT3_DUPLEX_FULLDUPLEX; + break; + case ETH_LINK_HALF_DUPLEX: + stats->dot3_stats_duplex_status = IXGBE_DOT3_DUPLEX_HALFDUPLEX; + break; + default: + stats->dot3_stats_duplex_status = IXGBE_DOT3_DUPLEX_UNKNOWN; + break; + } + + stats->dot3_stats_rate_control_ability = IXGBE_MIB_TRUTH_FALSE; + stats->dot3_stats_rate_control_status = IXGBE_DOT3_RATE_CONTROL_OFF; + stats->dot3_control_functions_supported = IXGBE_DOT3_CF_PAUSE | + IXGBE_DOT3_CF_PFC; } static int @@ -3287,6 +3466,8 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, struct ixgbe_macsec_stats *macsec_stats = IXGBE_DEV_PRIVATE_TO_MACSEC_STATS( dev->data->dev_private); + struct ixgbe_if_mib_stats if_mib_stats; + struct ixgbe_ether_like_mib_stats ether_like_mib_stats; uint64_t total_missed_rx, total_qbrc, total_qprc, total_qprdc; unsigned i, stat, count = 0; @@ -3303,6 +3484,9 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, ixgbe_read_stats_registers(hw, hw_stats, macsec_stats, &total_missed_rx, &total_qbrc, &total_qprc, &total_qprdc); + ixgbe_read_if_mib(dev, &if_mib_stats); + ixgbe_read_ether_like_mib(dev, ðer_like_mib_stats); + /* If this is a reset xstats is NULL, and we have cleared the * registers by reading them. */ @@ -3347,6 +3531,23 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, count++; } } + +/* Get stats from IF-MIB objects */ + for (i = 0; i < IXGBE_NB_IF_MIB_XSTATS; i++) { + xstats[count].value = *(uint64_t *)(((char *)&if_mib_stats) + + ixgbe_if_mib_strings[i].offset); + xstats[count].id = count; + count++; + } + + /* Get stats from Ethernet-like-MIB objects */ + for (i = 0; i < IXGBE_NB_ETHER_LIKE_MIB_XSTATS; i++) { + xstats[count].value = + *(uint64_t *)(((char *)ðer_like_mib_stats) + + ixgbe_ether_like_mib_strings[i].offset); + xstats[count].id = count; + count++; + } return count; } @@ -3449,6 +3650,8 @@ ixgbe_dev_xstats_reset(struct rte_eth_dev *dev) struct ixgbe_macsec_stats *macsec_stats = IXGBE_DEV_PRIVATE_TO_MACSEC_STATS( dev->data->dev_private); + struct ixgbe_adapter *adapter = + (struct ixgbe_adapter *)dev->data->dev_private; unsigned count = ixgbe_xstats_calc_num(); @@ -3458,6 +3661,9 @@ ixgbe_dev_xstats_reset(struct rte_eth_dev *dev) /* Reset software totals */ memset(stats, 0, sizeof(*stats)); memset(macsec_stats, 0, sizeof(*macsec_stats)); + + adapter->if_counter_discontinuity_time = + rte_rdtsc() - adapter->sys_up_time_start; } static void @@ -3494,24 +3700,50 @@ ixgbevf_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, { struct ixgbevf_hw_stats *hw_stats = (struct ixgbevf_hw_stats *) IXGBE_DEV_PRIVATE_TO_STATS(dev->data->dev_private); - unsigned i; + struct ixgbe_if_mib_stats if_mib_stats; + struct ixgbe_ether_like_mib_stats ether_like_mib_stats; + unsigned int i, count; - if (n < IXGBEVF_NB_XSTATS) - return IXGBEVF_NB_XSTATS; + count = ixgbevf_xstats_calc_num(); + if (n < count) + return count; ixgbevf_update_stats(dev); + ixgbe_read_if_mib(dev, &if_mib_stats); + ixgbe_read_ether_like_mib(dev, ðer_like_mib_stats); + if (!xstats) return 0; + count = 0; + /* Extended stats */ for (i = 0; i < IXGBEVF_NB_XSTATS; i++) { - xstats[i].id = i; - xstats[i].value = *(uint64_t *)(((char *)hw_stats) + + xstats[count].value = *(uint64_t *)(((char *)hw_stats) + rte_ixgbevf_stats_strings[i].offset); + xstats[count].id = count; + count++; } - return IXGBEVF_NB_XSTATS; + /* Get stats from IF-MIB objects */ + for (i = 0; i < IXGBE_NB_IF_MIB_XSTATS; i++) { + xstats[count].value = *(uint64_t *)(((char *)&if_mib_stats) + + ixgbe_if_mib_strings[i].offset); + xstats[count].id = count; + count++; + } + + /* Get stats from Ethernet-like-MIB objects */ + for (i = 0; i < IXGBE_NB_ETHER_LIKE_MIB_XSTATS; i++) { + xstats[count].value = + *(uint64_t *)(((char *)ðer_like_mib_stats) + + ixgbe_ether_like_mib_strings[i].offset); + xstats[count].id = count; + count++; + } + + return count; } static void @@ -3536,6 +3768,8 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev) { struct ixgbevf_hw_stats *hw_stats = (struct ixgbevf_hw_stats *) IXGBE_DEV_PRIVATE_TO_STATS(dev->data->dev_private); + struct ixgbe_adapter *adapter = + (struct ixgbe_adapter *)dev->data->dev_private; /* Sync HW register to the last stats */ ixgbevf_dev_stats_get(dev, NULL); @@ -3545,6 +3779,9 @@ ixgbevf_dev_stats_reset(struct rte_eth_dev *dev) hw_stats->vfgorc = 0; hw_stats->vfgptc = 0; hw_stats->vfgotc = 0; + + adapter->if_counter_discontinuity_time = + rte_rdtsc() - adapter->sys_up_time_start; } static int @@ -3770,6 +4007,8 @@ static int ixgbe_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + struct ixgbe_adapter *adapter = + (struct ixgbe_adapter *)dev->data->dev_private; struct rte_eth_link link, old; ixgbe_link_speed link_speed = IXGBE_LINK_SPEED_UNKNOWN; struct ixgbe_interrupt *intr = @@ -3845,6 +4084,8 @@ ixgbe_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete) if (link.link_status == old.link_status) return -1; + adapter->if_last_change = rte_rdtsc() - adapter->sys_up_time_start; + return 0; } diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h index 10b9967..c26323c 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/ixgbe/ixgbe_ethdev.h @@ -430,6 +430,62 @@ struct ixgbe_macsec_stats { uint64_t in_pkts_notusingsa; }; +#define IXGBE_MIB_IF_TYPE_ETHERNETCSMACD 6 + +enum { + IXGBE_MIB_TRUTH_TRUE = 1, + IXGBE_MIB_TRUTH_FALSE +}; + +/* IF-MIB statistics */ +struct ixgbe_if_mib_stats { + uint64_t if_number; /* ifNumber */ + uint64_t if_index; /* ifIndex */ + uint64_t if_type; /* ifType */ + uint64_t if_mtu; /* ifMtu */ + uint64_t if_speed; /* ifSpeed */ + uint64_t if_phys_address; /* ifPhysAddress */ + uint64_t if_oper_status; /* ifOperStatus */ + uint64_t if_last_change; /* ifLastChange */ + uint64_t if_high_speed; /* ifHighSpeed */ + uint64_t if_connector_present; /* ifConnectorPresent */ + uint64_t if_counter_discontinuity_time; /* ifCounterDiscontinuityTime */ +}; + +enum { + IXGBE_DOT3_PAUSE_DISABLED = 1, + IXGBE_DOT3_PAUSE_ENABLEDXMIT, + IXGBE_DOT3_PAUSE_ENABLEDRCV, + IXGBE_DOT3_PAUSE_ENABLEDXMITANDRCV +}; + +enum { + IXGBE_DOT3_DUPLEX_UNKNOWN = 1, + IXGBE_DOT3_DUPLEX_HALFDUPLEX, + IXGBE_DOT3_DUPLEX_FULLDUPLEX +}; + +enum { + IXGBE_DOT3_RATE_CONTROL_OFF = 1, + IXGBE_DOT3_RATE_CONTROL_ON, + IXGBE_DOT3_RATE_CONTROL_UNKNOWN +}; + +#define IXGBE_DOT3_CF_PAUSE (1 << 0) /* PAUSE command implemented */ +#define IXGBE_DOT3_CF_MPCP (1 << 1) /* MPCP implemented */ +#define IXGBE_DOT3_CF_PFC (1 << 2) /* PFC implemented */ + +/* Ethernet-like-MIB statistics */ +struct ixgbe_ether_like_mib_stats { + uint64_t dot3_pause_oper_mode; /* dot3PauseOperMode */ + uint64_t dot3_stats_duplex_status; /* dot3StatsDuplexStatus */ + uint64_t dot3_stats_rate_control_ability; + /* dot3StatsRateControlAbility */ + uint64_t dot3_stats_rate_control_status;/* dot3StatsRateControlStatus */ + uint64_t dot3_control_functions_supported; + /* dot3ControlFunctionsSupported */ +}; + /* The configuration of bandwidth */ struct ixgbe_bw_conf { uint8_t tc_num; /* Number of TCs. */ @@ -463,6 +519,9 @@ struct ixgbe_adapter { struct rte_timecounter systime_tc; struct rte_timecounter rx_tstamp_tc; struct rte_timecounter tx_tstamp_tc; + uint64_t sys_up_time_start; + uint64_t if_last_change; + uint64_t if_counter_discontinuity_time; }; #define IXGBE_DEV_PRIVATE_TO_HW(adapter)\ -- 2.7.5