[dpdk-dev,v3] net/ixgbe:fix max packet length in ixgbevf

Message ID 20161214185019.19581-1-zhang.yi75@zte.com.cn (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Yi Zhang Dec. 14, 2016, 6:50 p.m. UTC
  Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF
supports 15872-byte jumbo frame and VF only supports 9728-byte jumbo
frame. If VF is running DPDK driver and set frame_size > 9728 ,PF
running kernel ixgbe driver will report an error and set VF failed.
This patch fixs DPDK ixgbevf driver to get correct jumbo frame size
of VF.

Signed-off-by: Yi Zhang <zhang.yi75@zte.com.cn>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Yuanhan Liu Dec. 14, 2016, 7:06 a.m. UTC | #1
On Thu, Dec 15, 2016 at 02:50:19AM +0800, Yi Zhang wrote:
> Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF
> supports 15872-byte jumbo frame and VF only supports 9728-byte jumbo
> frame. If VF is running DPDK driver and set frame_size > 9728 ,PF
> running kernel ixgbe driver will report an error and set VF failed.
> This patch fixs DPDK ixgbevf driver to get correct jumbo frame size
> of VF.
> 
> Signed-off-by: Yi Zhang <zhang.yi75@zte.com.cn>

Hi,

I saw you have sent this patch 3 times; are you looking for review?
If so, you should not resend it many times, instead, you could reply
to your patch if it hasn't got any comments after one week, with
something like "some one can help review this?", or even a simple
"ping ..." might just work.

Besides that, you should Cc the corresponding maintainers, but not
"maintainer@some.org", which is just an example: I doubt such email
exists.

You could get the maintainers from the MAINTAINERS. Take ixgbe as
example, it's:

    Intel ixgbe
    M: Helin Zhang <helin.zhang@intel.com>
    M: Konstantin Ananyev <konstantin.ananyev@intel.com>
    F: drivers/net/ixgbe/
    F: doc/guides/nics/ixgbe.rst
    F: doc/guides/nics/intel_vf.rst

So for this patch, you should at least Cc (or To) Helin and Konstantin.
I have done that for you this time.

	--yliu
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index edc9b22..573252c 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -3168,7 +3168,7 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
>  	dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
>  	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
>  	dev_info->min_rx_bufsize = 1024; /* cf BSIZEPACKET in SRRCTL reg */
> -	dev_info->max_rx_pktlen = 15872; /* includes CRC, cf MAXFRS reg */
> +	dev_info->max_rx_pktlen = 9728; /* includes CRC, cf MAXFRS reg */
>  	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
>  	dev_info->max_hash_mac_addrs = IXGBE_VMDQ_NUM_UC_MAC;
>  	dev_info->max_vfs = dev->pci_dev->max_vfs;
> -- 
> 2.9.3
>
  
Wenzhuo Lu Jan. 25, 2017, 1:21 a.m. UTC | #2
Hi  Yi,


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yi Zhang
> Sent: Thursday, December 15, 2016 2:50 AM
> To: maintainer@some.org
> Cc: dev@dpdk.org; Yi Zhang
> Subject: [dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in ixgbevf
> 
> Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF supports
> 15872-byte jumbo frame and VF only supports 9728-byte jumbo frame. If VF is
> running DPDK driver and set frame_size > 9728 ,PF running kernel ixgbe driver
> will report an error and set VF failed.
> This patch fixs DPDK ixgbevf driver to get correct jumbo frame size of VF.
> 
> Signed-off-by: Yi Zhang <zhang.yi75@zte.com.cn>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index edc9b22..573252c 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -3168,7 +3168,7 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
>  	dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
>  	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
>  	dev_info->min_rx_bufsize = 1024; /* cf BSIZEPACKET in SRRCTL reg */
> -	dev_info->max_rx_pktlen = 15872; /* includes CRC, cf MAXFRS reg */
> +	dev_info->max_rx_pktlen = 9728; /* includes CRC, cf MAXFRS reg */
I don't see any hard limit for the VF. I checked the kernel code. It defines 9728 as max frame size, I believe for both PF and VF. It's SW limitation. That's why you see the error.
As kernel PF + dpdk VF is a common user case. I don't object to change the value to 9728. But I think some comments needed here to explain where this value comes from, because we can find the max frame size defined by dpdk,  ETHER_MAX_JUMBO_FRAME_LEN, is different.

>  	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
>  	dev_info->max_hash_mac_addrs = IXGBE_VMDQ_NUM_UC_MAC;
>  	dev_info->max_vfs = dev->pci_dev->max_vfs;
> --
> 2.9.3
>
  
Wei Dai Jan. 25, 2017, 1:39 a.m. UTC | #3
I think your patch does fix an error in ixgbevf and I can acknowledge it after
I have checked with 82599 and x540 and x550 datasheet.

In 82599 datasheet, there is an annotation in the chapter 1.3 Features Summary (page 29)
 The 82599 supports full-size 15.5 KB (15872-byte) jumbo packets while in a basic mode of operation. When DCB mode is enabled,
or security engines enabled or virtualization is enabled, the 82599 supports 9.5 KB (9728-byte) jumbo packets

In x540 datasheet, there is also an annotation in the chapter 1.3 Features Summary (page 13)
The X540 and 82599 support full-size 15.5 KB jumbo packets while in a basic mode of operation. When DCB mode is enabled,
or security engines enabled, or virtualization is enabled, or OS2BMC is enabled, then the X540 supports 9.5 KB jumbo packets.
Packets to/from MC longer than 2KB are filtered out.

In x550 datasheet, there is still also an annotation in the chapter 1.4 Feature Summary (page 23)
All the products support full-size 15.5 KB jumbo packets while in a basic mode of operation. When DCB mode is enabled, or security
engines enabled, or virtualization is enabled, or OS2BMC is enabled, then only 9.5 KB jumbo packets are supported. Packets to/
from the MC longer than 2 KB are filtered out.


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yuanhan Liu
> Sent: Wednesday, December 14, 2016 3:06 PM
> To: Yi Zhang <zhang.yi75@zte.com.cn>
> Cc: Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in ixgbevf
> 
> On Thu, Dec 15, 2016 at 02:50:19AM +0800, Yi Zhang wrote:
> > Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF
> > supports 15872-byte jumbo frame and VF only supports 9728-byte jumbo
> > frame. If VF is running DPDK driver and set frame_size > 9728 ,PF
> > running kernel ixgbe driver will report an error and set VF failed.
> > This patch fixs DPDK ixgbevf driver to get correct jumbo frame size of
> > VF.
> >
> > Signed-off-by: Yi Zhang <zhang.yi75@zte.com.cn>
> 
> Hi,
> 
> I saw you have sent this patch 3 times; are you looking for review?
> If so, you should not resend it many times, instead, you could reply to your
> patch if it hasn't got any comments after one week, with something like "some
> one can help review this?", or even a simple "ping ..." might just work.
> 
> Besides that, you should Cc the corresponding maintainers, but not
> "maintainer@some.org", which is just an example: I doubt such email exists.
> 
> You could get the maintainers from the MAINTAINERS. Take ixgbe as example,
> it's:
> 
>     Intel ixgbe
>     M: Helin Zhang <helin.zhang@intel.com>
>     M: Konstantin Ananyev <konstantin.ananyev@intel.com>
>     F: drivers/net/ixgbe/
>     F: doc/guides/nics/ixgbe.rst
>     F: doc/guides/nics/intel_vf.rst
> 
> So for this patch, you should at least Cc (or To) Helin and Konstantin.
> I have done that for you this time.
> 
> 	--yliu
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index edc9b22..573252c 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -3168,7 +3168,7 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
> >  	dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
> >  	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
> >  	dev_info->min_rx_bufsize = 1024; /* cf BSIZEPACKET in SRRCTL reg */
> > -	dev_info->max_rx_pktlen = 15872; /* includes CRC, cf MAXFRS reg */
> > +	dev_info->max_rx_pktlen = 9728; /* includes CRC, cf MAXFRS reg */
> >  	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
> >  	dev_info->max_hash_mac_addrs = IXGBE_VMDQ_NUM_UC_MAC;
> >  	dev_info->max_vfs = dev->pci_dev->max_vfs;
> > --
> > 2.9.3
> >
  
Wei Dai Jan. 25, 2017, 1:42 a.m. UTC | #4
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Dai, Wei
> Sent: Wednesday, January 25, 2017 9:40 AM
> To: Yuanhan Liu <yuanhan.liu@linux.intel.com>; Yi Zhang
> <zhang.yi75@zte.com.cn>
> Cc: Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; dev@dpdk.org; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in ixgbevf
> 
> I think your patch does fix an error in ixgbevf and I can acknowledge it after I
> have checked with 82599 and x540 and x550 datasheet.
> 
> In 82599 datasheet, there is an annotation in the chapter 1.3 Features
> Summary (page 29)  The 82599 supports full-size 15.5 KB (15872-byte) jumbo
> packets while in a basic mode of operation. When DCB mode is enabled, or
> security engines enabled or virtualization is enabled, the 82599 supports 9.5 KB
> (9728-byte) jumbo packets
> 
> In x540 datasheet, there is also an annotation in the chapter 1.3 Features
> Summary (page 13) The X540 and 82599 support full-size 15.5 KB jumbo
> packets while in a basic mode of operation. When DCB mode is enabled, or
> security engines enabled, or virtualization is enabled, or OS2BMC is enabled,
> then the X540 supports 9.5 KB jumbo packets.
> Packets to/from MC longer than 2KB are filtered out.
> 
> In x550 datasheet, there is still also an annotation in the chapter 1.4 Feature
> Summary (page 23) All the products support full-size 15.5 KB jumbo packets
> while in a basic mode of operation. When DCB mode is enabled, or security
> engines enabled, or virtualization is enabled, or OS2BMC is enabled, then only
> 9.5 KB jumbo packets are supported. Packets to/ from the MC longer than 2 KB
> are filtered out.
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yuanhan Liu
> > Sent: Wednesday, December 14, 2016 3:06 PM
> > To: Yi Zhang <zhang.yi75@zte.com.cn>
> > Cc: Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in
> > ixgbevf
> >
> > On Thu, Dec 15, 2016 at 02:50:19AM +0800, Yi Zhang wrote:
> > > Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF
> > > supports 15872-byte jumbo frame and VF only supports 9728-byte jumbo
> > > frame. If VF is running DPDK driver and set frame_size > 9728 ,PF
> > > running kernel ixgbe driver will report an error and set VF failed.
> > > This patch fixs DPDK ixgbevf driver to get correct jumbo frame size
> > > of VF.
> > >
> > > Signed-off-by: Yi Zhang <zhang.yi75@zte.com.cn>
Acked-by: Wei Dai <wei.dai@intel.com>
> >
> > Hi,
> >
> > I saw you have sent this patch 3 times; are you looking for review?
> > If so, you should not resend it many times, instead, you could reply
> > to your patch if it hasn't got any comments after one week, with
> > something like "some one can help review this?", or even a simple "ping ..."
> might just work.
> >
> > Besides that, you should Cc the corresponding maintainers, but not
> > "maintainer@some.org", which is just an example: I doubt such email exists.
> >
> > You could get the maintainers from the MAINTAINERS. Take ixgbe as
> > example,
> > it's:
> >
> >     Intel ixgbe
> >     M: Helin Zhang <helin.zhang@intel.com>
> >     M: Konstantin Ananyev <konstantin.ananyev@intel.com>
> >     F: drivers/net/ixgbe/
> >     F: doc/guides/nics/ixgbe.rst
> >     F: doc/guides/nics/intel_vf.rst
> >
> > So for this patch, you should at least Cc (or To) Helin and Konstantin.
> > I have done that for you this time.
> >
> > 	--yliu
> > > ---
> > >  drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > > index edc9b22..573252c 100644
> > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > > @@ -3168,7 +3168,7 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,
> > >  	dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
> > >  	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
> > >  	dev_info->min_rx_bufsize = 1024; /* cf BSIZEPACKET in SRRCTL reg */
> > > -	dev_info->max_rx_pktlen = 15872; /* includes CRC, cf MAXFRS reg */
> > > +	dev_info->max_rx_pktlen = 9728; /* includes CRC, cf MAXFRS reg */
> > >  	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
> > >  	dev_info->max_hash_mac_addrs = IXGBE_VMDQ_NUM_UC_MAC;
> > >  	dev_info->max_vfs = dev->pci_dev->max_vfs;
> > > --
> > > 2.9.3
> > >
  
Ferruh Yigit Jan. 25, 2017, 2:40 p.m. UTC | #5
On 1/25/2017 1:42 AM, Dai, Wei wrote:
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Dai, Wei
>> Sent: Wednesday, January 25, 2017 9:40 AM
>> To: Yuanhan Liu <yuanhan.liu@linux.intel.com>; Yi Zhang
>> <zhang.yi75@zte.com.cn>
>> Cc: Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin
>> <konstantin.ananyev@intel.com>; dev@dpdk.org; Lu, Wenzhuo
>> <wenzhuo.lu@intel.com>
>> Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in ixgbevf
>>
>> I think your patch does fix an error in ixgbevf and I can acknowledge it after I
>> have checked with 82599 and x540 and x550 datasheet.
>>
>> In 82599 datasheet, there is an annotation in the chapter 1.3 Features
>> Summary (page 29)  The 82599 supports full-size 15.5 KB (15872-byte) jumbo
>> packets while in a basic mode of operation. When DCB mode is enabled, or
>> security engines enabled or virtualization is enabled, the 82599 supports 9.5 KB
>> (9728-byte) jumbo packets
>>
>> In x540 datasheet, there is also an annotation in the chapter 1.3 Features
>> Summary (page 13) The X540 and 82599 support full-size 15.5 KB jumbo
>> packets while in a basic mode of operation. When DCB mode is enabled, or
>> security engines enabled, or virtualization is enabled, or OS2BMC is enabled,
>> then the X540 supports 9.5 KB jumbo packets.
>> Packets to/from MC longer than 2KB are filtered out.
>>
>> In x550 datasheet, there is still also an annotation in the chapter 1.4 Feature
>> Summary (page 23) All the products support full-size 15.5 KB jumbo packets
>> while in a basic mode of operation. When DCB mode is enabled, or security
>> engines enabled, or virtualization is enabled, or OS2BMC is enabled, then only
>> 9.5 KB jumbo packets are supported. Packets to/ from the MC longer than 2 KB
>> are filtered out.
>>
>>
>>> -----Original Message-----
>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yuanhan Liu
>>> Sent: Wednesday, December 14, 2016 3:06 PM
>>> To: Yi Zhang <zhang.yi75@zte.com.cn>
>>> Cc: Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin
>>> <konstantin.ananyev@intel.com>; dev@dpdk.org
>>> Subject: Re: [dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in
>>> ixgbevf
>>>
>>> On Thu, Dec 15, 2016 at 02:50:19AM +0800, Yi Zhang wrote:
>>>> Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF
>>>> supports 15872-byte jumbo frame and VF only supports 9728-byte jumbo
>>>> frame. If VF is running DPDK driver and set frame_size > 9728 ,PF
>>>> running kernel ixgbe driver will report an error and set VF failed.
>>>> This patch fixs DPDK ixgbevf driver to get correct jumbo frame size
>>>> of VF.
>>>>

Fixes: 2144f6630fca ("ixgbe: add redirection table size in device info")
Cc: stable@dpdk.org

>>>> Signed-off-by: Yi Zhang <zhang.yi75@zte.com.cn>
> Acked-by: Wei Dai <wei.dai@intel.com>

Applied to dpdk-next-net/master, thanks.

(datasheet references by Wei added into commit log)
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index edc9b22..573252c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3168,7 +3168,7 @@  ixgbevf_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
 	dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
 	dev_info->min_rx_bufsize = 1024; /* cf BSIZEPACKET in SRRCTL reg */
-	dev_info->max_rx_pktlen = 15872; /* includes CRC, cf MAXFRS reg */
+	dev_info->max_rx_pktlen = 9728; /* includes CRC, cf MAXFRS reg */
 	dev_info->max_mac_addrs = hw->mac.num_rar_entries;
 	dev_info->max_hash_mac_addrs = IXGBE_VMDQ_NUM_UC_MAC;
 	dev_info->max_vfs = dev->pci_dev->max_vfs;