Max frame size is not set to HW, so packets above the MTU do not get dropped by HW. The patch fixed the issue. Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> --- 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); + return 0; /* stop the started queues if failed to start all queues */ -- 2.17.1
Hi,
Could you provide the Fixes tag and cc stable?
Thanks,
Xiaolong
On 10/24, 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.
>
>Signed-off-by: Min JiaqiX <jiaqix.min@intel.com>
>---
> 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);
>+
> return 0;
>
> /* stop the started queues if failed to start all queues */
>--
>2.17.1
>
Hi Xiaolong, > -----Original Message----- > From: Ye, Xiaolong > Sent: Friday, October 25, 2019 11:06 AM > To: Min, JiaqiX <jiaqix.min@intel.com> > Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming > <qiming.yang@intel.com> > Subject: Re: [dpdk-dev] [PATCH] net/ice: set max frame size > > Hi, > > Could you provide the Fixes tag and cc stable? > It's a persistent issue, maybe it is an implementation miss. So Fixes tag can't be provided. Like this, need cc stable? > Thanks, > > > On 10/24, 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. > > > >Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> > >--- > > 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); > >+ > > return 0; > > > > /* stop the started queues if failed to start all queues */ > >-- > >2.17.1 > >
On 25/10/2019 04:39, Min, JiaqiX wrote: > Hi Xiaolong, > >> -----Original Message----- >> From: Ye, Xiaolong >> Sent: Friday, October 25, 2019 11:06 AM >> To: Min, JiaqiX <jiaqix.min@intel.com> >> Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming >> <qiming.yang@intel.com> >> Subject: Re: [dpdk-dev] [PATCH] net/ice: set max frame size >> >> Hi, >> >> Could you provide the Fixes tag and cc stable? >> > > It's a persistent issue, maybe it is an implementation miss. > So Fixes tag can't be provided. Like this, need cc stable? > If it is an implementation miss since the driver was written then please set the Fixes tag to the commit where the driver was introduced. >> Thanks, >> >> >> On 10/24, 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. >>> >>> Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> >>> --- >>> 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); >>> + >>> return 0; >>> >>> /* stop the started queues if failed to start all queues */ >>> -- >>> 2.17.1 >>>
Hi, Jiaqi On 10/25, Min, JiaqiX wrote: >Hi Xiaolong, > >> -----Original Message----- >> From: Ye, Xiaolong >> Sent: Friday, October 25, 2019 11:06 AM >> To: Min, JiaqiX <jiaqix.min@intel.com> >> Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Yang, Qiming >> <qiming.yang@intel.com> >> Subject: Re: [dpdk-dev] [PATCH] net/ice: set max frame size >> >> Hi, >> >> Could you provide the Fixes tag and cc stable? >> > >It's a persistent issue, maybe it is an implementation miss. >So Fixes tag can't be provided. Like this, need cc stable? I think in this case, the fix tag could be the first commit that introduced icd driver. Thanks, Xiaolong > >> Thanks, >> >> >> On 10/24, 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. >> > >> >Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> >> >--- >> > 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); >> >+ >> > return 0; >> > >> > /* stop the started queues if failed to start all queues */ >> >-- >> >2.17.1 >> >
On 10/28, 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: ae2bdd0219cb ("net/ice: support MTU setting") We should set max frame size to HW in the beginning when the driver was introduced, so the fix commit should be 50370662b727 ("net/ice: support device and queue ops") Fix this while merging. >Cc: stable@dpdk.org > >Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> >--- >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); >+ Why set the max frame size to HW in start ops, not in init stage like in i40e? and what if max_rx_pkt_len hasn't been set? Thanks, Xiaolong > return 0; > > /* stop the started queues if failed to start all queues */ >-- >2.17.1 > Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com> Applied to dpdk-next-net-intel. Thanks.
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: ae2bdd0219cb ("net/ice: support MTU setting") Cc: stable@dpdk.org Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> --- 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); + return 0; /* stop the started queues if failed to start all queues */ -- 2.17.1
On 10/28, Ye Xiaolong wrote:
>Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
>
>Applied to dpdk-next-net-intel. Thanks.
Sorry for the above misleading message, this patch is still under discussion,
not merged yet.
Thanks,
Xiaolong
Hi Xiaolong, > -----Original Message----- > From: Ye, Xiaolong > Sent: Monday, October 28, 2019 4:46 PM > To: Min, JiaqiX <jiaqix.min@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame size > > On 10/28, 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: ae2bdd0219cb ("net/ice: support MTU setting") > > We should set max frame size to HW in the beginning when the driver was > introduced, so the fix commit should be 50370662b727 ("net/ice: support > device and queue ops") Modify commit message in patch v3. > > Fix this while merging. > > >Cc: stable@dpdk.org > > > >Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> > >--- > >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); > >+ > > Why set the max frame size to HW in start ops, not in init stage like in i40e? > and what if max_rx_pkt_len hasn't been set? > max_rx_pkt_len need to be set to HW when set mtu , init stage won't be called when open port again. Appendix: Steps for using Example/ethtool to set mtu: EthApp>stop 0 EthApp>mtu 0 200 EthApp>open 0 > > Thanks, > Xiaolong > > > > return 0; > > > > /* stop the started queues if failed to start all queues */ > >-- > >2.17.1 > > > > Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com> > > Applied to dpdk-next-net-intel. Thanks.
On 10/29, Min, JiaqiX wrote: >Hi Xiaolong, > >> -----Original Message----- >> From: Ye, Xiaolong >> Sent: Monday, October 28, 2019 4:46 PM >> To: Min, JiaqiX <jiaqix.min@intel.com> >> Cc: dev@dpdk.org; stable@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame size >> >> On 10/28, 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: ae2bdd0219cb ("net/ice: support MTU setting") >> >> We should set max frame size to HW in the beginning when the driver was >> introduced, so the fix commit should be 50370662b727 ("net/ice: support >> device and queue ops") >Modify commit message in patch v3. >> >> Fix this while merging. >> >> >Cc: stable@dpdk.org >> > >> >Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> >> >--- >> >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); >> >+ >> >> Why set the max frame size to HW in start ops, not in init stage like in i40e? >> and what if max_rx_pkt_len hasn't been set? >> >max_rx_pkt_len need to be set to HW when set mtu , init stage won't be called when open port again. Agree, I think it makes sense to set max frame size to hw in start ops, but 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? And since i40e doesn't update max frame size to HW in start ops, do you think it needs a fix? Thanks, Xiaolong > >Appendix: >Steps for using Example/ethtool to set mtu: >EthApp>stop 0 >EthApp>mtu 0 200 >EthApp>open 0 > >> >> Thanks, >> Xiaolong >> >> >> > return 0; >> > >> > /* stop the started queues if failed to start all queues */ >> >-- >> >2.17.1 >> > >> >> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com> >> >> Applied to dpdk-next-net-intel. Thanks.
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(+) 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 */ -- 2.17.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 >
Hi, Xiaolong > -----Original Message----- > From: Ye, Xiaolong > Sent: Tuesday, October 29, 2019 1:07 PM > To: Min, JiaqiX <jiaqix.min@intel.com> > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame size > > On 10/29, Min, JiaqiX wrote: > >Hi Xiaolong, > > > >> -----Original Message----- > >> From: Ye, Xiaolong > >> Sent: Monday, October 28, 2019 4:46 PM > >> To: Min, JiaqiX <jiaqix.min@intel.com> > >> Cc: dev@dpdk.org; stable@dpdk.org > >> Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix setting max frame > >> size > >> > >> On 10/28, 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: ae2bdd0219cb ("net/ice: support MTU setting") > >> > >> We should set max frame size to HW in the beginning when the driver > >> was introduced, so the fix commit should be 50370662b727 ("net/ice: > >> support device and queue ops") > >Modify commit message in patch v3. > >> > >> Fix this while merging. > >> > >> >Cc: stable@dpdk.org > >> > > >> >Signed-off-by: Min JiaqiX <jiaqix.min@intel.com> > >> >--- > >> >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); > >> >+ > >> > >> Why set the max frame size to HW in start ops, not in init stage like in i40e? > >> and what if max_rx_pkt_len hasn't been set? > >> > >max_rx_pkt_len need to be set to HW when set mtu , init stage won't be > called when open port again. > > Agree, I think it makes sense to set max frame size to hw in start ops, but > 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, we should set a default max frame size value to HW. > > And since i40e doesn't update max frame size to HW in start ops, do you > think it needs a fix? It can't fix the issue to set max frame size to HW in start ops in i40e, I don't know the cause. It is ok to set max frame size to HW in link_update ops in i40e, however when user opens port, link_update ops will be called three times, so I don't think it makes sense to set max frame size to hw in link_update ops too. Where to set the maximum frame size to HW in i40e is a problem. > > Thanks, > Xiaolong > > > > > >Appendix: > >Steps for using Example/ethtool to set mtu: > >EthApp>stop 0 > >EthApp>mtu 0 200 > >EthApp>open 0 > > > >> > >> Thanks, > >> Xiaolong > >> > >> > >> > return 0; > >> > > >> > /* stop the started queues if failed to start all queues */ > >> >-- > >> >2.17.1 > >> > > >> > >> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com> > >> > >> Applied to dpdk-next-net-intel. Thanks.
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 > >
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> --- v4: * Removed Reviewed-by * Checked and set defaut max frame size to HW in start ops. v3: * Changed Fixes line. v2: * Changed commit message. --- drivers/net/ice/ice_ethdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index d74675842..d8aa68f07 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2724,6 +2724,16 @@ ice_dev_start(struct rte_eth_dev *dev) pf->adapter_stopped = false; + /* Set the max frame size to default value*/ + if (pf->dev_data->dev_conf.rxmode.max_rx_pkt_len == 0) { + pf->dev_data->dev_conf.rxmode.max_rx_pkt_len = + RTE_ETHER_MAX_LEN; + } + + /* Set the max frame size to HW*/ + 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 */ -- 2.17.1
On 10/30, 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> > >--- >v4: >* Removed Reviewed-by >* Checked and set defaut max frame size to HW in start ops. >v3: >* Changed Fixes line. >v2: >* Changed commit message. >--- > drivers/net/ice/ice_ethdev.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c >index d74675842..d8aa68f07 100644 >--- a/drivers/net/ice/ice_ethdev.c >+++ b/drivers/net/ice/ice_ethdev.c >@@ -2724,6 +2724,16 @@ ice_dev_start(struct rte_eth_dev *dev) > > pf->adapter_stopped = false; > >+ /* Set the max frame size to default value*/ >+ if (pf->dev_data->dev_conf.rxmode.max_rx_pkt_len == 0) { >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len = >+ RTE_ETHER_MAX_LEN; I think ICE_FRAME_SIZE_MAX is more suitable here. >+ } >+ >+ /* Set the max frame size to HW*/ >+ ice_aq_set_mac_cfg(hw, >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL); What about max_frame_size = pf->dev_data->dev_conf.rxmode.max_rx_pkt_len ? pf->dev_data->dev_conf.rxmode.max_rx_pkt_len : ICE_FRAME_SIZE_MAX; /* Set the max frame size to HW*/ ice_aq_set_mac_cfg(hw, max_frame_size, NULL); Thanks, Xiaolong >+ > return 0; > > /* stop the started queues if failed to start all queues */ >-- >2.17.1 >
Hi, Xiaolong > -----Original Message----- > From: Ye, Xiaolong > Sent: Monday, November 4, 2019 10:57 AM > To: Min, JiaqiX <jiaqix.min@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4] net/ice: fix setting max frame size > > On 10/30, 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> > > > >--- > >v4: > >* Removed Reviewed-by > >* Checked and set defaut max frame size to HW in start ops. > >v3: > >* Changed Fixes line. > >v2: > >* Changed commit message. > >--- > > drivers/net/ice/ice_ethdev.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > >diff --git a/drivers/net/ice/ice_ethdev.c > >b/drivers/net/ice/ice_ethdev.c index d74675842..d8aa68f07 100644 > >--- a/drivers/net/ice/ice_ethdev.c > >+++ b/drivers/net/ice/ice_ethdev.c > >@@ -2724,6 +2724,16 @@ ice_dev_start(struct rte_eth_dev *dev) > > > > pf->adapter_stopped = false; > > > >+ /* Set the max frame size to default value*/ > >+ if (pf->dev_data->dev_conf.rxmode.max_rx_pkt_len == 0) { > >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len = > >+ RTE_ETHER_MAX_LEN; > > I think ICE_FRAME_SIZE_MAX is more suitable here. Agree. Will be modified in Patch v5. > > >+ } > >+ > >+ /* Set the max frame size to HW*/ > >+ ice_aq_set_mac_cfg(hw, > >+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len, NULL); > > What about > > max_frame_size = pf->dev_data- > >dev_conf.rxmode.max_rx_pkt_len ? > pf->dev_data->dev_conf.rxmode.max_rx_pkt_len : > ICE_FRAME_SIZE_MAX; Agree. Will be modified in Patch v5. > > /* Set the max frame size to HW*/ > ice_aq_set_mac_cfg(hw, max_frame_size, NULL); > > > Thanks, > Xiaolong > >+ > > return 0; > > > > /* stop the started queues if failed to start all queues */ > >-- > >2.17.1 > >
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> --- v5: * Set `ICE_FRAME_SIZE_MAX` to to default value. v4: * Removed Reviewed-by * Checked and set defaut max frame size to HW in start ops. v3: * Changed Fixes line. v2: * Changed commit message. --- drivers/net/ice/ice_ethdev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index d74675842..741a067f9 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -2657,6 +2657,7 @@ ice_dev_start(struct rte_eth_dev *dev) struct ice_vsi *vsi = pf->main_vsi; uint16_t nb_rxq = 0; uint16_t nb_txq, i; + uint16_t max_frame_size; int mask, ret; /* program Tx queues' context in hardware */ @@ -2724,6 +2725,15 @@ ice_dev_start(struct rte_eth_dev *dev) pf->adapter_stopped = false; + /* Set the max frame size to default value*/ + max_frame_size = pf->dev_data->dev_conf.rxmode.max_rx_pkt_len ? + pf->dev_data->dev_conf.rxmode.max_rx_pkt_len : + ICE_FRAME_SIZE_MAX; + + /* Set the max frame size to HW*/ + ice_aq_set_mac_cfg(hw, + max_frame_size, NULL); + return 0; /* stop the started queues if failed to start all queues */ -- 2.17.1
On 11/04, 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>
>
>---
>v5:
>* Set `ICE_FRAME_SIZE_MAX` to to default value.
>v4:
>* Removed Reviewed-by
>* Checked and set defaut max frame size to HW in start ops.
>v3:
>* Changed Fixes line.
>v2:
>* Changed commit message.
>---
> drivers/net/ice/ice_ethdev.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
>diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
>index d74675842..741a067f9 100644
>--- a/drivers/net/ice/ice_ethdev.c
>+++ b/drivers/net/ice/ice_ethdev.c
>@@ -2657,6 +2657,7 @@ ice_dev_start(struct rte_eth_dev *dev)
> struct ice_vsi *vsi = pf->main_vsi;
> uint16_t nb_rxq = 0;
> uint16_t nb_txq, i;
>+ uint16_t max_frame_size;
> int mask, ret;
>
> /* program Tx queues' context in hardware */
>@@ -2724,6 +2725,15 @@ ice_dev_start(struct rte_eth_dev *dev)
>
> pf->adapter_stopped = false;
>
>+ /* Set the max frame size to default value*/
>+ max_frame_size = pf->dev_data->dev_conf.rxmode.max_rx_pkt_len ?
>+ pf->dev_data->dev_conf.rxmode.max_rx_pkt_len :
>+ ICE_FRAME_SIZE_MAX;
>+
>+ /* Set the max frame size to HW*/
>+ ice_aq_set_mac_cfg(hw,
>+ max_frame_size, NULL);
>+
> return 0;
>
> /* stop the started queues if failed to start all queues */
>--
>2.17.1
>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel. Thanks.