[dpdk-dev] ixgbe: extend the timer support to x550em

Message ID 1458882967-17894-1-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Wenzhuo Lu March 25, 2016, 5:16 a.m. UTC
  An issue is found on x550em NICs, that ieee1588 is not working, the time
always be 0.
The root cause is the timer is only supported by x550, it's not extended
to x550em_x and x550em_a.

Fixes: a7740dc1303a("ixgbe: support new devices and MAC types")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Bruce Richardson March 25, 2016, 2:30 p.m. UTC | #1
On Fri, Mar 25, 2016 at 01:16:07PM +0800, Wenzhuo Lu wrote:
> An issue is found on x550em NICs, that ieee1588 is not working, the time
> always be 0.
> The root cause is the timer is only supported by x550, it's not extended
> to x550em_x and x550em_a.
> 
> Fixes: a7740dc1303a("ixgbe: support new devices and MAC types")
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied to dpdk-next-net/rel_16_04

/Bruce
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d4d883a..137183f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5761,6 +5761,8 @@  ixgbe_read_systime_cyclecounter(struct rte_eth_dev *dev)
 
 	switch (hw->mac.type) {
 	case ixgbe_mac_X550:
+	case ixgbe_mac_X550EM_x:
+	case ixgbe_mac_X550EM_a:
 		/* SYSTIMEL stores ns and SYSTIMEH stores seconds. */
 		systime_cycles = (uint64_t)IXGBE_READ_REG(hw, IXGBE_SYSTIML);
 		systime_cycles += (uint64_t)IXGBE_READ_REG(hw, IXGBE_SYSTIMH)
@@ -5783,6 +5785,8 @@  ixgbe_read_rx_tstamp_cyclecounter(struct rte_eth_dev *dev)
 
 	switch (hw->mac.type) {
 	case ixgbe_mac_X550:
+	case ixgbe_mac_X550EM_x:
+	case ixgbe_mac_X550EM_a:
 		/* RXSTMPL stores ns and RXSTMPH stores seconds. */
 		rx_tstamp_cycles = (uint64_t)IXGBE_READ_REG(hw, IXGBE_RXSTMPL);
 		rx_tstamp_cycles += (uint64_t)IXGBE_READ_REG(hw, IXGBE_RXSTMPH)
@@ -5806,6 +5810,8 @@  ixgbe_read_tx_tstamp_cyclecounter(struct rte_eth_dev *dev)
 
 	switch (hw->mac.type) {
 	case ixgbe_mac_X550:
+	case ixgbe_mac_X550EM_x:
+	case ixgbe_mac_X550EM_a:
 		/* TXSTMPL stores ns and TXSTMPH stores seconds. */
 		tx_tstamp_cycles = (uint64_t)IXGBE_READ_REG(hw, IXGBE_TXSTMPL);
 		tx_tstamp_cycles += (uint64_t)IXGBE_READ_REG(hw, IXGBE_TXSTMPH)
@@ -5854,6 +5860,8 @@  ixgbe_start_timecounters(struct rte_eth_dev *dev)
 
 	switch (hw->mac.type) {
 	case ixgbe_mac_X550:
+	case ixgbe_mac_X550EM_x:
+	case ixgbe_mac_X550EM_a:
 		/* Independent of link speed. */
 		incval = 1;
 		/* Cycles read will be interpreted as ns. */