From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70083.outbound.protection.outlook.com [40.107.7.83]) by dpdk.org (Postfix) with ESMTP id 3163E5B12 for ; Fri, 28 Dec 2018 11:06:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hgHykl790udfJEENk4k9gdI/by34C3mf6Vokqn7yOcI=; b=a8HJt1OvUPxnb4vqoaw9zLj1CuhQYtzM84t0/toi6KNWx3axXz28cIf7QrGw+HX1STpmXxj/YKQqhe44LURMC7joslbvH+wOdngQXJO/2EGWZnFQvvp/8aAa98wBy7Pawchs3GwjQ8Efgh5opw4T71nnALNHwSSIUXeIaHDmT28= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3996.eurprd05.prod.outlook.com (52.134.65.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1471.20; Fri, 28 Dec 2018 10:06:04 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::d43a:3775:8af7:29c6]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::d43a:3775:8af7:29c6%4]) with mapi id 15.20.1446.027; Fri, 28 Dec 2018 10:06:04 +0000 From: Yongseok Koh To: Noa Ezra CC: "stable@dpdk.org" Thread-Topic: [dpdk-stable] [PATCH] examples/ip_fragmentation: support big packets Thread-Index: AQHUnRSxfJ601Tet302AnkKraJSWRaWT77kA Date: Fri, 28 Dec 2018 10:06:04 +0000 Message-ID: References: <1545826517-14579-1-git-send-email-noae@mellanox.com> In-Reply-To: <1545826517-14579-1-git-send-email-noae@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-originating-ip: [69.181.245.183] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB3PR0502MB3996; 6:ApThCfSr8Xfv7PsiBBMb2LdX4f0WTwlV7nHVUym6Xi/lUlkZOzoF2KaVeeG8b5j/ZRp42NZk2UoNBL7g9QiPF59IPRk13RnlPBkX5PWQ0qU9Y0h/352m/hFSHKteJRQuZHX22ZFFjqAyE6/j/whYWhiw0TDP8xJwUh61ucupBuco9sL7iRu/83i0180mqZ3SwcrGHv8AEOxpUXkUCxtoV28zJPD9QaHgtUprP7I4WW0Ea/GcEw7YI99zjLxDWvTM6ceIhP4PFWS2NsjDx+DnDc0DyHbNmg48Pd2+kg1nRnAmO1aLjHLR75EhRZrDGYi8/oDZY8s7iu5dmHfLMQ6LblK0J0HArrd2fnh4Rfy8/Qadn3vQV1/RQPgXjTdkE1R+PvRxJKGMiaQbZJC+MPrV5T1J4IoN3B0DcXeFBOEbX5O2MMeStbbnwohBDNxDsxuuNRUAaNDZ1km6Yh6kUp1kkg==; 5:oRphQtiy9k8dHMOdBg/Oi6xOZbW7NNv5Yu/OxHzcxoRy/iIn+cpNPbo4bsWZ8nl4kIlROrz7OVRpRALU8yedg2hJBr7GYBJqvklkcRays/AsxamFByyBM2CfWTnWdQq3VWk73aFYtn+FZVtGsywQkV0XMNfm1E0x1jsd0Mzz2CA=; 7:gaE+w2k0vuzythlg2dy9QjhFYwBo89JoqZBNqUD17RapBVYH6wkGeLxB1ANQbsSjchu/o6LNUs+3MQ9e+o8NiwsiURLUmFDuKWZ+vLSDbaGDJc0h2X6enlgnhgYVMNL9c32gKoS2yn0r4jvAUMe7xg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 4869a325-b58a-4c79-0656-08d66cac143c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600109)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB3PR0502MB3996; x-ms-traffictypediagnostic: DB3PR0502MB3996: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(2401047)(8121501046)(3231475)(944501520)(52105112)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:DB3PR0502MB3996; BCL:0; PCL:0; RULEID:; SRVR:DB3PR0502MB3996; x-forefront-prvs: 09007040D4 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(39860400002)(376002)(346002)(199004)(189003)(37006003)(4326008)(97736004)(33656002)(6512007)(53936002)(81166006)(81156014)(6636002)(25786009)(316002)(71190400001)(8676002)(71200400001)(8936002)(2906002)(229853002)(83716004)(6246003)(6486002)(82746002)(6436002)(6862004)(6506007)(99286004)(86362001)(105586002)(66066001)(26005)(3846002)(14444005)(256004)(14454004)(305945005)(6116002)(102836004)(53546011)(486006)(36756003)(76176011)(11346002)(478600001)(476003)(2616005)(186003)(68736007)(106356001)(5660300001)(446003)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3996; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Q30PaB5CklyIb1leECFWLZtZS/41LIdnLt8zc8nDKs2ZfXEXKnwsbOczvUm3K580SBnWg/6EDGdu/C0vSwg7BtCbiqMaHfN5R6UFRTp8auIx+3NlhFRWtOMpWMT4fBZX/R56IlWcC7grHR9vZTwT5XGhvqjO8nkdBdU+wLJZQBYY2QOQfld3NIjVTyETurjGuNLBqYYaR2cdMDNEbvUvnLNV48shDw8sYlc8XmzpfANxmBPH6kRdiN8M7xWHjtT6f8pYqS1TKk4k0jtq/22u+pKsc1UhHGnT9yKZUGEuDGaZTOOWrUy98DgVdhGR1H2w spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <077CC252DE9D4F428B1EEA83B4679B60@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4869a325-b58a-4c79-0656-08d66cac143c X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Dec 2018 10:06:04.7755 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3996 Subject: Re: [dpdk-stable] [PATCH] examples/ip_fragmentation: support big packets X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2018 10:06:06 -0000 > On Dec 26, 2018, at 4:15 AM, Noa Ezra wrote: >=20 > In some vendors the RX and TX configuration must be the same, > therefore the MTU size need to be equal to max_rx_pkt_len. > The MTU is the largest size packet in bytes that can be sent > on the network, therefore before changing this parameter, > the NIC could not receive packets larger than 1500 bytes, > which is the default MTU size. > In addition, scatter-gather need to be enabled in order to > receive frames bigger than mbuf size. >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: Noa Ezra > --- Hi Noa, I can see the same patch in the dev mailing list. You don't need to send th= e same fix to stable mailing list separately but you just need to add "Fixes:= ..." tag and "Cc: stable@dpdk.org" to your original patch. Please refer to the contribution guideline. Thanks, Yongseok > examples/ip_fragmentation/main.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) >=20 > diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation= /main.c > index 17a877d..7420420 100644 > --- a/examples/ip_fragmentation/main.c > +++ b/examples/ip_fragmentation/main.c > @@ -141,6 +141,7 @@ struct lcore_queue_conf { > .max_rx_pkt_len =3D JUMBO_FRAME_MAX_SIZE, > .split_hdr_size =3D 0, > .offloads =3D (DEV_RX_OFFLOAD_CHECKSUM | > + DEV_RX_OFFLOAD_SCATTER | > DEV_RX_OFFLOAD_JUMBO_FRAME), > }, > .txmode =3D { > @@ -425,7 +426,6 @@ struct rte_lpm6_config lpm6_config =3D { > * Read packet from RX queues > */ > for (i =3D 0; i < qconf->n_rx_queue; i++) { > - > portid =3D qconf->rx_queue_list[i].portid; > nb_rx =3D rte_eth_rx_burst(portid, 0, pkts_burst, > MAX_PKT_BURST); > @@ -777,7 +777,6 @@ struct rte_lpm6_config lpm6_config =3D { > RTE_LOG(INFO, IP_FRAG, "Creating direct mempool on socket %i\n", > socket); > snprintf(buf, sizeof(buf), "pool_direct_%i", socket); > - > mp =3D rte_pktmbuf_pool_create(buf, NB_MBUF, 32, > 0, RTE_MBUF_DEFAULT_BUF_SIZE, socket); > if (mp =3D=3D NULL) { > @@ -892,6 +891,16 @@ struct rte_lpm6_config lpm6_config =3D { > dev_info.max_rx_pktlen, > local_port_conf.rxmode.max_rx_pkt_len); >=20 > + /* set the mtu to the maximum received packet size */ > + ret =3D rte_eth_dev_set_mtu(portid, > + local_port_conf.rxmode.max_rx_pkt_len); > + if (ret < 0) { > + printf("\n"); > + rte_exit(EXIT_FAILURE, "Set MTU failed: " > + "err=3D%d, port=3D%d\n", > + ret, portid); > + } > + > /* get the lcore_id for this port */ > while (rte_lcore_is_enabled(rx_lcore_id) =3D=3D 0 || > qconf->n_rx_queue =3D=3D (unsigned)rx_queue_per_lcore) { > @@ -927,7 +936,7 @@ struct rte_lpm6_config lpm6_config =3D { > local_port_conf.txmode.offloads |=3D > DEV_TX_OFFLOAD_MBUF_FAST_FREE; > ret =3D rte_eth_dev_configure(portid, 1, (uint16_t)n_tx_queue, > - &local_port_conf); > + &local_port_conf); > if (ret < 0) { > printf("\n"); > rte_exit(EXIT_FAILURE, "Cannot configure device: " > @@ -936,7 +945,7 @@ struct rte_lpm6_config lpm6_config =3D { > } >=20 > ret =3D rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd, > - &nb_txd); > + &nb_txd); > if (ret < 0) { > printf("\n"); > rte_exit(EXIT_FAILURE, "Cannot adjust number of " > --=20 > 1.8.3.1 >=20