From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andriy Berestovskyy Subject: [PATCH 2/3] examples/ip_reassembly: limit max frame size Date: Mon, 10 Apr 2017 16:30:55 +0200 Message-ID: <1491834656-20656-2-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> References: <1490288768-8114-1-git-send-email-Andriy.Berestovskyy@cavium.com> <1491834656-20656-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org To: Konstantin Ananyev Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0055.outbound.protection.outlook.com [104.47.42.55]) by dpdk.org (Postfix) with ESMTP id EF44E2C1A for ; Mon, 10 Apr 2017 16:31:10 +0200 (CEST) In-Reply-To: <1491834656-20656-1-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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_reassembly/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index b641576..257881c 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -1063,6 +1063,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) { @@ -1129,7 +1134,6 @@ main(int argc, char **argv) printf("txq=%u,%d,%d ", lcore_id, queueid, socket); fflush(stdout); - rte_eth_dev_info_get(portid, &dev_info); txconf = &dev_info.default_txconf; txconf->txq_flags = 0; -- 2.7.4