* [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210
@ 2015-10-19 13:20 Pablo de Lara
2015-10-19 14:22 ` Mcnamara, John
2015-10-28 0:50 ` Lu, Wenzhuo
0 siblings, 2 replies; 4+ messages in thread
From: Pablo de Lara @ 2015-10-19 13:20 UTC (permalink / raw)
To: dev
Fixed issue where the flag PKT_RX_IEEE1588_PTP was not being set
in Intel I210 NIC, as EtherType in RX descriptor is in bits 8:10 of
Packet Type and not in the default bits 0:2.
Fixes known issue "IEEE1588 support possibly not working
with an Intel Ethernet Controller I210 NIC"
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/rel_notes/known_issues.rst | 19 -------------------
doc/guides/rel_notes/release_2_2.rst | 5 +++++
drivers/net/e1000/igb_rxtx.c | 15 +++++++++++----
3 files changed, 16 insertions(+), 23 deletions(-)
diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index b9a52d0..9f1fcdb 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -421,25 +421,6 @@ Intel® QuickAssist Technology sample application does not work on a 32-bit OS o
All.
-IEEE1588 support possibly not working with an Intel® Ethernet Controller I210 NIC
----------------------------------------------------------------------------------
-
-**Description**:
- IEEE1588 support is not working with an Intel® Ethernet Controller I210 NIC.
-
-**Implication**:
- IEEE1588 packets are not forwarded correctly by the Intel® Ethernet Controller I210 NIC.
-
-**Resolution/Workaround**:
- There is no workaround available.
-
-**Affected Environment/Platform**:
- All.
-
-**Driver/Module**:
- IGB Poll Mode Driver
-
-
Differences in how different Intel NICs handle maximum packet length for jumbo frame
------------------------------------------------------------------------------------
diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index 5687676..f623fdb 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -39,6 +39,11 @@ Drivers
Fixed issue with libvirt ``virsh destroy`` not killing the VM.
+* **igb: Fixed IEEE1588 frame identification in I210.**
+
+ Fixed issue where the flag PKT_RX_IEEE1588_PTP was not being set
+ in Intel I210 NIC, as EtherType in RX descriptor is in bits 8:10 of
+ Packet Type and not in the default bits 0:2.
Libraries
~~~~~~~~~
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 19905fd..ebc57cf 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -668,7 +668,7 @@ igb_rxd_pkt_info_to_pkt_type(uint16_t pkt_info)
}
static inline uint64_t
-rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
+rx_desc_hlen_type_rss_to_pkt_flags(struct igb_rx_queue *rxq, uint32_t hl_tp_rs)
{
uint64_t pkt_flags = ((hl_tp_rs & 0x0F) == 0) ? 0 : PKT_RX_RSS_HASH;
@@ -678,7 +678,14 @@ rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
0, 0, 0, 0,
};
- pkt_flags |= ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07];
+ struct rte_eth_dev dev = rte_eth_devices[rxq->port_id];
+ struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev.data->dev_private);
+
+ /* EtherType is in bits 8:10 in Packet Type, and not in the default 0:2 */
+ if (hw->mac.type == e1000_i210)
+ pkt_flags |= ip_pkt_etqf_map[(hl_tp_rs >> 12) & 0x07];
+ else
+ pkt_flags |= ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07];
#endif
return pkt_flags;
@@ -852,7 +859,7 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
/* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
- pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss);
+ pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(rxq, hlen_type_rss);
pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr);
pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr);
rxm->ol_flags = pkt_flags;
@@ -1088,7 +1095,7 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
*/
first_seg->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
hlen_type_rss = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data);
- pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss);
+ pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(rxq, hlen_type_rss);
pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr);
pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr);
first_seg->ol_flags = pkt_flags;
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210
2015-10-19 13:20 [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210 Pablo de Lara
@ 2015-10-19 14:22 ` Mcnamara, John
2015-10-28 0:50 ` Lu, Wenzhuo
1 sibling, 0 replies; 4+ messages in thread
From: Mcnamara, John @ 2015-10-19 14:22 UTC (permalink / raw)
To: De Lara Guarch, Pablo, dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Monday, October 19, 2015 2:20 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210
>
> Fixed issue where the flag PKT_RX_IEEE1588_PTP was not being set in Intel
> I210 NIC, as EtherType in RX descriptor is in bits 8:10 of Packet Type and
> not in the default bits 0:2.
>
> Fixes known issue "IEEE1588 support possibly not working with an Intel
> Ethernet Controller I210 NIC"
Acked-by: John McNamara <john.mcnamara@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210
2015-10-19 13:20 [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210 Pablo de Lara
2015-10-19 14:22 ` Mcnamara, John
@ 2015-10-28 0:50 ` Lu, Wenzhuo
2015-10-28 13:28 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Lu, Wenzhuo @ 2015-10-28 0:50 UTC (permalink / raw)
To: De Lara Guarch, Pablo, dev
Hi,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Monday, October 19, 2015 9:20 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210
>
> Fixed issue where the flag PKT_RX_IEEE1588_PTP was not being set in Intel
> I210 NIC, as EtherType in RX descriptor is in bits 8:10 of Packet Type and not
> in the default bits 0:2.
>
> Fixes known issue "IEEE1588 support possibly not working with an Intel
> Ethernet Controller I210 NIC"
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210
2015-10-28 0:50 ` Lu, Wenzhuo
@ 2015-10-28 13:28 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-10-28 13:28 UTC (permalink / raw)
To: De Lara Guarch, Pablo; +Cc: dev
> > Fixed issue where the flag PKT_RX_IEEE1588_PTP was not being set in Intel
> > I210 NIC, as EtherType in RX descriptor is in bits 8:10 of Packet Type and not
> > in the default bits 0:2.
> >
> > Fixes known issue "IEEE1588 support possibly not working with an Intel
> > Ethernet Controller I210 NIC"
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-28 13:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-19 13:20 [dpdk-dev] [PATCH] igb: fix IEEE1588 frame identification in i210 Pablo de Lara
2015-10-19 14:22 ` Mcnamara, John
2015-10-28 0:50 ` Lu, Wenzhuo
2015-10-28 13:28 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).