DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: "Wu, Jingjing" <jingjing.wu@intel.com>,
	"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: consider QinQ when setting MTU
Date: Fri, 28 Apr 2017 13:38:04 +0100	[thread overview]
Message-ID: <b3721105-f4d1-fab7-81c0-ece1bd00cc45@intel.com> (raw)
In-Reply-To: <9BB6961774997848B5B42BEC655768F810D5A096@SHSMSX103.ccr.corp.intel.com>

On 4/28/2017 9:27 AM, Wu, Jingjing wrote:
> 
> 
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
>> Sent: Friday, April 28, 2017 1:55 PM
>> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH] net/i40e: consider QinQ when setting MTU
>>
>> On 4/28/2017 2:55 AM, Wenzhuo Lu wrote:
>>> When counting max packet length from MTU, count VLAN tag length twice
>>> for QinQ packets.
>>>
>>> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
>>> ---
>>>  drivers/net/i40e/i40e_ethdev.c    | 2 +-
>>>  drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/i40e/i40e_ethdev.c
>>> b/drivers/net/i40e/i40e_ethdev.c index 3fa25dc..74041ae 100644
>>> --- a/drivers/net/i40e/i40e_ethdev.c
>>> +++ b/drivers/net/i40e/i40e_ethdev.c
>>> @@ -10593,7 +10593,7 @@ static void i40e_set_default_mac_addr(struct
>> rte_eth_dev *dev,
>>>  	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data-
>>> dev_private);
>>>  	struct rte_eth_dev_data *dev_data = pf->dev_data;
>>>  	uint32_t frame_size = mtu + ETHER_HDR_LEN
>>> -			      + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE;
>>> +			      + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2;
>>
>> Hi Wenzhuo,
>>
>> Shouldn't we check if QinQ enabled before taking size account?
> 
> Hi, Ferruh
> 
> Checking QinQ enabled here makes no sense, because we don't know
> If the packets is carry single vlan or double vlan.

What do you think commenting code to say "I40E_VLAN_TAG_SIZE * 2" is for
QinQ?

It is not obvious and in the feature somebody not thinking about QinQ
use case may miss this, and do something wrong, even can fix this J

> 
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
> 

  parent reply	other threads:[~2017-04-28 12:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28  1:55 Wenzhuo Lu
2017-04-28  5:55 ` Ferruh Yigit
2017-04-28  8:27   ` Wu, Jingjing
2017-04-28  8:30     ` Lu, Wenzhuo
2017-04-28 12:38     ` Ferruh Yigit [this message]
2017-05-02  1:25       ` Lu, Wenzhuo
2017-05-02  1:51 ` [dpdk-dev] [PATCH v2] " Wenzhuo Lu
2017-05-05 15:24   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b3721105-f4d1-fab7-81c0-ece1bd00cc45@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).