From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00074.outbound.protection.outlook.com [40.107.0.74]) by dpdk.org (Postfix) with ESMTP id 5CE7C1B27F for ; Thu, 21 Dec 2017 14:45:09 +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; bh=AvQBhtFKRjxa5If4DDieQdSmbaN2gW7sUKCVXcC+CnM=; b=MlDnrbrivtThqlriSSF+2bu6UT6Yb850M2KzcjvbCugmYsHcDb6oDDvvTuZzFBOrkR6nRfe/RldfGk8lPBSeWNEuVSpqU21VYZ7tDQwPbrPXQNKagkMa7OOWIhTHwvQjHjnceHH3aIVz5EcCwr/mc9CINnMeVztcUIgykS4Y7o8= Received: from VI1PR05MB3149.eurprd05.prod.outlook.com (10.170.237.142) by VI1PR05MB3152.eurprd05.prod.outlook.com (10.170.237.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Thu, 21 Dec 2017 13:45:06 +0000 Received: from VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::355f:857b:fdfd:afd9]) by VI1PR05MB3149.eurprd05.prod.outlook.com ([fe80::355f:857b:fdfd:afd9%13]) with mapi id 15.20.0323.018; Thu, 21 Dec 2017 13:45:06 +0000 From: Shahaf Shuler To: "De Lara Guarch, Pablo" , "dev@dpdk.org" , "Ananyev, Konstantin" , "Nicolau, Radu" , "arybchenko@solarflare.com" Thread-Topic: [dpdk-dev] [PATCH v2 15/39] examples/ipsec-secgw: convert to new ethdev offloads API Thread-Index: AQHTc0T/YWzQa3azp0W6plZ9BCyaxKNKpgsAgAM2aZA= Date: Thu, 21 Dec 2017 13:45:05 +0000 Message-ID: References: <20171123121419.144132-1-shahafs@mellanox.com> <2cde002e4430cdc6ad44d6d1801994171b7a8340.1513081087.git.shahafs@mellanox.com> In-Reply-To: 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=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB3152; 6:/vKf2D6A3ICBGpOiqhw+cm4U1vixLRgGxzltls5yAXZRhr2L6jSms9X2NBLEOVSUhAW/rLcxMZZ4L69Q1kl/hhKHIXuwJXNK7KhCLNVN2bRHWkjIk+GpzCFZzyXEmekajlgkb0/pEKuk44qQyFNxu/n8/z4DpQc6CsPag92iLhvjPoEnJUBLqf0UMS4ojp6AoNtmvlP+VKZvUB2EIYDZVbPUY7fWqD+bc1zvJ2T9F31JpLbcOGpnrRN6aoMr6jV5gnCRkEJGldYhzd3TrCrWxa4r40I2tlNnFNzRDljP95ULI2K87+b3Ezp+M4BizOXQpiF8j5zhzqo/9LbhUFBt8UOcgR8VjbxlKnzsqiG0SkI=; 5:SdUz5iMs3oEVkKA27lbaZn+bfTaFi0Frr3pgckr/yh0M4mOfN9PjVmsvo9cIXBWwNV8pv2v7/ZIbB7cG858ahCpnGmsW4ff+LZUXsI6TJHs6LJadGWGLhKGsC7b1s9Jw0ovIDBZc8vi1eOleSAS+cLFR2HJdIi1ag4lQPBUeGng=; 24:fzWDKQ0yPicO+gERTVY61l7B3wBz+7C1k+70jhmTps3mIyZOu4qp/cQL46sWVMBplK/aYYHlNAo5rRqII8fTT7NC5IHnhclLOwO0VPaeCgg=; 7:MQPeiJ5djsWa8XqgsIq0NZfYCHYDZyvpvz/2vA0gwe9WtN0wPbTffV5uwcz3S18VNcoPMVS8d4z5tmmbKn+MpTUH//jAbpdUALIm1O3VS5F5watduDOeOwVS6R7did9jtRLkCmHI4M9h7oe902tg6sQhMSs6kxY+wOioiUiK4lrG7P20v1K4cP+gjzxLpBYA7QvH3zQjFubkc7OwH6ryB+qZcQunaZ0hmg0rdM415BpH/Z5a/i1xxzlWDWhx+ZSy x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 6577ecd0-f9e1-4d23-d722-08d548790b43 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(3008031)(2017052603307)(7153060); SRVR:VI1PR05MB3152; x-ms-traffictypediagnostic: VI1PR05MB3152: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(3231023)(93006095)(93001095)(10201501046)(6055026)(6041268)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:VI1PR05MB3152; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR05MB3152; x-forefront-prvs: 0528942FD8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(376002)(346002)(366004)(396003)(189003)(199004)(99286004)(8936002)(105586002)(478600001)(106356001)(59450400001)(76176011)(2950100002)(81166006)(7736002)(25786009)(93886005)(33656002)(81156014)(9686003)(6506007)(2906002)(5660300001)(97736004)(6436002)(14454004)(6116002)(55016002)(53936002)(2900100001)(2501003)(66066001)(316002)(5250100002)(74316002)(86362001)(305945005)(68736007)(3660700001)(6246003)(110136005)(3280700002)(229853002)(7696005)(3846002)(102836004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3152; H:VI1PR05MB3149.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6577ecd0-f9e1-4d23-d722-08d548790b43 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Dec 2017 13:45:05.9093 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3152 Subject: Re: [dpdk-dev] [PATCH v2 15/39] examples/ipsec-secgw: convert to new ethdev offloads API 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: Thu, 21 Dec 2017 13:45:09 -0000 Hi Pablo and maintainers of ipsec-secgw, Tuesday, December 19, 2017 2:39 PM, De Lara Guarch, Pablo > > diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec- > > secgw/ipsec-secgw.c index c98454a..1e8af8d 100644 > > --- a/examples/ipsec-secgw/ipsec-secgw.c > > +++ b/examples/ipsec-secgw/ipsec-secgw.c > > @@ -217,6 +217,9 @@ struct lcore_conf { > > }, > > .txmode =3D { > > .mq_mode =3D ETH_MQ_TX_NONE, > > + .offloads =3D (DEV_TX_OFFLOAD_IPV4_CKSUM | > > + DEV_TX_OFFLOAD_MULTI_SEGS | > > + DEV_TX_OFFLOAD_MBUF_FAST_FREE), >=20 > Hi Shahaf, >=20 > Isn't this removing some checksums that were previously done? > Txq_flags was set to 0, which means that SCTP, UDP... checksums are > disabled now? You are right that before txqflags were 0, but it doesn't seem the applicat= ion uses any Tx checksum offload beside IPv4, as seen on snipped code[1]. If I was mistaken and it does uses L4 checksums then I will need to update = this commit.=20 Maintainers of this examples - can you confirm? [1] static inline void = =20 prepare_tx_pkt(struct rte_mbuf *pkt, uint16_t port) = =20 { = =20 struct ip *ip; = =20 struct ether_hdr *ethhdr; = =20 = =20 ip =3D rte_pktmbuf_mtod(pkt, struct ip *); = =20 = =20 ethhdr =3D (struct ether_hdr *)rte_pktmbuf_prepend(pkt, ETHER_HDR_L= EN); = =20 if (ip->ip_v =3D=3D IPVERSION) { = =20 pkt->ol_flags |=3D PKT_TX_IP_CKSUM | PKT_TX_IPV4; = =20 pkt->l3_len =3D sizeof(struct ip); = =20 pkt->l2_len =3D ETHER_HDR_LEN; = =20 = =20 ethhdr->ether_type =3D rte_cpu_to_be_16(ETHER_TYPE_IPv4); = =20 } else { = =20 pkt->ol_flags |=3D PKT_TX_IPV6; = =20 pkt->l3_len =3D sizeof(struct ip6_hdr); = =20 pkt->l2_len =3D ETHER_HDR_LEN; = =20 = =20 ethhdr->ether_type =3D rte_cpu_to_be_16(ETHER_TYPE_IPv6); = =20 } = =20 = =20 memcpy(ðhdr->s_addr, ðaddr_tbl[port].src, = =20 sizeof(struct ether_addr)); = =20 memcpy(ðhdr->d_addr, ðaddr_tbl[port].dst, = =20 sizeof(struct ether_addr)); = =20 } = =20 >=20 > Regards, > Pablo >=20