[dpdk-dev] fm10k: set packet type for multi-segment packets

Message ID 1460662340-18034-1-git-send-email-michael.frasca@oracle.com (mailing list archive)
State Superseded, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Michael Frasca April 14, 2016, 7:32 p.m. UTC
  When building a chain of mbufs for a multi-segment packet, the
packet_type field resides at the end of the chain. It should be
copied forward to the head of the list.

Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")

Signed-off-by: Michael Frasca <michael.frasca@oracle.com>
---
 drivers/net/fm10k/fm10k_rxtx_vec.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Chen, Jing D April 18, 2016, 8:40 a.m. UTC | #1
Hi, Frasca,

> -----Original Message-----
> From: Michael Frasca [mailto:michael.frasca@oracle.com]
> Sent: Friday, April 15, 2016 3:32 AM
> To: Chen, Jing D
> Cc: dev@dpdk.org; Michael Frasca
> Subject: [PATCH] fm10k: set packet type for multi-segment packets
> 
> When building a chain of mbufs for a multi-segment packet, the
> packet_type field resides at the end of the chain. It should be
> copied forward to the head of the list.
> 
> Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")
> 
> Signed-off-by: Michael Frasca <michael.frasca@oracle.com>
> ---
>  drivers/net/fm10k/fm10k_rxtx_vec.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c
> b/drivers/net/fm10k/fm10k_rxtx_vec.c
> index f8efe8f..66f126f 100644
> --- a/drivers/net/fm10k/fm10k_rxtx_vec.c
> +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
> @@ -608,6 +608,7 @@ fm10k_reassemble_packets(struct fm10k_rx_queue
> *rxq,
>  				/* it's the last packet of the set */
>  				start->hash = end->hash;
>  				start->ol_flags = end->ol_flags;
> +				start->packet_type = end->packet_type;
>  				pkts[pkt_idx++] = start;
>  				start = end = NULL;
>  			}
> --
> 2.5.0
Good catch. Just one comment. We'll parse packet type until 
"RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE" is applied. Can we add this macro for
your change? Same to "hash" and "olf_flags".

Best Regards,
Mark
  
Michael Frasca April 18, 2016, 12:40 p.m. UTC | #2
Hi Mark,

Not a problem. I’ll post a v2 change with check for RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE.

Thanks,
Michael

> On Apr 18, 2016, at 4:40 AM, Chen, Jing D <jing.d.chen@intel.com> wrote:
> 
> Hi, Frasca,
> 
>> -----Original Message-----
>> From: Michael Frasca [mailto:michael.frasca@oracle.com]
>> Sent: Friday, April 15, 2016 3:32 AM
>> To: Chen, Jing D
>> Cc: dev@dpdk.org; Michael Frasca
>> Subject: [PATCH] fm10k: set packet type for multi-segment packets
>> 
>> When building a chain of mbufs for a multi-segment packet, the
>> packet_type field resides at the end of the chain. It should be
>> copied forward to the head of the list.
>> 
>> Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")
>> 
>> Signed-off-by: Michael Frasca <michael.frasca@oracle.com>
>> ---
>> drivers/net/fm10k/fm10k_rxtx_vec.c | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c
>> b/drivers/net/fm10k/fm10k_rxtx_vec.c
>> index f8efe8f..66f126f 100644
>> --- a/drivers/net/fm10k/fm10k_rxtx_vec.c
>> +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
>> @@ -608,6 +608,7 @@ fm10k_reassemble_packets(struct fm10k_rx_queue
>> *rxq,
>> 				/* it's the last packet of the set */
>> 				start->hash = end->hash;
>> 				start->ol_flags = end->ol_flags;
>> +				start->packet_type = end->packet_type;
>> 				pkts[pkt_idx++] = start;
>> 				start = end = NULL;
>> 			}
>> --
>> 2.5.0
> Good catch. Just one comment. We'll parse packet type until 
> "RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE" is applied. Can we add this macro for
> your change? Same to "hash" and "olf_flags".
> 
> Best Regards,
> Mark
  

Patch

diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index f8efe8f..66f126f 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -608,6 +608,7 @@  fm10k_reassemble_packets(struct fm10k_rx_queue *rxq,
 				/* it's the last packet of the set */
 				start->hash = end->hash;
 				start->ol_flags = end->ol_flags;
+				start->packet_type = end->packet_type;
 				pkts[pkt_idx++] = start;
 				start = end = NULL;
 			}