[dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup

2014-12-24 Thread Ouyang, Changchun
Hi Helin,

> -Original Message-
> From: Zhang, Helin
> Sent: Wednesday, December 24, 2014 11:54 AM
> To: Ouyang, Changchun
> Cc: dev at dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> 
> 
> 
> > -Original Message-
> > From: Ouyang, Changchun
> > Sent: Wednesday, December 24, 2014 11:50 AM
> > To: Zhang, Helin
> > Cc: dev at dpdk.org; Ouyang, Changchun
> > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> >
> > Hi Helin,
> >
> > > -Original Message-
> > > From: Zhang, Helin
> > > Sent: Wednesday, December 24, 2014 11:41 AM
> > > To: Ouyang, Changchun
> > > Cc: dev at dpdk.org
> > > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> > >
> > > Hi Changchun
> > >
> > > > -Original Message-
> > > > From: Ouyang, Changchun
> > > > Sent: Wednesday, December 24, 2014 11:22 AM
> > > > To: Zhang, Helin; dev at dpdk.org
> > > > Cc: Ouyang, Changchun
> > > > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> > > >
> > > > Hi Helin,
> > > >
> > > > > -Original Message-
> > > > > From: Zhang, Helin
> > > > > Sent: Wednesday, December 24, 2014 11:08 AM
> > > > > To: Ouyang, Changchun; dev at dpdk.org
> > > > > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> > > > >
> > > > > Is header split really supported in ixgbe? I guess not. If not,
> > > > > this code changes are not needed at all.
> > > > >
> > > >
> > > > I don't try to modify any logic here, as you know vf rss don't
> > > > have nothing to do with header split.
> > > But you modified code for header split. Have you validated it?
> > >
> > > > You mean " guess not ", can you 'make sure of it' rather than 'guess'
> > > > if you want to remove those codes?
> > > I did not see anywhere can enable ixgbe header split. It is your
> > > turn to make sure if your code changes are needed and correct. I
> > > don't want to remove any code, just want to know if your code have
> > > been validated for
> > header split.
> >
> > Yes, I make sure the code change is correct, and already validate the
> > code change on my platform, besides that, we also have validation team
> > to do further validation. any other concern then?
> I still don't know how to enable header split for ixgbe. Any answer from you?

As this patch aims at enabling vf rss, how about let's focus on it and don't 
fork to other features?
Thanks for your comments

Changchun



[dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup

2014-12-24 Thread Zhang, Helin


> -Original Message-
> From: Ouyang, Changchun
> Sent: Wednesday, December 24, 2014 11:50 AM
> To: Zhang, Helin
> Cc: dev at dpdk.org; Ouyang, Changchun
> Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> 
> Hi Helin,
> 
> > -Original Message-
> > From: Zhang, Helin
> > Sent: Wednesday, December 24, 2014 11:41 AM
> > To: Ouyang, Changchun
> > Cc: dev at dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> >
> > Hi Changchun
> >
> > > -Original Message-
> > > From: Ouyang, Changchun
> > > Sent: Wednesday, December 24, 2014 11:22 AM
> > > To: Zhang, Helin; dev at dpdk.org
> > > Cc: Ouyang, Changchun
> > > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> > >
> > > Hi Helin,
> > >
> > > > -Original Message-----
> > > > From: Zhang, Helin
> > > > Sent: Wednesday, December 24, 2014 11:08 AM
> > > > To: Ouyang, Changchun; dev at dpdk.org
> > > > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> > > >
> > > > Is header split really supported in ixgbe? I guess not. If not,
> > > > this code changes are not needed at all.
> > > >
> > >
> > > I don't try to modify any logic here, as you know vf rss don't have
> > > nothing to do with header split.
> > But you modified code for header split. Have you validated it?
> >
> > > You mean " guess not ", can you 'make sure of it' rather than 'guess'
> > > if you want to remove those codes?
> > I did not see anywhere can enable ixgbe header split. It is your turn
> > to make sure if your code changes are needed and correct. I don't want
> > to remove any code, just want to know if your code have been validated for
> header split.
> 
> Yes, I make sure the code change is correct, and already validate the code
> change on my platform, besides that, we also have validation team to do
> further validation. any other concern then?
I still don't know how to enable header split for ixgbe. Any answer from you?

Regards,
Helin

> 
> Thanks
> Changchun



[dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup

2014-12-24 Thread Ouyang, Changchun
Hi Helin,

> -Original Message-
> From: Zhang, Helin
> Sent: Wednesday, December 24, 2014 11:41 AM
> To: Ouyang, Changchun
> Cc: dev at dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> 
> Hi Changchun
> 
> > -Original Message-
> > From: Ouyang, Changchun
> > Sent: Wednesday, December 24, 2014 11:22 AM
> > To: Zhang, Helin; dev at dpdk.org
> > Cc: Ouyang, Changchun
> > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> >
> > Hi Helin,
> >
> > > -Original Message-
> > > From: Zhang, Helin
> > > Sent: Wednesday, December 24, 2014 11:08 AM
> > > To: Ouyang, Changchun; dev at dpdk.org
> > > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> > >
> > > Is header split really supported in ixgbe? I guess not. If not, this
> > > code changes are not needed at all.
> > >
> >
> > I don't try to modify any logic here, as you know vf rss don't have
> > nothing to do with header split.
> But you modified code for header split. Have you validated it?
> 
> > You mean " guess not ", can you 'make sure of it' rather than 'guess'
> > if you want to remove those codes?
> I did not see anywhere can enable ixgbe header split. It is your turn to make
> sure if your code changes are needed and correct. I don't want to remove
> any code, just want to know if your code have been validated for header split.

Yes, I make sure the code change is correct, and already validate the code 
change on my platform, besides that, 
we also have validation team to do further validation. any other concern then?

Thanks
Changchun



[dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup

2014-12-24 Thread Zhang, Helin
Hi Changchun

> -Original Message-
> From: Ouyang, Changchun
> Sent: Wednesday, December 24, 2014 11:22 AM
> To: Zhang, Helin; dev at dpdk.org
> Cc: Ouyang, Changchun
> Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> 
> Hi Helin,
> 
> > -Original Message-
> > From: Zhang, Helin
> > Sent: Wednesday, December 24, 2014 11:08 AM
> > To: Ouyang, Changchun; dev at dpdk.org
> > Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> >
> > Is header split really supported in ixgbe? I guess not. If not, this
> > code changes are not needed at all.
> >
> 
> I don't try to modify any logic here, as you know vf rss don't have nothing 
> to do
> with header split.
But you modified code for header split. Have you validated it?

> You mean " guess not ", can you 'make sure of it' rather than 'guess' if you 
> want
> to remove those codes?
I did not see anywhere can enable ixgbe header split. It is your turn to make 
sure if your
code changes are needed and correct. I don't want to remove any code, just want 
to know if your code have been validated for header split.

> 
> Thanks
> Changchun



[dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup

2014-12-24 Thread Ouyang, Changchun
Hi Helin,

> -Original Message-
> From: Zhang, Helin
> Sent: Wednesday, December 24, 2014 11:08 AM
> To: Ouyang, Changchun; dev at dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> 
> Is header split really supported in ixgbe? I guess not. If not, this code 
> changes
> are not needed at all.
> 

I don't try to modify any logic here, as you know vf rss don't have nothing to 
do with header split.
You mean " guess not ", can you 'make sure of it' rather than 'guess' if you 
want to remove those codes?

Thanks
Changchun



[dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup

2014-12-24 Thread Zhang, Helin
Is header split really supported in ixgbe? I guess not. If not, this code 
changes are not needed at all.

Regards,
Helin

> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ouyang Changchun
> Sent: Wednesday, December 24, 2014 10:57 AM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH v2 1/6] ixgbe: Code cleanup
> 
> Put global register configuring out of loop for queue; also fix typo and 
> indent.
> 
> Signed-off-by: Changchun Ouyang 
> ---
>  lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 29 +++--
>  1 file changed, 15 insertions(+), 14 deletions(-)
> 
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> index 5c36bff..f58f98e 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
> @@ -3985,7 +3985,7 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
>   struct igb_rx_queue *rxq;
>   struct rte_pktmbuf_pool_private *mbp_priv;
>   uint64_t bus_addr;
> - uint32_t srrctl;
> + uint32_t srrctl, psrtype = 0;
>   uint16_t buf_size;
>   uint16_t i;
>   int ret;
> @@ -4039,20 +4039,10 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
>* Configure Header Split
>*/
>   if (dev->data->dev_conf.rxmode.header_split) {
> -
> - /* Must setup the PSRTYPE register */
> - uint32_t psrtype;
> - psrtype = IXGBE_PSRTYPE_TCPHDR |
> - IXGBE_PSRTYPE_UDPHDR   |
> - IXGBE_PSRTYPE_IPV4HDR  |
> - IXGBE_PSRTYPE_IPV6HDR;
> -
> - IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE(i), psrtype);
> -
>   srrctl = ((dev->data->dev_conf.rxmode.split_hdr_size <<
> -IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT) &
> -   IXGBE_SRRCTL_BSIZEHDR_MASK);
> - srrctl |= E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS;
> + IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT) &
> + IXGBE_SRRCTL_BSIZEHDR_MASK);
> + srrctl |= IXGBE_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS;
>   } else
>  #endif
>   srrctl = IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF; @@ -4095,6
> +4085,17 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev)
>   }
>   }
> 
> +#ifdef RTE_HEADER_SPLIT_ENABLE
> + if (dev->data->dev_conf.rxmode.header_split) {
> + /* Must setup the PSRTYPE register */
> + psrtype = IXGBE_PSRTYPE_TCPHDR |
> + IXGBE_PSRTYPE_UDPHDR   |
> + IXGBE_PSRTYPE_IPV4HDR  |
> + IXGBE_PSRTYPE_IPV6HDR;
> +#endif
> +
> + IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, psrtype);
> +
>   if (dev->data->dev_conf.rxmode.enable_scatter) {
>   if (!dev->data->scattered_rx)
>   PMD_INIT_LOG(DEBUG, "forcing scatter mode");
> --
> 1.8.4.2