From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id BE91D1B3EB for ; Wed, 6 Feb 2019 17:11:23 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id b85so3283743pfc.3 for ; Wed, 06 Feb 2019 08:11:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yM3FzGNb9fX35A7pQqUVZ0zGR8/m9iIwJy4rj7HYqrA=; b=LIxSprulYujH02twHKbTNAfdjHt6l4V8yuFlPKsc7MiSBXkeOiA3ELfZ9Ez9boCPHe SaQoSxBRQABGJoqK4Xh+uu0rQeszAdcTWHISOZnGTQzjIBh3RzOkrYDxdXR2xSLSi9Xp fofrGxC/YjrNujXN0eiDAMPSoU1ylHcRFEDdln5GJtGD2/fv7dx3XRTmGUb9JkpbBfqk bdb7gyP+nowJ3zj2bev7Vnom8hMFTmzMbKnOCWd24jqXCbnWvMLSI+rzWyq4HWDu8cfo C9xHAvcHuMm135hR1gKnpq2yhAt8+q4V2yUYZCYP9/taplqfsJBC+DhVJIaG/cVkxxQU yl0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yM3FzGNb9fX35A7pQqUVZ0zGR8/m9iIwJy4rj7HYqrA=; b=QN4EsSTy29XMIKqdmFUk/1JkqZ1oTFGC6qdBid2OeF45s6xbED+W3HcDR1RWa6OoR2 WL8lF1FOBwQso/rxe9fjjus2M/AyM4HBsrMLxmRFzpU6HUzmwgtM8ND99h5m7AiUFUEZ zJiE/B9wOCH8Xv+4RC4YKlBdfqdUTpsQG9B+6CtKSOomO3GF0DPa3Fn9u+C0qfwHrNNH FUYobaDPYRlQbfBOaGSSfrVwSNRCL1B+p4WrG3P53PKBu9XfJv6kXV+MGOP4pVmrqx1M Pt3EbKMUlWX9XCAb5mQGwg1XEW9nnKqnc482L92vJGhXOK2q/b94bXr0LknERMmNBF1O xRAw== X-Gm-Message-State: AHQUAuaJgrSYxZTn5BW5jZm7Nd3z3FTOgvTiVe/PotR/dZR0LD6ldYVF xuwDqU9lWXxpS79WS358h9STBHEGd5Q= X-Google-Smtp-Source: AHgI3Ibqc/yeSFoHk2sXdl+SQRD8HJFSE18xZ5w+ReYbV2hYjOpIo0ektL+lyKRc6KF/XflwcKupZw== X-Received: by 2002:a63:e5c:: with SMTP id 28mr5005441pgo.369.1549469482664; Wed, 06 Feb 2019 08:11:22 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 85sm10727029pfw.17.2019.02.06.08.11.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 08:11:22 -0800 (PST) Date: Wed, 6 Feb 2019 08:11:07 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: Message-ID: <20190206081107.41c57bad@hermes.lan> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35B4265B@smartserver.smartshare.dk> References: <20180905164157.844-1-stephen@networkplumber.org> <98CBD80474FA8B44BF855DF32C47DC35B4265B@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [RFC] ethdev: add min/max MTU to device info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 16:11:24 -0000 On Wed, 6 Feb 2019 14:05:34 +0100 Morten Br=C3=B8rup wrote: > Good work, Stephen. >=20 > It should also be documented how PMDs should interpret this MTU. >=20 > Obviously, a VLAN tagged Ethernet frame grows from 1518 to 1522 bytes inc= l. header and CRC, and should be allowed with an Ethernet MTU of 1500 bytes= . There's even a #define ETHER_MAX_VLAN_FRAME_LEN for this, but that's as f= ar as it goes... >=20 > But how about frames with even larger headers, e.g. 4 MPLS labels makes a= frame 16 bytes longer, i.e. it grows from 1518 to 1534 bytes... is such a = frame acceptable with an MTU of 1500 bytes? No. According to standard practice in Linux and FreeBSD, only the first VLA= N tag is free. After that any other headers count against MTU. >=20 > According to Wikipedia (https://en.wikipedia.org/wiki/Maximum_transmissio= n_unit), MTU describes the maximum payload size, and is not tied to the max= imum frame size. However, the Linux kernel (at least the older versions I h= ave been working with) incorrectly ties the MTU directly to the maximum fra= me size, so the MTU has to increased to support larger headers (e.g. QinQ o= r an MPLS stack). Do none, all or some DPDK PMDs suffer from the same error? >=20 Maximum Transmission Unit and Maximum Receive Unit (MRU) are separate. On m= ost hardware they are the same but there is variation. Some hardware can receive larger sizes than MTU and som= e have max receive length register.