From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0065.outbound.protection.outlook.com [104.47.36.65]) by dpdk.org (Postfix) with ESMTP id EC23368A9; Tue, 9 May 2017 23:02:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cienacorp.onmicrosoft.com; s=selector1-ciena-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+Zk0o4wcVGd+4BaA3onKCKO4s5PQ3yvlyvcdrJhZ7bY=; b=iUwB39tmCJIQiUBBQAJPqmx06/wD4vnr9dLoyAg94kRggoTN3zO5QzumeZDBjz8vURh87LNWoyk0nIF7bnnLGKhSc0WvuWTpPwIQF/5LXvbwZuAc9lBjS512UySVKSRR44m+1th3W15i7db1E6qBt/WJQTEV1ebrXLZcqkMwRb8= Received: from BLUPR04MB420.namprd04.prod.outlook.com (10.141.27.21) by BLUPR04MB417.namprd04.prod.outlook.com (10.141.27.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Tue, 9 May 2017 21:02:25 +0000 Received: from BLUPR04MB420.namprd04.prod.outlook.com ([169.254.12.192]) by BLUPR04MB420.namprd04.prod.outlook.com ([169.254.12.192]) with mapi id 15.01.1075.020; Tue, 9 May 2017 21:02:24 +0000 From: "Coulson, Ken" To: "dev@dpdk.org" , "users@dpdk.org" Thread-Topic: Question about driver/controller MTU enforcement with MTU less than jumbo frame size Thread-Index: AQHSyQeO9LHZzYDoqEK4B7XKbp8xTA== Date: Tue, 9 May 2017 21:02:24 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.7.0.161029 authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=ciena.com; x-originating-ip: [63.80.42.132] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BLUPR04MB417; 7:KqXPxGRgqnB/lLSJv8aybwTKI+XqGVTA+NNDaRqCJ+Q7CxgUa5h5Hs+6vamyG+DB8Wcp5eAY1TyTfyek/qrSLBYbUI8ua6vKqy2InAwZ2/eWLSGhtMzBlCdyq+G5f61RsYItAayatox8MREnH+rBynuZLzfr1qBZfu6TzyLAmBkznZj/EpKYX778oRpabyJCX179kq0qNllcD+Bk9POgY+BhCm21QzIUmYvjndI32lvTh52P9lhm6a/Qn556UyiQbRNu034zIiUvoytybUklrJ8FoLxmwfJLXOuygmqyW654LmoQwQFHJxczyLwfq3CiehGVkjxDckPdHr+S1AjFbw== x-ms-office365-filtering-correlation-id: b46e6105-be8e-44d9-0803-08d4971eb13b x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR04MB417; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:BLUPR04MB417; BCL:0; PCL:0; RULEID:; SRVR:BLUPR04MB417; x-forefront-prvs: 0302D4F392 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39410400002)(39850400002)(39840400002)(39450400003)(8936002)(86362001)(6116002)(54356999)(3280700002)(3660700001)(53936002)(2906002)(50986999)(5660300001)(8676002)(6486002)(25786009)(99286003)(102836003)(6512007)(54896002)(6506006)(3846002)(450100002)(81166006)(38730400002)(66066001)(4001350100001)(2501003)(6436002)(2900100001)(122556002)(189998001)(478600001)(36756003)(83506001)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR04MB417; H:BLUPR04MB420.namprd04.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: ciena.com X-MS-Exchange-CrossTenant-originalarrivaltime: 09 May 2017 21:02:24.3371 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 457a2b01-0019-42ba-a449-45f99e96b60a X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR04MB417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Question about driver/controller MTU enforcement with MTU less than jumbo frame size X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 21:02:27 -0000 Is it possible to have an MTU enforced on rx that is less than jumbo size f= rames? >>From the DPDK driver code snippet for ixgbe if MTU < 1518 then the jumbo_fr= ame control bit in the chip is set to 0. The controller manual says the maximum frame size is only meaningful when t= he jumbo_frame control bit is 1. Does it work to leave jumbo_frame set to 1 but set max frame size to someth= ing smaller than the jumbo size of 1518? >>From 82559 10 GbE Controller manual, section 8.2.3.22.13, page 669, Max Fra= me Size: This field defines the maximum frame size in bytes units from Ethernet M= AC addresses up to inclusive the CRC. Frames received that are larger than= this value are dropped. This field is meaningful when jumbo frames are enabl= ed (HLREG0.JUMBOEN =3D 1b). When jumbo frames are not enabled the 82599 us= es a hardwired value of 1518 for this field. The MFS does not include the 4 = bytes of the VLAN header. Packets with VLAN header can be as large as MFS + 4. Wh= en double VLAN is enabled, the device adds 8 to the MFS for any packets. T= his value has no effect on transmit frames; it is the responsibility of soft= ware to limit the size of transmit frames. 10G driver dpdk/drivers/net/ixgbe/ixgbe_ethdev.c: ixgbe_dev_mtu_set(struct rte_ethd_dev *dev, uint16_t mtu) uint32_t frame_size =3D mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; /* + 18= */ ETHER_MAX_LEN =3D 1518 /* switch to jumbo mode if needed */ if (frame_size > ETHER_MAX_LEN) { dev->data->dev_conf.rxmode.jumbo_frame =3D 1; hlreg0 |=3D IXGBE_HLREG0_JUMBOEN; } else { dev->data->dev_conf.rxmode.jumbo_frame =3D 0; hlreg0 &=3D ~IXGBE_HLREG0_JUMBOEN; } IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); /* update max frame size */ dev->data->dev_conf.rxmode.max_rx_pkt_len =3D frame_size; maxfrs =3D IXGBE_READ_REG(hw, IXGBE_MAXFRS); maxfrs &=3D 0x0000FFFF; maxfrs |=3D (dev->data->dev_conf.rxmode.max_rx_pkt_len << 16); IXGBE_WRITE_REG(hw, IXGBE_MAXFRS, maxfrs); Ken Coulson Software Engineer 509-242-9273 Ciena