[dpdk-dev] bnxt: Fix to set timestamp flag as well in the offload flags for the recieved pkt in case of PTP offload

Message ID 20180201050949.15769-1-somnath.kotur@broadcom.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Somnath Kotur Feb. 1, 2018, 5:09 a.m. UTC
  Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit Feb. 1, 2018, 3:24 p.m. UTC | #1
On 2/1/2018 5:09 AM, Somnath Kotur wrote:

Hi Somnath,

Can you please keep patch title brief (around 50 characters) and put more
content in commit log?

> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_rxr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index 82c93d6..430990d 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -459,7 +459,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
>  
>  	if ((rxcmp->flags_type & rte_cpu_to_le_16(RX_PKT_CMPL_FLAGS_MASK)) ==
>  	     RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP)
> -		mbuf->ol_flags |= PKT_RX_IEEE1588_PTP;
> +		mbuf->ol_flags |= PKT_RX_IEEE1588_PTP | PKT_RX_IEEE1588_TMST;
>  
>  	if (agg_buf)
>  		bnxt_rx_pages(rxq, mbuf, &tmp_raw_cons, agg_buf);
>
  
Somnath Kotur Feb. 1, 2018, 3:43 p.m. UTC | #2
Sure , will do a response

Thanks
Som

On Feb 1, 2018 8:54 PM, "Ferruh Yigit" <ferruh.yigit@intel.com> wrote:

> On 2/1/2018 5:09 AM, Somnath Kotur wrote:
>
> Hi Somnath,
>
> Can you please keep patch title brief (around 50 characters) and put more
> content in commit log?
>
> > Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> > ---
> >  drivers/net/bnxt/bnxt_rxr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> > index 82c93d6..430990d 100644
> > --- a/drivers/net/bnxt/bnxt_rxr.c
> > +++ b/drivers/net/bnxt/bnxt_rxr.c
> > @@ -459,7 +459,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
> >
> >       if ((rxcmp->flags_type & rte_cpu_to_le_16(RX_PKT_CMPL_FLAGS_MASK))
> ==
> >            RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP)
> > -             mbuf->ol_flags |= PKT_RX_IEEE1588_PTP;
> > +             mbuf->ol_flags |= PKT_RX_IEEE1588_PTP |
> PKT_RX_IEEE1588_TMST;
> >
> >       if (agg_buf)
> >               bnxt_rx_pages(rxq, mbuf, &tmp_raw_cons, agg_buf);
> >
>
>
  

Patch

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 82c93d6..430990d 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -459,7 +459,7 @@  static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 
 	if ((rxcmp->flags_type & rte_cpu_to_le_16(RX_PKT_CMPL_FLAGS_MASK)) ==
 	     RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP)
-		mbuf->ol_flags |= PKT_RX_IEEE1588_PTP;
+		mbuf->ol_flags |= PKT_RX_IEEE1588_PTP | PKT_RX_IEEE1588_TMST;
 
 	if (agg_buf)
 		bnxt_rx_pages(rxq, mbuf, &tmp_raw_cons, agg_buf);