From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id A22BC4C93 for ; Mon, 30 Jul 2018 11:27:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2018 02:27:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,422,1526367600"; d="scan'208";a="75685866" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga004.fm.intel.com with ESMTP; 30 Jul 2018 02:27:49 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.195]) by IRSMSX103.ger.corp.intel.com ([169.254.3.208]) with mapi id 14.03.0319.002; Mon, 30 Jul 2018 10:27:49 +0100 From: "Ananyev, Konstantin" To: Jerin Jacob , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Yigit, Ferruh" , "shahafs@mellanox.com" Thread-Topic: [dpdk-dev] [PATCH] examples: remove Rx checksum offload Thread-Index: AQHUJzn3mp4u5PI21k+xHloY8JlDeKSngA/Q Date: Mon, 30 Jul 2018 09:27:48 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258DF51F641@irsmsx105.ger.corp.intel.com> References: <20180729124409.3669-1-jerin.jacob@caviumnetworks.com> In-Reply-To: <20180729124409.3669-1-jerin.jacob@caviumnetworks.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWUwMGU0MWItY2RmMy00ZmRjLTk5ZDQtZTk5MDNjMTlmZjgxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoickozTW5EdWtCdkRJXC84RHp2SFRXdjV5OWI5VUdBVkdrdWJuMXVINmFLZ1FUNmUxQUoxRWUwUnkzXC8wTXZxbXlFIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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:27:56 -0000 Hi Jerin, >=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. >=20 > 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. Konstantin=20 >=20 > 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(-) >=20 > 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/ip= sec-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/p= erformance-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