net/ice: fix missing MTU value setting

Message ID 20220407195719.11382-1-kevinx.liu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/ice: fix missing MTU value setting |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Kevin Liu April 7, 2022, 7:57 p.m. UTC
  In the DCF module, Missing maximum and minimum
MTU value settings.

This patch adds the settings of the maximum and
minimum MTU to correctly calculate the MTU value.

Fixes: 2fe6f1b76279 ("drivers/net: advertise no support for keeping flow rules")
Cc: stable@dpdk.org

Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
---
 drivers/net/ice/ice_dcf_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Qi Zhang May 17, 2022, 7:49 a.m. UTC | #1
> -----Original Message-----
> From: Liu, KevinX <kevinx.liu@intel.com>
> Sent: Friday, April 8, 2022 3:57 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu, KevinX
> <kevinx.liu@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/ice: fix missing MTU value setting
> 
> In the DCF module, Missing maximum and minimum MTU value settings.
> 
> This patch adds the settings of the maximum and minimum MTU to correctly
> calculate the MTU value.
> 
> Fixes: 2fe6f1b76279 ("drivers/net: advertise no support for keeping flow rules")

This does not looks like a correct fixline
  
Kevin Liu May 17, 2022, 7:59 a.m. UTC | #2
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: 2022年5月17日 15:50
> To: Liu, KevinX <kevinx.liu@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>; stable@dpdk.org
> Subject: RE: [PATCH] net/ice: fix missing MTU value setting
> 
> 
> 
> > -----Original Message-----
> > From: Liu, KevinX <kevinx.liu@intel.com>
> > Sent: Friday, April 8, 2022 3:57 AM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu,
> > KevinX <kevinx.liu@intel.com>; stable@dpdk.org
> > Subject: [PATCH] net/ice: fix missing MTU value setting
> >
> > In the DCF module, Missing maximum and minimum MTU value settings.
> >
> > This patch adds the settings of the maximum and minimum MTU to
> > correctly calculate the MTU value.
> >
> > Fixes: 2fe6f1b76279 ("drivers/net: advertise no support for keeping
> > flow rules")
> 
> This does not looks like a correct fixline
> 
I reconfirmed that fixline is correct.
  
Kevin Liu May 17, 2022, 8:06 a.m. UTC | #3
Sorry, I misunderstood, I will send v2

> -----Original Message-----
> From: Liu, KevinX
> Sent: 2022年5月17日 16:00
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>; stable@dpdk.org
> Subject: RE: [PATCH] net/ice: fix missing MTU value setting
> 
> 
> 
> > -----Original Message-----
> > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Sent: 2022年5月17日 15:50
> > To: Liu, KevinX <kevinx.liu@intel.com>; dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Yang, SteveX
> > <stevex.yang@intel.com>; stable@dpdk.org
> > Subject: RE: [PATCH] net/ice: fix missing MTU value setting
> >
> >
> >
> > > -----Original Message-----
> > > From: Liu, KevinX <kevinx.liu@intel.com>
> > > Sent: Friday, April 8, 2022 3:57 AM
> > > To: dev@dpdk.org
> > > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> > > <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Liu,
> > > KevinX <kevinx.liu@intel.com>; stable@dpdk.org
> > > Subject: [PATCH] net/ice: fix missing MTU value setting
> > >
> > > In the DCF module, Missing maximum and minimum MTU value settings.
> > >
> > > This patch adds the settings of the maximum and minimum MTU to
> > > correctly calculate the MTU value.
> > >
> > > Fixes: 2fe6f1b76279 ("drivers/net: advertise no support for keeping
> > > flow rules")
> >
> > This does not looks like a correct fixline
> >
> I reconfirmed that fixline is correct.
  

Patch

diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 8005eb2ab8..0da267db1f 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -713,6 +713,8 @@  ice_dcf_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->reta_size = hw->vf_res->rss_lut_size;
 	dev_info->flow_type_rss_offloads = ICE_RSS_OFFLOAD_ALL;
 	dev_info->dev_capa &= ~RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP;
+	dev_info->max_mtu = dev_info->max_rx_pktlen - ICE_ETH_OVERHEAD;
+	dev_info->min_mtu = RTE_ETHER_MIN_MTU;
 
 	dev_info->rx_offload_capa =
 		RTE_ETH_RX_OFFLOAD_VLAN_STRIP |