diff mbox

[dpdk-dev,v2,02/13] ixgbe: fix remaining pkt_flags variable size to 64 bits

Message ID 1415984609-2484-3-git-send-email-olivier.matz@6wind.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Olivier Matz Nov. 14, 2014, 5:03 p.m. UTC
Since commit 4332beee9 "mbuf: expand ol_flags field to 64-bits", the
packet flags are now 64 bits wide. Some occurences were forgotten in
the ixgbe driver.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

miroslaw.walukiewicz@intel.com Nov. 17, 2014, 4:47 p.m. UTC | #1
> -----Original Message-----
> From: Olivier Matz [mailto:olivier.matz@6wind.com]
> Sent: Friday, November 14, 2014 6:03 PM
> To: dev@dpdk.org
> Cc: olivier.matz@6wind.com; Walukiewicz, Miroslaw; Liu, Jijiang; Liu, Yong;
> jigsaw@gmail.com; Richardson, Bruce
> Subject: [PATCH v2 02/13] ixgbe: fix remaining pkt_flags variable size to 64
> bits
> 
> Since commit 4332beee9 "mbuf: expand ol_flags field to 64-bits", the
> packet flags are now 64 bits wide. Some occurences were forgotten in
> the ixgbe driver.

I think it should be present in separate patch. I do no not see any relation to TSO

> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> index ecebbf6..7e470ce 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> @@ -817,7 +817,7 @@ end_of_tx:
>  static inline uint64_t
>  rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
>  {
> -	uint16_t pkt_flags;
> +	uint64_t pkt_flags;
> 
>  	static uint64_t ip_pkt_types_map[16] = {
>  		0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT,
> PKT_RX_IPV4_HDR_EXT,
> @@ -834,7 +834,7 @@ rx_desc_hlen_type_rss_to_pkt_flags(uint32_t
> hl_tp_rs)
>  	};
> 
>  #ifdef RTE_LIBRTE_IEEE1588
> -	static uint32_t ip_pkt_etqf_map[8] = {
> +	static uint64_t ip_pkt_etqf_map[8] = {
>  		0, 0, 0, PKT_RX_IEEE1588_PTP,
>  		0, 0, 0, 0,
>  	};
> @@ -903,7 +903,7 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
>  	struct igb_rx_entry *rxep;
>  	struct rte_mbuf *mb;
>  	uint16_t pkt_len;
> -	uint16_t pkt_flags;
> +	uint64_t pkt_flags;
>  	int s[LOOK_AHEAD], nb_dd;
>  	int i, j, nb_rx = 0;
> 
> @@ -1335,7 +1335,7 @@ ixgbe_recv_scattered_pkts(void *rx_queue, struct
> rte_mbuf **rx_pkts,
>  	uint16_t nb_rx;
>  	uint16_t nb_hold;
>  	uint16_t data_len;
> -	uint16_t pkt_flags;
> +	uint64_t pkt_flags;
> 
>  	nb_rx = 0;
>  	nb_hold = 0;
> @@ -1511,9 +1511,9 @@ ixgbe_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 = (uint16_t)(pkt_flags |
> +		pkt_flags = (pkt_flags |
>  				rx_desc_status_to_pkt_flags(staterr));
> -		pkt_flags = (uint16_t)(pkt_flags |
> +		pkt_flags = (pkt_flags |
>  				rx_desc_error_to_pkt_flags(staterr));
>  		first_seg->ol_flags = pkt_flags;
> 
> --
> 2.1.0
Olivier Matz Nov. 17, 2014, 5:03 p.m. UTC | #2
Hi Miroslaw,

On 11/17/2014 05:47 PM, Walukiewicz, Miroslaw wrote:
> 
> 
>> -----Original Message-----
>> From: Olivier Matz [mailto:olivier.matz@6wind.com]
>> Sent: Friday, November 14, 2014 6:03 PM
>> To: dev@dpdk.org
>> Cc: olivier.matz@6wind.com; Walukiewicz, Miroslaw; Liu, Jijiang; Liu, Yong;
>> jigsaw@gmail.com; Richardson, Bruce
>> Subject: [PATCH v2 02/13] ixgbe: fix remaining pkt_flags variable size to 64
>> bits
>>
>> Since commit 4332beee9 "mbuf: expand ol_flags field to 64-bits", the
>> packet flags are now 64 bits wide. Some occurences were forgotten in
>> the ixgbe driver.
> 
> I think it should be present in separate patch. I do no not see any relation to TSO

You are right, there is no relation with TSO. The reason why I initially
added it in the same patchset is because I discovered this bug while
implementing TSO and I wanted to avoid too much noise on the list.

I can take out some patches from the series, but maybe it's too late
and it would confuse patchwork.

Thomas, what do you think?

Regards,
Olivier
Thomas Monjalon Nov. 17, 2014, 5:40 p.m. UTC | #3
2014-11-17 18:03, Olivier MATZ:
> Hi Miroslaw,
> 
> On 11/17/2014 05:47 PM, Walukiewicz, Miroslaw wrote:
> > 
> > 
> >> -----Original Message-----
> >> From: Olivier Matz [mailto:olivier.matz@6wind.com]
> >> Sent: Friday, November 14, 2014 6:03 PM
> >> To: dev@dpdk.org
> >> Cc: olivier.matz@6wind.com; Walukiewicz, Miroslaw; Liu, Jijiang; Liu, Yong;
> >> jigsaw@gmail.com; Richardson, Bruce
> >> Subject: [PATCH v2 02/13] ixgbe: fix remaining pkt_flags variable size to 64
> >> bits
> >>
> >> Since commit 4332beee9 "mbuf: expand ol_flags field to 64-bits", the
> >> packet flags are now 64 bits wide. Some occurences were forgotten in
> >> the ixgbe driver.
> > 
> > I think it should be present in separate patch. I do no not see any relation to TSO
> 
> You are right, there is no relation with TSO. The reason why I initially
> added it in the same patchset is because I discovered this bug while
> implementing TSO and I wanted to avoid too much noise on the list.
> 
> I can take out some patches from the series, but maybe it's too late
> and it would confuse patchwork.
> 
> Thomas, what do you think?

In general, it's better to have only one feature in a patchset.
It's not a real problem here because TSO is planned for release 1.8 and fixes
are also welcome. So all the patches should enter in the coming days.
By the way, there is no problem with patchwork. You are free to choose :)
diff mbox

Patch

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index ecebbf6..7e470ce 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -817,7 +817,7 @@  end_of_tx:
 static inline uint64_t
 rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
 {
-	uint16_t pkt_flags;
+	uint64_t pkt_flags;
 
 	static uint64_t ip_pkt_types_map[16] = {
 		0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT,
@@ -834,7 +834,7 @@  rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
 	};
 
 #ifdef RTE_LIBRTE_IEEE1588
-	static uint32_t ip_pkt_etqf_map[8] = {
+	static uint64_t ip_pkt_etqf_map[8] = {
 		0, 0, 0, PKT_RX_IEEE1588_PTP,
 		0, 0, 0, 0,
 	};
@@ -903,7 +903,7 @@  ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
 	struct igb_rx_entry *rxep;
 	struct rte_mbuf *mb;
 	uint16_t pkt_len;
-	uint16_t pkt_flags;
+	uint64_t pkt_flags;
 	int s[LOOK_AHEAD], nb_dd;
 	int i, j, nb_rx = 0;
 
@@ -1335,7 +1335,7 @@  ixgbe_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	uint16_t nb_rx;
 	uint16_t nb_hold;
 	uint16_t data_len;
-	uint16_t pkt_flags;
+	uint64_t pkt_flags;
 
 	nb_rx = 0;
 	nb_hold = 0;
@@ -1511,9 +1511,9 @@  ixgbe_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 = (uint16_t)(pkt_flags |
+		pkt_flags = (pkt_flags |
 				rx_desc_status_to_pkt_flags(staterr));
-		pkt_flags = (uint16_t)(pkt_flags |
+		pkt_flags = (pkt_flags |
 				rx_desc_error_to_pkt_flags(staterr));
 		first_seg->ol_flags = pkt_flags;