From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40062.outbound.protection.outlook.com [40.107.4.62]) by dpdk.org (Postfix) with ESMTP id 7837B4D27 for ; Mon, 30 Jul 2018 11:50:26 +0200 (CEST) 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=qYzTS6fDf1DoXcfrTzimSID8uPngiLb9+wKYTC7e33o=; b=ON9fYBr+wbglCuSBhzQPBiTJEcESsvpX4IqQ4NgmrCvP6AVM3/1OtwibZ7O8yIn3t5bioYzXrDUpPD+zqp8fo8nRAH4L57mbWKoQu0l4xLcTLsL+z2/eRif+t9B4FG2wLNaUFDlOGU3ev4CbDaX4L3vedVvvm1y4qeEkJo5//8U= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4300.eurprd05.prod.outlook.com (52.134.108.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Mon, 30 Jul 2018 09:50:24 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::52a:650b:ae10:fc3%4]) with mapi id 15.20.0995.020; Mon, 30 Jul 2018 09:50:24 +0000 From: Shahaf Shuler To: Jerin Jacob , "Ananyev, Konstantin" CC: "dev@dpdk.org" , Thomas Monjalon , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH] examples: remove Rx checksum offload Thread-Index: AQHUJ+eaVDjMQgBdA02UOUNNvNqXo6SngaEAgAADbNA= Date: Mon, 30 Jul 2018 09:50:24 +0000 Message-ID: References: <20180729124409.3669-1-jerin.jacob@caviumnetworks.com> <2601191342CEEE43887BDE71AB977258DF51F641@irsmsx105.ger.corp.intel.com> <20180730093555.GA22823@jerin> In-Reply-To: <20180730093555.GA22823@jerin> 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; DB7PR05MB4300; 6:j5CubzdQI/4G9rsaVzbKnVAxTiyclSx9tM6DVeMYHAPquhhjQmTCZ2+qVwnjEZSkta/OFbMB6RBOt4j9GkjprrhNMDn+BnnPYkwtd6HnHaVkVwtozRypp412w1GjrJAMwPDwAppDtWWp8IK/eFc1L4ffpF2XckykFpsee/sJAWpjCFwqqO70TSDaF8jy18Bnbl6uy4YQRE1KFBVrTEg8c1ob55B8URyCtWEcUulzOvIgdy5lOzH1kv+uHxf2jCqY4j8y11jqnDM27MK1PKo6PfZKA/626RVhGDsnVYZiMoKrHl6HUiNb7O7oq9xWUIpyDX8gP4f1AK8Ny7ZFPgq4j6/pLT6SRDMiPd4xTAeRSJb0TytDJGVSSVTDstToFppHw4oFzjXbhzidGXEGdaTp3ifLanckLCNTiB9gdD1Awsd6X1ZDJi01YA+YqAeXNwxx22DoIPdEWQWTEzJYuMIUbg==; 5:3XW/NCtXJR/rQT7wSMYZ5Nm5qA0K1AslFtWpv0+6bkOR3mTeLTYTEE0nKWVtqkuoYxA+Lcdc65QBfPPfbXDhWjEvYAeQ2zjeegeGV84PayuQfUm1LnE1c5Rx5IdIaQy3294SVI86++ZAbM+PtCnfCEsVdOUJO9QvbT1adgdhZZs=; 7:O01vEDwbx9vcCIepxkdQuO9qXcN0Fn+oM7RPphQ5qQqRhZdJSrccXj9fZN0BF2N6D3ZOyFmZKqU4voPfKKZzEmflXsfUl+CqwJvBO+l9RJR85noDXQMDS/mQ90Loljvggzf5ppAxtwu6JL34FtHo8FlS0fJkOuG0yen0lT85JSAiFozCjc2qBk7yLIf3oZSGzkdePNcvVSRvLRYlaLdsFQo/RIG7OXWUm8pu9z1ObmJk3Edy64h1M7xvRDfeaHfx x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 626ec872-403c-433b-6421-08d5f601df7d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4300; x-ms-traffictypediagnostic: DB7PR05MB4300: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(17755550239193); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DB7PR05MB4300; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4300; x-forefront-prvs: 0749DC2CE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(39860400002)(396003)(376002)(366004)(189003)(199004)(33656002)(9686003)(54906003)(110136005)(55016002)(486006)(316002)(476003)(229853002)(6436002)(105586002)(25786009)(106356001)(478600001)(4326008)(99286004)(8936002)(2900100001)(5660300001)(7696005)(3846002)(81166006)(81156014)(68736007)(14454004)(8676002)(6116002)(74316002)(7736002)(6246003)(2906002)(53936002)(305945005)(6506007)(86362001)(11346002)(446003)(97736004)(76176011)(102836004)(5250100002)(66066001)(186003)(256004)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4300; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 7CYM6cJk3WAjmY+SYZZ2zUN+ucj6kES/3VdOnqq2KZPmqUxsrv8Ul6o2YSPXFZvWTV/WR7Ir+YnccwNMutgWLnq5fJwwyqXvwgWaTjO92LmUoE/cbPYcb1WNTMrJS9Cij7mdLvQ/IxPBlHg61K/dS+flOgNhQmJt0GF02A2y38A1v7O4noouVPkxFY+mlKRhkxv1njBua20HRMIqsKt8oCHPZ7JAp7GVlZccFHUWAxGQp5+ykJX/lTr4q/VhczXjIFFesm/liKZjJvS0VoAfQs/iFOYJh4ty7cZylE1gnMibhM1MuaEO30XvfqutXZqGNha81cZ5QgTL4zFDh7sF0OC6lur89C5G9d6B6QJ4m/k= 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: 626ec872-403c-433b-6421-08d5f601df7d X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jul 2018 09:50:24.5708 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4300 Subject: Re: [dpdk-dev] [PATCH] examples: remove Rx checksum offload 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, 30 Jul 2018 09:50:26 -0000 Monday, July 30, 2018 12:36 PM, Jerin Jacob: > > Subject: RE: [dpdk-dev] [PATCH] examples: remove Rx checksum offload > > > > > > Hi Jerin, >=20 > Hi Konstantin, >=20 > > > > > > > > As of now, application does not check PKT_RX_*_CKSUM_* flags per > > > packet, so it does not matter DEV_RX_OFFLOAD_CHECKSUM enabled or > not. > > > > > > Removing DEV_RX_OFFLOAD_CHECKSUM offload so that driver can save > a > > > few cycles if possible. > > > > Personally, I'd move in other direction: keep RX checksum offload and > > add checks inside sample apps to handle (drop) packets with invalid > checksum. >=20 > OK. Till someones add the DROP logic in application, Can we take this pat= ch? > Because there is no point in enabling DEV_RX_OFFLOAD_CHECKSUM without > DROP or any meaning full action in application. I agree w/ Constantine.=20 If the l3fwd application targets to simulate vrouter which do IP forwarding= validating the checksum is part of the required logic. The patch should not remove it rather add check on the mbuf checksum fields= and drop the mbuf accordingly.=20 >=20 >=20 > > Konstantin > > > > > > > > Signed-off-by: Jerin Jacob > > > --- > > > examples/ip_fragmentation/main.c | 3 +-- > > > examples/ip_reassembly/main.c | 3 +-- > > > examples/ipsec-secgw/ipsec-secgw.c | 3 +-- > > > examples/l3fwd-acl/main.c | 3 +-- > > > examples/l3fwd-power/main.c | 4 ++-- > > > examples/l3fwd-vf/main.c | 3 +-- > > > examples/l3fwd/main.c | 3 +-- > > > examples/load_balancer/init.c | 3 +-- > > > examples/multi_process/symmetric_mp/main.c | 3 +-- > > > examples/performance-thread/l3fwd-thread/main.c | 3 +-- > > > examples/qos_meter/main.c | 3 +-- > > > 11 files changed, 12 insertions(+), 22 deletions(-) > > > > > > diff --git a/examples/ip_fragmentation/main.c > > > b/examples/ip_fragmentation/main.c > > > index 5306d7672..7cbd5dc10 100644 > > > --- a/examples/ip_fragmentation/main.c > > > +++ b/examples/ip_fragmentation/main.c > > > @@ -140,8 +140,7 @@ static struct rte_eth_conf port_conf =3D { > > > .rxmode =3D { > > > .max_rx_pkt_len =3D JUMBO_FRAME_MAX_SIZE, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CHECKSUM | > > > - DEV_RX_OFFLOAD_JUMBO_FRAME | > > > + .offloads =3D (DEV_RX_OFFLOAD_JUMBO_FRAME | > > > DEV_RX_OFFLOAD_CRC_STRIP), > > > }, > > > .txmode =3D { > > > diff --git a/examples/ip_reassembly/main.c > > > b/examples/ip_reassembly/main.c index b830f67a5..7acc6b7b5 100644 > > > --- a/examples/ip_reassembly/main.c > > > +++ b/examples/ip_reassembly/main.c > > > @@ -164,8 +164,7 @@ static struct rte_eth_conf port_conf =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .max_rx_pkt_len =3D JUMBO_FRAME_MAX_SIZE, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CHECKSUM | > > > - DEV_RX_OFFLOAD_JUMBO_FRAME | > > > + .offloads =3D (DEV_RX_OFFLOAD_JUMBO_FRAME | > > > DEV_RX_OFFLOAD_CRC_STRIP), > > > }, > > > .rx_adv_conf =3D { > > > diff --git a/examples/ipsec-secgw/ipsec-secgw.c > > > b/examples/ipsec-secgw/ipsec-secgw.c > > > index b45b87bde..63eef1f26 100644 > > > --- a/examples/ipsec-secgw/ipsec-secgw.c > > > +++ b/examples/ipsec-secgw/ipsec-secgw.c > > > @@ -197,8 +197,7 @@ static struct rte_eth_conf port_conf =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .max_rx_pkt_len =3D ETHER_MAX_LEN, > > > .split_hdr_size =3D 0, > > > - .offloads =3D DEV_RX_OFFLOAD_CHECKSUM | > > > - DEV_RX_OFFLOAD_CRC_STRIP, > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { > > > diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c > > > index 7c063a8d0..c66b5b462 100644 > > > --- a/examples/l3fwd-acl/main.c > > > +++ b/examples/l3fwd-acl/main.c > > > @@ -127,8 +127,7 @@ static struct rte_eth_conf port_conf =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .max_rx_pkt_len =3D ETHER_MAX_LEN, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CRC_STRIP | > > > - DEV_RX_OFFLOAD_CHECKSUM), > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { > > > diff --git a/examples/l3fwd-power/main.c > > > b/examples/l3fwd-power/main.c index d15cd520e..b00a8ec45 100644 > > > --- a/examples/l3fwd-power/main.c > > > +++ b/examples/l3fwd-power/main.c > > > @@ -180,8 +180,8 @@ static struct rte_eth_conf port_conf =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .max_rx_pkt_len =3D ETHER_MAX_LEN, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CRC_STRIP | > > > - DEV_RX_OFFLOAD_CHECKSUM), > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > + > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { > > > diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c > > > index 5edd91a78..2a10e9d76 100644 > > > --- a/examples/l3fwd-vf/main.c > > > +++ b/examples/l3fwd-vf/main.c > > > @@ -161,8 +161,7 @@ static struct rte_eth_conf port_conf =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .max_rx_pkt_len =3D ETHER_MAX_LEN, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CRC_STRIP | > > > - DEV_RX_OFFLOAD_CHECKSUM), > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { > > > diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index > > > ab019b9e4..d4a79b23f 100644 > > > --- a/examples/l3fwd/main.c > > > +++ b/examples/l3fwd/main.c > > > @@ -120,8 +120,7 @@ static struct rte_eth_conf port_conf =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .max_rx_pkt_len =3D ETHER_MAX_LEN, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CRC_STRIP | > > > - DEV_RX_OFFLOAD_CHECKSUM), > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { > > > diff --git a/examples/load_balancer/init.c > > > b/examples/load_balancer/init.c index f2045f235..14ea1e9d8 100644 > > > --- a/examples/load_balancer/init.c > > > +++ b/examples/load_balancer/init.c > > > @@ -45,8 +45,7 @@ static struct rte_eth_conf port_conf =3D { > > > .rxmode =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CHECKSUM | > > > - DEV_RX_OFFLOAD_CRC_STRIP), > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { > > > diff --git a/examples/multi_process/symmetric_mp/main.c > > > b/examples/multi_process/symmetric_mp/main.c > > > index c6c6a537f..2735a68c5 100644 > > > --- a/examples/multi_process/symmetric_mp/main.c > > > +++ b/examples/multi_process/symmetric_mp/main.c > > > @@ -178,8 +178,7 @@ smp_port_init(uint16_t port, struct rte_mempool > *mbuf_pool, > > > .rxmode =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CHECKSUM = | > > > - DEV_RX_OFFLOAD_CRC_STRIP), > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { diff --git > > > a/examples/performance-thread/l3fwd-thread/main.c > > > b/examples/performance-thread/l3fwd-thread/main.c > > > index 5392fcea8..5f4a470b4 100644 > > > --- a/examples/performance-thread/l3fwd-thread/main.c > > > +++ b/examples/performance-thread/l3fwd-thread/main.c > > > @@ -306,8 +306,7 @@ static struct rte_eth_conf port_conf =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .max_rx_pkt_len =3D ETHER_MAX_LEN, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CHECKSUM | > > > - DEV_RX_OFFLOAD_CRC_STRIP), > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { > > > diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c > > > index 5cf4e9dfa..a29032b04 100644 > > > --- a/examples/qos_meter/main.c > > > +++ b/examples/qos_meter/main.c > > > @@ -56,8 +56,7 @@ static struct rte_eth_conf port_conf =3D { > > > .mq_mode =3D ETH_MQ_RX_RSS, > > > .max_rx_pkt_len =3D ETHER_MAX_LEN, > > > .split_hdr_size =3D 0, > > > - .offloads =3D (DEV_RX_OFFLOAD_CHECKSUM | > > > - DEV_RX_OFFLOAD_CRC_STRIP), > > > + .offloads =3D DEV_RX_OFFLOAD_CRC_STRIP, > > > }, > > > .rx_adv_conf =3D { > > > .rss_conf =3D { > > > -- > > > 2.18.0 > >