* [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when configuration complies
@ 2018-03-29 20:13 eduser25
2018-04-02 12:14 ` Zhang, Qi Z
0 siblings, 1 reply; 5+ messages in thread
From: eduser25 @ 2018-03-29 20:13 UTC (permalink / raw)
To: qi.z.zhang; +Cc: dev, Eduard Serra
From: Eduard Serra <eduser25@gmail.com>
Scatter RX (scattered_rx) flag is currently not being resetted
when new configuration is suplied to reconfigure a port,
rendering the rx callback logic to always fall through the
scatter branch.
Signed-off-by: Eduard Serra <eduser25@gmail.com>
---
drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
drivers/net/i40e/i40e_rxtx.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 750d849..a072154 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1750,6 +1750,8 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct i40e_rx_queue *rxq)
if (dev_data->dev_conf.rxmode.enable_scatter ||
(rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
dev_data->scattered_rx = 1;
+ } else {
+ dev_data->scattered_rx = 0;
}
return 0;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 1217e5a..8698747 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2561,6 +2561,8 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq)
/* Check if scattered RX needs to be used. */
if ((rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
dev_data->scattered_rx = 1;
+ } else {
+ dev_data->scattered_rx = 0;
}
/* Init the RX tail regieter. */
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when configuration complies
2018-03-29 20:13 [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when configuration complies eduser25
@ 2018-04-02 12:14 ` Zhang, Qi Z
2018-04-06 8:46 ` Zhang, Helin
2018-04-06 15:53 ` Zhang, Helin
0 siblings, 2 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2018-04-02 12:14 UTC (permalink / raw)
To: eduser25; +Cc: dev
Hi Serra:
> -----Original Message-----
> From: eduser25@gmail.com [mailto:eduser25@gmail.com]
> Sent: Friday, March 30, 2018 4:13 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Eduard Serra <eduser25@gmail.com>
> Subject: [PATCH] net/i40e/vf: reset scatter_rx flag when configuration
> complies
>
> From: Eduard Serra <eduser25@gmail.com>
>
> Scatter RX (scattered_rx) flag is currently not being resetted when new
> configuration is suplied to reconfigure a port, rendering the rx callback logic to
s/suplied/supplied
> always fall through the scatter branch.
>
> Signed-off-by: Eduard Serra <eduser25@gmail.com>
> ---
> drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
> drivers/net/i40e/i40e_rxtx.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index 750d849..a072154 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -1750,6 +1750,8 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct
> i40e_rx_queue *rxq)
> if (dev_data->dev_conf.rxmode.enable_scatter ||
> (rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
> dev_data->scattered_rx = 1;
> + } else {
> + dev_data->scattered_rx = 0;
Scattered_rx should not be reset if any queue already required
You should reset it before the queue loop
> }
>
> return 0;
> diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index
> 1217e5a..8698747 100644
> --- a/drivers/net/i40e/i40e_rxtx.c
> +++ b/drivers/net/i40e/i40e_rxtx.c
> @@ -2561,6 +2561,8 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq)
> /* Check if scattered RX needs to be used. */
> if ((rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
> dev_data->scattered_rx = 1;
> + } else {
> + dev_data->scattered_rx = 0;
Same as above.
Regards
Qi
> }
>
> /* Init the RX tail regieter. */
> --
> 2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when configuration complies
2018-04-02 12:14 ` Zhang, Qi Z
@ 2018-04-06 8:46 ` Zhang, Helin
2018-04-06 15:53 ` Zhang, Helin
1 sibling, 0 replies; 5+ messages in thread
From: Zhang, Helin @ 2018-04-06 8:46 UTC (permalink / raw)
To: Zhang, Qi Z, eduser25; +Cc: dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z
> Sent: Monday, April 2, 2018 8:14 PM
> To: eduser25@gmail.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when
> configuration complies
>
> Hi Serra:
>
> > -----Original Message-----
> > From: eduser25@gmail.com [mailto:eduser25@gmail.com]
> > Sent: Friday, March 30, 2018 4:13 AM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; Eduard Serra <eduser25@gmail.com>
> > Subject: [PATCH] net/i40e/vf: reset scatter_rx flag when configuration
> > complies
> >
> > From: Eduard Serra <eduser25@gmail.com>
> >
> > Scatter RX (scattered_rx) flag is currently not being resetted when
> > new configuration is suplied to reconfigure a port, rendering the rx
> > callback logic to
>
> s/suplied/supplied
>
> > always fall through the scatter branch.
> >
> > Signed-off-by: Eduard Serra <eduser25@gmail.com>
> > ---
> > drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
> > drivers/net/i40e/i40e_rxtx.c | 2 ++
> > 2 files changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> > b/drivers/net/i40e/i40e_ethdev_vf.c
> > index 750d849..a072154 100644
> > --- a/drivers/net/i40e/i40e_ethdev_vf.c
> > +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> > @@ -1750,6 +1750,8 @@ i40evf_rxq_init(struct rte_eth_dev *dev, struct
> > i40e_rx_queue *rxq)
> > if (dev_data->dev_conf.rxmode.enable_scatter ||
> > (rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
> > dev_data->scattered_rx = 1;
> > + } else {
> > + dev_data->scattered_rx = 0;
>
> Scattered_rx should not be reset if any queue already required You should
> reset it before the queue loop
Does it mean a NACK?
/Helin
>
> > }
> >
> > return 0;
> > diff --git a/drivers/net/i40e/i40e_rxtx.c
> > b/drivers/net/i40e/i40e_rxtx.c index
> > 1217e5a..8698747 100644
> > --- a/drivers/net/i40e/i40e_rxtx.c
> > +++ b/drivers/net/i40e/i40e_rxtx.c
> > @@ -2561,6 +2561,8 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq)
> > /* Check if scattered RX needs to be used. */
> > if ((rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
> > dev_data->scattered_rx = 1;
> > + } else {
> > + dev_data->scattered_rx = 0;
>
> Same as above.
>
> Regards
> Qi
>
> > }
> >
> > /* Init the RX tail regieter. */
> > --
> > 2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when configuration complies
2018-04-02 12:14 ` Zhang, Qi Z
2018-04-06 8:46 ` Zhang, Helin
@ 2018-04-06 15:53 ` Zhang, Helin
2018-04-06 16:00 ` Zhang, Qi Z
1 sibling, 1 reply; 5+ messages in thread
From: Zhang, Helin @ 2018-04-06 15:53 UTC (permalink / raw)
To: Zhang, Qi Z, eduser25; +Cc: dev
> -----Original Message-----
> From: Zhang, Helin
> Sent: Friday, April 6, 2018 4:46 PM
> To: Zhang, Qi Z; eduser25@gmail.com
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] net/i40e/vf: reset scatter_rx flag when configuration
> complies
>
>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z
> > Sent: Monday, April 2, 2018 8:14 PM
> > To: eduser25@gmail.com
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag
> > when configuration complies
> >
> > Hi Serra:
> >
> > > -----Original Message-----
> > > From: eduser25@gmail.com [mailto:eduser25@gmail.com]
> > > Sent: Friday, March 30, 2018 4:13 AM
> > > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > > Cc: dev@dpdk.org; Eduard Serra <eduser25@gmail.com>
> > > Subject: [PATCH] net/i40e/vf: reset scatter_rx flag when
> > > configuration complies
> > >
> > > From: Eduard Serra <eduser25@gmail.com>
> > >
> > > Scatter RX (scattered_rx) flag is currently not being resetted when
> > > new configuration is suplied to reconfigure a port, rendering the rx
> > > callback logic to
> >
> > s/suplied/supplied
> >
> > > always fall through the scatter branch.
> > >
> > > Signed-off-by: Eduard Serra <eduser25@gmail.com>
> > > ---
> > > drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
> > > drivers/net/i40e/i40e_rxtx.c | 2 ++
> > > 2 files changed, 4 insertions(+)
> > >
> > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> > > b/drivers/net/i40e/i40e_ethdev_vf.c
> > > index 750d849..a072154 100644
> > > --- a/drivers/net/i40e/i40e_ethdev_vf.c
> > > +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> > > @@ -1750,6 +1750,8 @@ i40evf_rxq_init(struct rte_eth_dev *dev,
> > > struct i40e_rx_queue *rxq)
> > > if (dev_data->dev_conf.rxmode.enable_scatter ||
> > > (rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
> > > dev_data->scattered_rx = 1;
> > > + } else {
> > > + dev_data->scattered_rx = 0;
> >
> > Scattered_rx should not be reset if any queue already required You
> > should reset it before the queue loop
> Does it mean a NACK?
>
> /Helin
Anyway, please fix the checkpatch warnings reported on patchwork. Thanks!
/Helin
>
> >
> > > }
> > >
> > > return 0;
> > > diff --git a/drivers/net/i40e/i40e_rxtx.c
> > > b/drivers/net/i40e/i40e_rxtx.c index
> > > 1217e5a..8698747 100644
> > > --- a/drivers/net/i40e/i40e_rxtx.c
> > > +++ b/drivers/net/i40e/i40e_rxtx.c
> > > @@ -2561,6 +2561,8 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq)
> > > /* Check if scattered RX needs to be used. */
> > > if ((rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
> > > dev_data->scattered_rx = 1;
> > > + } else {
> > > + dev_data->scattered_rx = 0;
> >
> > Same as above.
> >
> > Regards
> > Qi
> >
> > > }
> > >
> > > /* Init the RX tail regieter. */
> > > --
> > > 2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when configuration complies
2018-04-06 15:53 ` Zhang, Helin
@ 2018-04-06 16:00 ` Zhang, Qi Z
0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2018-04-06 16:00 UTC (permalink / raw)
To: Zhang, Helin, eduser25; +Cc: dev
> -----Original Message-----
> From: Zhang, Helin
> Sent: Friday, April 6, 2018 11:54 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; eduser25@gmail.com
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] net/i40e/vf: reset scatter_rx flag when configuration
> complies
>
>
>
> > -----Original Message-----
> > From: Zhang, Helin
> > Sent: Friday, April 6, 2018 4:46 PM
> > To: Zhang, Qi Z; eduser25@gmail.com
> > Cc: dev@dpdk.org
> > Subject: RE: [PATCH] net/i40e/vf: reset scatter_rx flag when
> > configuration complies
> >
> >
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Qi Z
> > > Sent: Monday, April 2, 2018 8:14 PM
> > > To: eduser25@gmail.com
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag
> > > when configuration complies
> > >
> > > Hi Serra:
> > >
> > > > -----Original Message-----
> > > > From: eduser25@gmail.com [mailto:eduser25@gmail.com]
> > > > Sent: Friday, March 30, 2018 4:13 AM
> > > > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > > > Cc: dev@dpdk.org; Eduard Serra <eduser25@gmail.com>
> > > > Subject: [PATCH] net/i40e/vf: reset scatter_rx flag when
> > > > configuration complies
> > > >
> > > > From: Eduard Serra <eduser25@gmail.com>
> > > >
> > > > Scatter RX (scattered_rx) flag is currently not being resetted
> > > > when new configuration is suplied to reconfigure a port, rendering
> > > > the rx callback logic to
> > >
> > > s/suplied/supplied
> > >
> > > > always fall through the scatter branch.
> > > >
> > > > Signed-off-by: Eduard Serra <eduser25@gmail.com>
> > > > ---
> > > > drivers/net/i40e/i40e_ethdev_vf.c | 2 ++
> > > > drivers/net/i40e/i40e_rxtx.c | 2 ++
> > > > 2 files changed, 4 insertions(+)
> > > >
> > > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> > > > b/drivers/net/i40e/i40e_ethdev_vf.c
> > > > index 750d849..a072154 100644
> > > > --- a/drivers/net/i40e/i40e_ethdev_vf.c
> > > > +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> > > > @@ -1750,6 +1750,8 @@ i40evf_rxq_init(struct rte_eth_dev *dev,
> > > > struct i40e_rx_queue *rxq)
> > > > if (dev_data->dev_conf.rxmode.enable_scatter ||
> > > > (rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
> > > > dev_data->scattered_rx = 1;
> > > > + } else {
> > > > + dev_data->scattered_rx = 0;
> > >
> > > Scattered_rx should not be reset if any queue already required You
> > > should reset it before the queue loop
> > Does it mean a NACK?
Yes the fix is not correct.
> >
> > /Helin
> Anyway, please fix the checkpatch warnings reported on patchwork. Thanks!
>
> /Helin
> >
> > >
> > > > }
> > > >
> > > > return 0;
> > > > diff --git a/drivers/net/i40e/i40e_rxtx.c
> > > > b/drivers/net/i40e/i40e_rxtx.c index
> > > > 1217e5a..8698747 100644
> > > > --- a/drivers/net/i40e/i40e_rxtx.c
> > > > +++ b/drivers/net/i40e/i40e_rxtx.c
> > > > @@ -2561,6 +2561,8 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq)
> > > > /* Check if scattered RX needs to be used. */
> > > > if ((rxq->max_pkt_len + 2 * I40E_VLAN_TAG_SIZE) > buf_size) {
> > > > dev_data->scattered_rx = 1;
> > > > + } else {
> > > > + dev_data->scattered_rx = 0;
> > >
> > > Same as above.
> > >
> > > Regards
> > > Qi
> > >
> > > > }
> > > >
> > > > /* Init the RX tail regieter. */
> > > > --
> > > > 2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-04-06 16:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 20:13 [dpdk-dev] [PATCH] net/i40e/vf: reset scatter_rx flag when configuration complies eduser25
2018-04-02 12:14 ` Zhang, Qi Z
2018-04-06 8:46 ` Zhang, Helin
2018-04-06 15:53 ` Zhang, Helin
2018-04-06 16:00 ` Zhang, Qi Z
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).