[v3] net/ice: fix setting max frame size

Message ID 20191029125431.16862-1-jiaqix.min@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series [v3] net/ice: fix setting max frame size |

Checks

Context Check Description
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation fail Compilation issues

Commit Message

Min, JiaqiX Oct. 29, 2019, 12:54 p.m. UTC
Max frame size is not set to HW, so packets above the MTU
do not get dropped by HW. The patch fixed the issue.

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org

Signed-off-by: Min JiaqiX <jiaqix.min@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
v3:
* Changed Fixes line.
v2:
* Changed commit message.
---
 drivers/net/ice/ice_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Xiaolong Ye Oct. 30, 2019, 5:21 a.m. UTC | #1
Hi, Jiaqi

On 10/29, Min JiaqiX wrote:
>Max frame size is not set to HW, so packets above the MTU
>do not get dropped by HW. The patch fixed the issue.
>
>Fixes: 50370662b727 ("net/ice: support device and queue ops")
>Cc: stable@dpdk.org
>
>Signed-off-by: Min JiaqiX <jiaqix.min@intel.com>
>Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Sorry, the Reviewed-by was given by accident in V1.

>---
>v3:
>* Changed Fixes line.
>v2:
>* Changed commit message.
>---
> drivers/net/ice/ice_ethdev.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
>index 022b58c01..403305cfb 100644
>--- a/drivers/net/ice/ice_ethdev.c
>+++ b/drivers/net/ice/ice_ethdev.c
>@@ -2506,6 +2506,10 @@ ice_dev_start(struct rte_eth_dev *dev)
> 
> 	pf->adapter_stopped = false;
> 
>+	/* Set the max frame size */
>+	ice_aq_set_mac_cfg(hw,
>+		pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL);
>+

As I commented in V2, what if user doesn't set mtu, then the max_rx_pkt_len
would be 0, do we need a default max frame value in this case?

Thanks,
Xiaolong

> 	return 0;
> 
> 	/* stop the started queues if failed to start all queues */
>-- 
>2.17.1
>
  
Min, JiaqiX Oct. 30, 2019, 6:40 a.m. UTC | #2
Hi, Xiaolong

> -----Original Message-----
> From: Ye, Xiaolong
> Sent: Wednesday, October 30, 2019 1:22 PM
> To: Min, JiaqiX <jiaqix.min@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3] net/ice: fix setting max frame size
> 
> Hi, Jiaqi
> 
> On 10/29, Min JiaqiX wrote:
> >Max frame size is not set to HW, so packets above the MTU do not get
> >dropped by HW. The patch fixed the issue.
> >
> >Fixes: 50370662b727 ("net/ice: support device and queue ops")
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: Min JiaqiX <jiaqix.min@intel.com>
> >Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
> 
> Sorry, the Reviewed-by was given by accident in V1.

Reviewed-by in next patch will be removed.
> 
> >---
> >v3:
> >* Changed Fixes line.
> >v2:
> >* Changed commit message.
> >---
> > drivers/net/ice/ice_ethdev.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> >diff --git a/drivers/net/ice/ice_ethdev.c
> >b/drivers/net/ice/ice_ethdev.c index 022b58c01..403305cfb 100644
> >--- a/drivers/net/ice/ice_ethdev.c
> >+++ b/drivers/net/ice/ice_ethdev.c
> >@@ -2506,6 +2506,10 @@ ice_dev_start(struct rte_eth_dev *dev)
> >
> > 	pf->adapter_stopped = false;
> >
> >+	/* Set the max frame size */
> >+	ice_aq_set_mac_cfg(hw,
> >+		pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL);
> >+
> 
> As I commented in V2, what if user doesn't set mtu, then the
> max_rx_pkt_len would be 0, do we need a default max frame value in this
> case?
Agree.  Add check if 0 and default max frame value in this case to next patch.

> 
> Thanks,
> Xiaolong
> 
> > 	return 0;
> >
> > 	/* stop the started queues if failed to start all queues */
> >--
> >2.17.1
> >
  

Patch

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 022b58c01..403305cfb 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2506,6 +2506,10 @@  ice_dev_start(struct rte_eth_dev *dev)
 
 	pf->adapter_stopped = false;
 
+	/* Set the max frame size */
+	ice_aq_set_mac_cfg(hw,
+		pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL);
+
 	return 0;
 
 	/* stop the started queues if failed to start all queues */