From mboxrd@z Thu Jan 1 00:00:00 1970 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 BB98738EB for ; Mon, 10 Apr 2017 16:31:11 +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=6/a47O5zwNwlbchbnLDKQRSwnrOW+s3nsrxYe0qZkek=; b=A/5A46R2fECdXg4PPrOzLiv4IkZ9oMThGlnHuoglUgwNnmeJk7Gfe1lgdOTzDTbgTspmKCqT9YBXX0AmqpsmY4anIiPiEwYtJ+MHWn2+xMCZhlZqm9qr/VAhCpOvmpfVAqdmJZnQ92cu13YpDR0rkonLxA0eerSVwQiLb43YTvg= 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:09 +0000 From: Andriy Berestovskyy To: Konstantin Ananyev Cc: dev@dpdk.org Date: Mon, 10 Apr 2017 16:30:56 +0200 Message-Id: <1491834656-20656-3-git-send-email-Andriy.Berestovskyy@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491834656-20656-1-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 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: d91d07c8-0ff1-4607-ec25-08d4801e3b6b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1026; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1026; 3:ll/xSINqFInKy/q00eqacL94ZoAbxbCEx/QbutSvByU8L77805JWiduRcddB/jche/aE+geO1ifFLaBsH7jMlZkLSn0txYeBhvn4pLZr1sbgD5VVx4guckM5ReQR+eD8k7XhBq8ca1Q1xf4zyCMUued8ZufdtM9c3863ecB37j+31N4+fLb5khigArsNPlMTUV4Gx4y4uAqmoERGsTXDfudWnXPKPZQLTSrLPRYECCox5Ph8/4SazzyNbJhFPLPTCyIGytiaeB7f8rmhyXjomtTNJ5nB9ks6+7Cr3SM9J7q+4bR0s7Vt5X7OVBpPs7XX/0+GSgAVmcC+M/k9YWpiJQ==; 25:qHq3NJ0/rGc0Mn3gqrsnt8OrAcJHURHyOPxsjoebn+oDaULFtvzFpUf5S5vpKFIrjt1nvxcAAQTFXINoxsaAJ1GR6Hc7R3DW7hb13QPAGZHcwIrlA2yNsUI0zXkKxhRh8YfOK4BFl0QmBbhreAh486X3+s97RP6EzuiTOXMcJV0aKsiLpJGc/d4iu55oiUmxjNSUWS6QeGiin0bk0YtQnl4BlomPg6JouT0LQ7RByKnXbL9kAeYr26ZHMpIkd+jCAX+7ZHJdZDZNqh18+esoE0V9TvSQxCfBVwWr5ONxBk0JQvTQSJuiQTQErAqU9ttgRl39S5LJgJ0TKlQMJO/Z35yhtT2HsWs1qQVyf/4X9mqaHrMAsSkvZcyoHhpfA067J+xJwtKtEZfq1KCLqyJIac8RYBUoxWWRCS3nUcLO/x/iP11dogWlc1WevQ09FOBM+NvxMgijrvsGSkOigXwSeA== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1026; 31:xpwN/XERhS6xJkfehqYlhPiX+NuAqFidlWCdqgcaYy731RtjC8OhtB24mbUrqVdeHDFzSD35+Gg1s84NjPwJHRUwLV4K44Ttb3pZqCb7n8Ghu/eX6+IhEjWlWeGCTmTnxC3lvP4XhkdJFFPzjnszZqzvlkrArmoic/NtDGX8LfObzZHy4xMtfs2NPROrqbMSIWCTNP+XYQ6QTL3hyFU7LoACN6ztF85FaK8PQHXKyJ4CJHH7hmmqUnddtUgmPebeopz8MPc1W3W8kDZK3R61Vg==; 20:VrPFk0SPuj0eu/25SlnrH38hNYyUD/8MfU2wZyx590O3sw8i9fmRZ7nszHnidRzW6axTa7UxeL2tdO65hM2PDhUyeeVB/Wew3wX+1NSZzJEA+VqGgnKyJbwIqbKTuFcm9/5h5Cv0C0rULW6kjOaieQpOjIAWkB6MbRtM2twsSOA5oXRD+iuGmBCmzU7C3NrtKuSZ6O5lHtzC0s8QMZKXXwFSnae/3qTY80Xj9FlrDss33Bs03x//TIDWFpR6uypgpk05mo32ixhI/VSEtRvsfBHR892l6WU2Cuui5xSj7GS6CWm/xmeaPD7vH46Im3Z0POFasfjTM0XLdeRnH3rJPfhaD4MxhEUu0w9Q1RtBLXY7T1+P5ZGqGxAU0FDcVdhCbVIwGfkONAAejVasQGfEupq5D8c82ZZnzHGz8DUdDclRpCCxhm60Sr43YYUWYkiY9wbMZIuFykhDWuiOWmlFxU07mGq81OaYVpDFcW79UQgoDhC8XagtV4t/leQ7tLBGH+3J2BXJIQj6woxZZn32RxZANAUT+HFgvlQlU/58PIzAoix8oCXQnk2WsFaap0/CsngO2hEUqCOghUvVSx8DJvQFEYuLXGLgdSU7LP2KXY8= 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:jRJdCRY8GRXhsV/LbriRaK8GfBBgRGcSYAh17worEkoFZNSfjkirDi1qsJk5sKaZaT5hX3HEP7jefAgGJ+HS94Bz0WAKbAUbW28aIQiOAzXN26j+VWL4UMfn7EsCHA3RSNNrEzTJpItdDG+o8jK36qJLJnu6mefBCLMpMBZFnAhcilpkCLTl3QQ4sHFphcBdEGWUc6DYksnC1hy+xtYvriGJwPQg9G91323d8SPnY49xIjuj9BE6A4pbJHCEBqdz+0Oz/gMcc7pI1ugAV20OJUzkyBhz8QIjysNimVi0uB5rHGzVlf0DWxudlLXCF3vrEhPdpCZBikNIjRgPmKzdUPQWwFrrMiQYcwC8StXi86V/DlBLsjlWOnGTSBVLmKgqOgmxWxzo80z+cvwAvuoyaG+YGWHquloNsbXpUJcOzHuzT1xn2DH0qivmOruhjSVHGMZDmFoSWzpzkh29SypMU061jM6YKvDxP0cGOVFLbTbrjhAS8fgPcNLydcf1nC6o849EFpO/oUc9Z8on8GV1A3khuTKLXQqht5Bp3lqN9wLgpZ/gqAvM7tS1j4BoFXaCzd4IF6ddNBZ3gfu2+5BEVyQyk/rpDRm7yIy3UPLaHikhEwqV51fB4DAcwrOMmL5xob4f+zcYMkvmPJXVJ+x4/9KeW3a/XzM8QwHS6I1/ArO2GjBZiZ3JFFX7ihV1aUtYXDmIR1jcSPPbON997U8cFw== 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:gTPKdaVne05x2ZqrcYY/aowgpMXcNZbc6m3U2RIjLMmC68RHjGxNxPVzUEEx74mg4KkDmkmKO40XgBsw3mMxs6nIHWa8Si3Ix8KPeqoRhDWFV1q7mJzd94EW5U8sdpkLE+Rc9ZAIb1yFenqYQ37aqgSQAUO6ZacTX51fkIwmVbiFTRCN/oYq7c5ktSvJ+cHHInpOld59+zxwAWbnutWFsY3mrbsbf+derHNqugfnl6XIK49logdKfTEfO3EMpE8LHcYIU3RvKnQYGIrIpxSjQKX7QPylPfLtx9ArUa/+HXIV8S5uX+pjhuJnHvSJvymSyIqHYBiL42M3MN5NunfL5xcv59mgBPxVOzeq104OzW3EVv/czs5pIOKeDUTutJKB+EsETxVydw+T9JCb33aZazo0jVDzGKk9vOI2zfbzJESrTmkpQJmIAWiyxd6TLuOTGEj5f+ZSA2FGhsFbqYVwE3mP6y61qEs+3latCHJL5GahyW29dSNi7TV75pxRoOCeaKAupnlbcKl8on2DSDBJKAl5CcTHHXaYMaGrX0ZYM1hD4BAJMtfl3fos46i1LeHlCO2/PgZ2Rypckjc4d/OUoAb/ih/wSbmSZ3ILxlenHaeh+9OC1owX/cwVIrmK8vGwKgDCNLP134+BXw/jvgMvjxbPA8PLe0GXGO9nM9f3aizH4gDHbW7i6B7RysfJE+UtlgxbXAO/RQL6ApdmnCxuN5yUh3mf13g5BdRGyzp42e51Y7JeLfCGGOYGP6npYRjQxHeJa65qd67pc6ZEIZfiqWOZ+yfhKrufN1YLpA3UZNAXFmbY6/6prd4QHYEMYMx1spc9ZcvDtayodX3KlEJmDP3yTSCpHmIJprA/sssMRj9VtwQcYtbBW6nSmPhn0YqOfglvtSE/CeGOX1qwzM+5SRxJvVLga/eoqhNB0Hm8PPct9eIgg8tu0j4XV4WyBobo X-Microsoft-Exchange-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UIeNqNPzWHlnqufWv1BzHVI7R0IgYr+fZEMSqaEC2xCVcTXUANgNcJgSxTCfG8rwlM5IfrBL7mSNcHTXwRD1PWoV2skRVJIUuF3Zq/0mGpeTuuYJX7IbphwdtUpuA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2017 14:31:09.5697 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1026 Subject: [dpdk-dev] [PATCH 3/3] examples/ipv4_multicast: 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:12 -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/ipv4_multicast/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index b681f8e..b4bd699 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -137,7 +137,7 @@ struct lcore_queue_conf { } __rte_cache_aligned; static 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, @@ -725,6 +725,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) { @@ -777,7 +782,6 @@ main(int argc, char **argv) printf("txq=%u,%hu ", 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