[dpdk-dev,v10,19/19] mbuf: remove old packet type bit masks

Message ID 2161590.Y1eMLetJSj@xps13 (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

Thomas Monjalon July 13, 2015, 4:13 p.m. UTC
  2015-07-10 00:31, Helin Zhang:
> As unified packet types are used instead, those old bit masks and
> the relevant macros for packet type indication need to be removed.

It breaks mlx4 and cxgbe drivers.

The mlx4 driver didn't have the chance to be updated in this series.
Adrien, please, could you help Helin to convert ol_flags to packet type?

The cxgbe changes need to be updated after
78fc1a716ae8 ("cxgbe: improve Rx performance")
I suggest this update:
  

Comments

Zhang, Helin July 13, 2015, 4:25 p.m. UTC | #1
Hi Thomas

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, July 13, 2015 9:13 AM
> To: Zhang, Helin
> Cc: dev@dpdk.org; Adrien Mazarguil
> Subject: Re: [dpdk-dev] [PATCH v10 19/19] mbuf: remove old packet type bit
> masks
> 
> 2015-07-10 00:31, Helin Zhang:
> > As unified packet types are used instead, those old bit masks and the
> > relevant macros for packet type indication need to be removed.
> 
> It breaks mlx4 and cxgbe drivers.
> 
> The mlx4 driver didn't have the chance to be updated in this series.
> Adrien, please, could you help Helin to convert ol_flags to packet type?
I think I have already reworked with that changes in v9 and v10 recently.
http://www.dpdk.org/dev/patchwork/patch/6253/

Regards,
Helin

> 
> The cxgbe changes need to be updated after
> 78fc1a716ae8 ("cxgbe: improve Rx performance") I suggest this update:
> 
> --- a/drivers/net/cxgbe/sge.c
> +++ b/drivers/net/cxgbe/sge.c
> @@ -1419,7 +1419,11 @@ static int process_responses(struct sge_rspq *q, int
> budget,
>                         unmap_rx_buf(&rxq->fl);
> 
>                         if (cpl->l2info & htonl(F_RXF_IP)) {
> +#ifdef RTE_NEXT_ABI
> +                               mbuf->packet_type = RTE_PTYPE_L3_IPV4;
> +#else
>                                 pkt->ol_flags |= PKT_RX_IPV4_HDR;
> +#endif
>                                 if (unlikely(!csum_ok))
>                                         pkt->ol_flags |=
> PKT_RX_IP_CKSUM_BAD;
> 
> @@ -1427,7 +1431,11 @@ static int process_responses(struct sge_rspq *q, int
> budget,
>                                      htonl(F_RXF_UDP | F_RXF_TCP))
> && !csum_ok)
>                                         pkt->ol_flags |=
> PKT_RX_L4_CKSUM_BAD;
>                         } else if (cpl->l2info & htonl(F_RXF_IP6)) {
> +#ifdef RTE_NEXT_ABI
> +                               mbuf->packet_type = RTE_PTYPE_L3_IPV6;
> +#else
>                                 pkt->ol_flags |= PKT_RX_IPV6_HDR;
> +#endif
>                         }
  
Thomas Monjalon July 13, 2015, 4:27 p.m. UTC | #2
2015-07-13 16:25, Zhang, Helin:
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > 2015-07-10 00:31, Helin Zhang:
> > > As unified packet types are used instead, those old bit masks and the
> > > relevant macros for packet type indication need to be removed.
> > 
> > It breaks mlx4 and cxgbe drivers.
[...]
> I think I have already reworked with that changes in v9 and v10 recently.
> http://www.dpdk.org/dev/patchwork/patch/6253/

No, your changes were for t4_ethrx_handler().
Since recent cxgbe change, we also need to update process_responses().

> > The cxgbe changes need to be updated after
> > 78fc1a716ae8 ("cxgbe: improve Rx performance") I suggest this update:
> > 
> > --- a/drivers/net/cxgbe/sge.c
> > +++ b/drivers/net/cxgbe/sge.c
> > @@ -1419,7 +1419,11 @@ static int process_responses(struct sge_rspq *q, int
> > budget,
> >                         unmap_rx_buf(&rxq->fl);
> > 
> >                         if (cpl->l2info & htonl(F_RXF_IP)) {
> > +#ifdef RTE_NEXT_ABI
> > +                               mbuf->packet_type = RTE_PTYPE_L3_IPV4;
> > +#else
> >                                 pkt->ol_flags |= PKT_RX_IPV4_HDR;
> > +#endif
> >                                 if (unlikely(!csum_ok))
> >                                         pkt->ol_flags |=
> > PKT_RX_IP_CKSUM_BAD;
> > 
> > @@ -1427,7 +1431,11 @@ static int process_responses(struct sge_rspq *q, int
> > budget,
> >                                      htonl(F_RXF_UDP | F_RXF_TCP))
> > && !csum_ok)
> >                                         pkt->ol_flags |=
> > PKT_RX_L4_CKSUM_BAD;
> >                         } else if (cpl->l2info & htonl(F_RXF_IP6)) {
> > +#ifdef RTE_NEXT_ABI
> > +                               mbuf->packet_type = RTE_PTYPE_L3_IPV6;
> > +#else
> >                                 pkt->ol_flags |= PKT_RX_IPV6_HDR;
> > +#endif
> >                         }
>
  
Zhang, Helin July 13, 2015, 4:32 p.m. UTC | #3
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, July 13, 2015 9:28 AM
> To: Zhang, Helin
> Cc: dev@dpdk.org; Adrien Mazarguil; Rahul Lakkireddy
> Subject: Re: [dpdk-dev] [PATCH v10 19/19] mbuf: remove old packet type bit
> masks
> 
> 2015-07-13 16:25, Zhang, Helin:
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > > 2015-07-10 00:31, Helin Zhang:
> > > > As unified packet types are used instead, those old bit masks and
> > > > the relevant macros for packet type indication need to be removed.
> > >
> > > It breaks mlx4 and cxgbe drivers.
> [...]
> > I think I have already reworked with that changes in v9 and v10 recently.
> > http://www.dpdk.org/dev/patchwork/patch/6253/
> 
> No, your changes were for t4_ethrx_handler().
> Since recent cxgbe change, we also need to update process_responses().
OK. Thanks! It involves so many components.
Thank you all for helping on unified packet type!

- Helin

> 
> > > The cxgbe changes need to be updated after
> > > 78fc1a716ae8 ("cxgbe: improve Rx performance") I suggest this update:
> > >
> > > --- a/drivers/net/cxgbe/sge.c
> > > +++ b/drivers/net/cxgbe/sge.c
> > > @@ -1419,7 +1419,11 @@ static int process_responses(struct sge_rspq
> > > *q, int budget,
> > >                         unmap_rx_buf(&rxq->fl);
> > >
> > >                         if (cpl->l2info & htonl(F_RXF_IP)) {
> > > +#ifdef RTE_NEXT_ABI
> > > +                               mbuf->packet_type =
> > > +RTE_PTYPE_L3_IPV4; #else
> > >                                 pkt->ol_flags |= PKT_RX_IPV4_HDR;
> > > +#endif
> > >                                 if (unlikely(!csum_ok))
> > >                                         pkt->ol_flags |=
> > > PKT_RX_IP_CKSUM_BAD;
> > >
> > > @@ -1427,7 +1431,11 @@ static int process_responses(struct sge_rspq
> > > *q, int budget,
> > >                                      htonl(F_RXF_UDP | F_RXF_TCP))
> > > && !csum_ok)
> > >                                         pkt->ol_flags |=
> > > PKT_RX_L4_CKSUM_BAD;
> > >                         } else if (cpl->l2info & htonl(F_RXF_IP6)) {
> > > +#ifdef RTE_NEXT_ABI
> > > +                               mbuf->packet_type =
> > > +RTE_PTYPE_L3_IPV6; #else
> > >                                 pkt->ol_flags |= PKT_RX_IPV6_HDR;
> > > +#endif
> > >                         }
> >
>
  
Zhang, Helin July 13, 2015, 5:58 p.m. UTC | #4
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, July 13, 2015 9:13 AM
> To: Zhang, Helin
> Cc: dev@dpdk.org; Adrien Mazarguil
> Subject: Re: [dpdk-dev] [PATCH v10 19/19] mbuf: remove old packet type bit
> masks
> 
> 2015-07-10 00:31, Helin Zhang:
> > As unified packet types are used instead, those old bit masks and the
> > relevant macros for packet type indication need to be removed.
> 
> It breaks mlx4 and cxgbe drivers.
> 
> The mlx4 driver didn't have the chance to be updated in this series.
> Adrien, please, could you help Helin to convert ol_flags to packet type?
> 
> The cxgbe changes need to be updated after
> 78fc1a716ae8 ("cxgbe: improve Rx performance") I suggest this update:
> 
> --- a/drivers/net/cxgbe/sge.c
> +++ b/drivers/net/cxgbe/sge.c
> @@ -1419,7 +1419,11 @@ static int process_responses(struct sge_rspq *q, int
> budget,
>                         unmap_rx_buf(&rxq->fl);
> 
>                         if (cpl->l2info & htonl(F_RXF_IP)) {
> +#ifdef RTE_NEXT_ABI
> +                               mbuf->packet_type = RTE_PTYPE_L3_IPV4;
> +#else
>                                 pkt->ol_flags |= PKT_RX_IPV4_HDR;
> +#endif
>                                 if (unlikely(!csum_ok))
>                                         pkt->ol_flags |=
> PKT_RX_IP_CKSUM_BAD;
> 
> @@ -1427,7 +1431,11 @@ static int process_responses(struct sge_rspq *q, int
> budget,
>                                      htonl(F_RXF_UDP | F_RXF_TCP))
> && !csum_ok)
>                                         pkt->ol_flags |=
> PKT_RX_L4_CKSUM_BAD;
>                         } else if (cpl->l2info & htonl(F_RXF_IP6)) {
> +#ifdef RTE_NEXT_ABI
> +                               mbuf->packet_type = RTE_PTYPE_L3_IPV6;
> +#else
>                                 pkt->ol_flags |= PKT_RX_IPV6_HDR;
> +#endif
>                         }

Acked-by: Helin Zhang <helin.zhang@intel.com>
  

Patch

--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1419,7 +1419,11 @@  static int process_responses(struct sge_rspq *q, int budget,
                        unmap_rx_buf(&rxq->fl);
 
                        if (cpl->l2info & htonl(F_RXF_IP)) {
+#ifdef RTE_NEXT_ABI
+                               mbuf->packet_type = RTE_PTYPE_L3_IPV4;
+#else
                                pkt->ol_flags |= PKT_RX_IPV4_HDR;
+#endif
                                if (unlikely(!csum_ok))
                                        pkt->ol_flags |= PKT_RX_IP_CKSUM_BAD;
 
@@ -1427,7 +1431,11 @@  static int process_responses(struct sge_rspq *q, int budget,
                                     htonl(F_RXF_UDP | F_RXF_TCP)) && !csum_ok)
                                        pkt->ol_flags |= PKT_RX_L4_CKSUM_BAD;
                        } else if (cpl->l2info & htonl(F_RXF_IP6)) {
+#ifdef RTE_NEXT_ABI
+                               mbuf->packet_type = RTE_PTYPE_L3_IPV6;
+#else
                                pkt->ol_flags |= PKT_RX_IPV6_HDR;
+#endif
                        }