From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0050.outbound.protection.outlook.com [104.47.38.50]) by dpdk.org (Postfix) with ESMTP id 146392BB0 for ; Mon, 10 Apr 2017 16:31:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xcvXz5CUabgESk7HUyfIY3GDd8CwK2+5IQzKztnRPXE=; b=chYATkT+5nHyVoCIFQ72SoRIRYTx8UYe3u7zJBmSaPuK9Ruq7FNvkJ99JmgBfbERfx4/K/ezozupQiFK1jILrxHgcWauE88AoIzVm3Ts7nEO2dZ7ase5kpqDqj/kffr4FdTU4nC5neDKAUVGs+z+UEV2CEr8YGeZ9hHQ8EQalAM= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from b.semihalf.local (31.172.191.173) by BLUPR0701MB1026.namprd07.prod.outlook.com (10.160.35.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Mon, 10 Apr 2017 14:31:07 +0000 From: Andriy Berestovskyy To: Konstantin Ananyev Cc: dev@dpdk.org Date: Mon, 10 Apr 2017 16:30:54 +0200 Message-Id: <1491834656-20656-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490288768-8114-1-git-send-email-Andriy.Berestovskyy@cavium.com> References: <1490288768-8114-1-git-send-email-Andriy.Berestovskyy@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: VI1P18901CA0003.EURP189.PROD.OUTLOOK.COM (10.173.66.141) To BLUPR0701MB1026.namprd07.prod.outlook.com (10.160.35.18) X-MS-Office365-Filtering-Correlation-Id: d225b708-775c-41c6-35fe-08d4801e3a31 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1026; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1026; 3:NHtGyNynLdDE9USMoGlmN3G3e1YrjsxscNCwBXeZu7GBn5DcMT9+2lU/SPyLxWrs5pER6E9JLd0MF6YpBzPzZjPGRiuhBuV7HCYZUqcsEYUt2mGg77K0R7Aa0mMFrpYO0s4cuZ+n63JeSn4LDyqh749RLSUll6XKoWbtG66TlAqr0DnJMFMVvjr4Ymd6D4CI71T1jWeykduoHLRnXv1GCCzwFj9Tf3kSbz8c4rmxMTuGcPvKvgqNHLTZ7gfUgOvJs0ux9olpUqYycy6Y0ejf3QSMpyLVegiufrtvjM8kZGGLDG7Q6MV/HP8JqAp8scDvsV6rUq7cXBx3DQDLwz3+tA==; 25:rKAzJzJXjWlDoRporPJS2BoxImmxtW9LqkB37PSQzyt9ioygODBJ/8hqw5TxpUH80ivYC0cvfHvE7B0UB5M74qlGK7qjLiOf6FqMBGivdpaFkQUBK69VGx/O/XTRkczl1j0osSBcZRZQRws4FUD8MveNjBy+GTAjHyCFlnENgtVfpQob0rCnI404vOwITx67grb8hxbxwpN6rfVE9N4VZeIV+GASEcytkjnc4aYd15b5ijLy8OomqvMQ00AKiXvFt+OOJcC7P95xpqDLw1qdDi3PhcKUyh+e/MUVBB5iQY5T6SEEAWWNnKhZSiM+95QvZ3Fse7Anhvr4FJCP4y/9GPq2MmtL/Zi8mQDKamplEAtZ1Zz+n7fHz6CyNW8IkOOKITAWQ9A+4akpU3/O+0QjeI68yBv+oT0oLLF5tQIF62XVs1RcxDQUEMJZWeyWDxl8JPi2+W7ylVG/IUVoRtYq/g== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1026; 31:pPvmxpEm0mt2/faO9a4waP5r5JAo039dfTsZKiWXgIrp4h9UOb5mczSksOUZJhXU4axIsLQCcu5CqvEAMlRvs2GVVbXwTR0Eo5RxwvdgGMeccWaO0gEZNmDxv4KES5Qy6U0IhwIOghssC5FEHUrlzXR7/wOyevUDOsdbGGIChJ3szzYS5I1BGEzSVRnbTATgyMQ/NUEmmQkLZMn6aFan4DanNF8YFrzPt5q/iG3TLSUkwqHkj/aa0YEy7+pxRT2u/7hWHtahulXJUp29GD7yk3y54tapaRiaPJHvaDpKYDE=; 20:dKkyE7PUMSrrp/lCJX9VKMZGYfCy3gANy3PCeUS5cO1b63hf26nT8lVZotaB0VF7T3BPZukq7MoYTe0rf86trTb0uOkoQ3QmHDJTg0b6UYiZCjXYY7dNgyXvJL9r0aWgh+IriZTDNN2nTN6Je+EgfQMU7UMar7a++nLjMwfmAiUkKHxtZKBxGtl5lvVXpVjuLVrwuRZiDEo+64fvoVsAVFvBPWOkKrI5KovjmI1lcr3YkynUOKrWOlRcm/VGcPcPXkLRGu/Rz/eVo7B5UCHw2pz8ySRMBjffVbmw7owLnqOYkZFWv4w/8NlmHXyNgu957JTm3o5TV26hwB+XhLgtyKRoSTk5s5YgcFBDmgCCiWtxM58rGsiqUWV727P9H4B7NHKX/jkIUas76QygIfEtvtu23jVKWSUotiqy9o4zX3GE3mG4rvzUmhKFk6BTNro6T7jszW8CyFgjF351OBkOjc7pE889TYgVJlIjKUgN9QR0cDzKkR2rNRB8VxIMXeLoJDmr5jEYfqo62diia6z/lvHzusQzA/Qbh2pL/G5FEzDWkWJE4IKFso3rAftl6d/y8HJCsGUdH2jnBXsb5/ULnQp890mtVGl1DIJccsg6+bE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:BLUPR0701MB1026; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1026; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1026; 4:3ARqMHYxooegR8+yU0D68RItDPLPckEpzW8qZ8NXO0kPV6gt47HgzHkYJt1IO/M2X7gxCeN7PLoIQPOX37m4zPht3Q2nFdfoEAho+r0pZhqRR88mXovM8MYEx4O8wJDB0ruQWqvYw/cAedUdKX63Vb3EBnMECDFIQhblb1UOiHwg11yb5pabgrYCUZs69M5ow7Moy8Pe+tWMGAEk4ihby0udM7TZYJGRA3gbFer5SIjsTF0w+dzUqy3Exhx1Vamv1qk2n968UgvVEg8dEqLFm59unN3g97amX9UpQ0S/6dP0WVRLdTD/ttLxkk7mscBdVoXuKxNmDKof7S58BXcJnV+Oq0fNT4ZciQZEC0cOmlkxun2m8kk/jvMP7OWmM5FxzVsnQUg9ZgixI2w/2IBl0+vWWUMWCItcYB2oyqOrNeb4F4z0VOfCgU9efwL4pOdx+DY9I/kKv/wVbiu4Kf7Fy7wMWYuifT3xwaBtr7fO+7nZASBrZYjkKsrgqZhA60ITh6YZUTzNDwGZVuhp003kTc7g5eYgvGNzqFk2jvFSuC9QixnBpmf7aU/F+rliuVGInbz91QCyd9Z1hWZ0SIUg4cODy04Wob4j0DZMv4K/sryS63fOleQJQ3pMyYmqjq8unRjEnNgjOsAjZtr55HTjd1oLDkFLVLwPz+FR71FpvHKRVJVhIrcePUEwWrkvuCY/pn2+RLhPe7bCp+AFi9h29A== X-Forefront-PRVS: 027367F73D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39450400003)(39840400002)(39410400002)(39400400002)(6506006)(47776003)(6486002)(4326008)(66066001)(6666003)(25786009)(7736002)(5003940100001)(6916009)(42186005)(50226002)(81166006)(42882006)(2950100002)(8676002)(53936002)(6512007)(2906002)(305945005)(36756003)(110136004)(189998001)(38730400002)(48376002)(50466002)(6116002)(3846002)(76176999)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1026; H:b.semihalf.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1026; 23:mpz3xv5d666CP5ABbrModO1xWcrnDcjeF25hOQSX8w2irpCHTiHRcaFQj09Qzo9W2nxWhBb22dud3vAnKeJ0VWbf18KNS1z7lyabo+b5XaTWym4HuWCjmUQ1xrVHEqgMU6KAoPFtmrA7IDQKocwTz0pdZYAPQtg/gQKa17Xiile4wTvMH4wh0Dcf2m7pcpbNhrvOQgY62aQ8a25kO+WEvQRQyJncoQaeZfBHIVhgS7FLre3RniHxHShwgw0y+EHA+djAvy4c6ymWx3yjpCbRHfGO2/Mh71X8p182SsWH1fO8Hbez6R3wTnt21UK4OUVCo5hBkkbYLzf0BHQsSYW7/eQQHwNAqAtlbGSxP4m8KGielY3aN4Jei0gmpf8atNX9X7qLE8EtpEvNJrcpzUj86L9YFr6s/XbEsiAP1Q52bS0J61KzKHtu0cHlqJZbC0rcRo3jrzUE5zs1HZMkMK89bCLCPv9we9QNmzuG/EfGXI7prGIkp53nRE7x+iUdTbVTN1qnV9WrVWI9xdGFoxnMdbxHVfRACATBKo5yBHn1vnB6hvKNAr8mAUOH+VvMtdyneMFmPtrvm3vpJkMFRPeG7vyDmFWzDaUhvPMJHSK91U2rx+h9rQLVJJ9WQfwFahc85mQoxJRy6GsKpRyjFaZSeO/vx+Yuf/g3dF/FLz03NaGE/6PfCBjMWRV7gblUgYNnEyZ4Ncf55APdBwRBLQmdSdVM4bY0Ua+73SkVMG6QzOTrmrDIR2bA5LVvcyb9sw/eO/NPK263zxGKBYuboDZz2C9vw1kC3IRRr5oF26lSymSDxi4LbT2h+Ymb2DWdZSqeSJ+y4VyjSOI0Pyj4qcComayfPdvToI8M/de8HmQOmLc40v7rQOGoAQWKR1tdFLK2yx/qvEP+YQ0xmdhE68ASr4FLjMW2clskXAZoeyMDFNpqeXS7C0wF9oduTn7gcW6u X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB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+OhuLV4bb6yBkizAAqr6mTwINEULy8eJQEfyGM9Qx32BQBVJJzWeQlpt9kIEKXWvL5z1/E4S7mGYZEj2r6xOoUjXXD9jS3CrEV4u7HNXcTrZcGQkw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2017 14:31:07.4760 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1026 Subject: [dpdk-dev] [PATCH 1/3] examples/ip_fragmentation: limit max frame size 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: Mon, 10 Apr 2017 14:31:09 -0000 Some PMDs do not support 9,5K jumbo frames, so the example fails. Limit the frame size to the maximum supported by the underlying NIC. Signed-off-by: Andriy Berestovskyy --- examples/ip_fragmentation/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index 8d2ec43..31499c3 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -168,7 +168,7 @@ struct lcore_queue_conf { } __rte_cache_aligned; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; -static const struct rte_eth_conf port_conf = { +static struct rte_eth_conf port_conf = { .rxmode = { .max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE, .split_hdr_size = 0, @@ -915,6 +915,11 @@ main(int argc, char **argv) qconf = &lcore_queue_conf[rx_lcore_id]; + /* limit the frame size to the maximum supported by NIC */ + rte_eth_dev_info_get(portid, &dev_info); + port_conf.rxmode.max_rx_pkt_len = RTE_MIN( + dev_info.max_rx_pktlen, port_conf.rxmode.max_rx_pkt_len); + /* get the lcore_id for this port */ while (rte_lcore_is_enabled(rx_lcore_id) == 0 || qconf->n_rx_queue == (unsigned)rx_queue_per_lcore) { @@ -980,7 +985,6 @@ main(int argc, char **argv) printf("txq=%u,%d ", lcore_id, queueid); fflush(stdout); - rte_eth_dev_info_get(portid, &dev_info); txconf = &dev_info.default_txconf; txconf->txq_flags = 0; ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd, -- 2.7.4