From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 030E5A0A0D; Sun, 31 Jan 2021 12:53:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83F2E40693; Sun, 31 Jan 2021 12:53:29 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by mails.dpdk.org (Postfix) with ESMTP id A305C40692 for ; Sun, 31 Jan 2021 12:53:27 +0100 (CET) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 31 Jan 2021 03:53:26 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 31 Jan 2021 03:53:26 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 31 Jan 2021 03:53:26 -0800 Received: from HKMAIL103.nvidia.com (10.18.16.12) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 31 Jan 2021 11:53:25 +0000 Received: from HKMAIL104.nvidia.com (10.18.16.13) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 31 Jan 2021 11:53:16 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 31 Jan 2021 11:53:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HoDip2oIly2zNjprVIWICaGpoiC1DfRj9mojcaaG9Nizuh0JoqFuqN35kGBhBmIRZfHouoUucxeXOcpVca7gLRz9Oh0yEnkyDeQLGi536c0Pbf94xoh1wzJabtXmmKYMTVbmNnyVANj1vZdL+tUEt/y7ozYFLa8SOVwiXZNR8eb6k0+xfmxg5Uu5tnaScTcjT7VVw9IavtxvFMXvYhrvw6I5bmqZZo2laWJ52+MVSTJEChCXZVORxY+SrLhF3lc78HyYZ4873vIfvk/q4PoOqUkZ3C5XUxJXyje0h+g4oMslBpf20tcDgJiA1cRyFPIXxaMATgPtzhdlpxgHoLXEVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EQtm13O5HBCcuyQBsHLfinK1u/HfA1kX4oBIUx9c1zA=; b=G8gSG/VYfXXsOeevewjbrqPWKS3fRWIDO4a6YOHw1wwXxu5PCClI7jotzll8i3skidFYaz18udiASYcfepAkGfrgdXgSmpZfzizPeu1Qu+Oh4t/TiiatFX2//uHgS7f6B8NF6PHmsliC874c+AVXeGFa9Ff/V9+L+MM7EvE5QOs8HwzqgWx1eIEq+tMo+XihMe255YMwrzmMoqFhbogM/ZMRmN/nfPKHZwk96X7M1nPeWZy4ZK2GgjlQD8cv27hLp1tEKpxAvuPeIwHBxJxO7H+Kt5W22kNpfvtaZgDH4jf1YQu6ufRL3E0SM99CMkP4gzQ38TZ4JYiIn0yuEu0whA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MWHPR12MB1677.namprd12.prod.outlook.com (2603:10b6:301:11::13) by MW2PR12MB2555.namprd12.prod.outlook.com (2603:10b6:907:b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12; Sun, 31 Jan 2021 11:53:13 +0000 Received: from MWHPR12MB1677.namprd12.prod.outlook.com ([fe80::75d6:cd9:3d37:3797]) by MWHPR12MB1677.namprd12.prod.outlook.com ([fe80::75d6:cd9:3d37:3797%11]) with mapi id 15.20.3784.022; Sun, 31 Jan 2021 11:53:13 +0000 From: Wisam Monther To: Lance Richardson , Wenzhuo Lu , Xiaoyun Li , Bernard Iremonger CC: "dev@dpdk.org" , Ajit Kumar Khaparde , Kalesh Anakkur Purayil Thread-Topic: [dpdk-dev] [PATCH 21.05] app/testpmd: count outer IP checksum errors Thread-Index: AQHW9o8t8H9pEpWq/Uu2xIJLfUOhTKpBobbw Date: Sun, 31 Jan 2021 11:53:13 +0000 Message-ID: References: <20210129223554.103012-1-lance.richardson@broadcom.com> In-Reply-To: <20210129223554.103012-1-lance.richardson@broadcom.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [45.147.66.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 967e3cde-5aa7-4569-8d8c-08d8c5deca20 x-ms-traffictypediagnostic: MW2PR12MB2555: x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:923; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EwQbitmNi69jkF4QI4d0zspdbbhSJZYaxpbRk+qw67ovi+04xjaKfj6VZnj0QIlUaIqmsnA++toChd36EaVkr+XDTvGqXJu07TvNcdJqxDZuVbq/liGsHb0bch7FaGcD82XUYE5MflMkk0jd444oNC4+YJtoKuPjCWcXdGPKcO7hq17DrC+IPhs69WydinA40FBy2vW2rVhz4Vcv30AXJlQB3ZkLYkwm1VckicB1ok6Gezu0NDrXwCIsBNv9c17XP6JcmEUws0L+GsLev4MXBLFaBxQksYhRQGRCMZn7RE2gYATcyt2tUHaBa0F2yEkhl20Hbr2pH6hlcSy6U7ramM2gqehZwz0ItWjBFWBl1DuMY2q72rRI2ZsptKxwoB+Isp8VEK8LsdbJF7yslWFG7LT/0FVaQbGzo2tFLjiNnUhB9YiYZ0hIdfy/Pmc/sHMFJdSwO06ntREPm1LIocosdx2FKtgVHMiGhbtqWjD+pivdtiZUtM5zGlWdBjBqbm6ZHNq7kmE03L5Jz8oRLbsMqA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR12MB1677.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(366004)(396003)(346002)(39850400004)(2906002)(33656002)(5660300002)(66446008)(66476007)(186003)(55016002)(9686003)(26005)(52536014)(66556008)(64756008)(8676002)(53546011)(86362001)(7696005)(71200400001)(54906003)(8936002)(76116006)(110136005)(66946007)(83380400001)(316002)(4326008)(478600001)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?iPgunOwguebOr6ebG6+pl+jG8RECWicOXr+T+pCDIaVuLaymgkxeYhKQ+HaC?= =?us-ascii?Q?+4xw+Z6Dgl0sz37uvxQRmh4Z+YF8EQdwK9/k+fVXiCUAQsz/wSxWS0O5JM/K?= =?us-ascii?Q?TMoIl0lWfIr8MlqLaEmhq73krzvWZGbrL4OljmBythUQ+PyMbJ37eI5KOVHR?= =?us-ascii?Q?yCEqwU8e8eCUJiAaTpobooMsEyJ5AdTAHjqavhwrsdKY8G03rxr377eb7gws?= =?us-ascii?Q?7cE1BfptJ/oeTWKyOtYInwkfGu3HPnNZRGVYRCJ8OusR6U3tswfI8+kW38Ma?= =?us-ascii?Q?GigipfzNJ0FUWpstxJX3W5JMrpGALPIOdVd0BNCo4ZA5g4N/i6F8OdqbT/Uo?= =?us-ascii?Q?AY1BQymjZyscyydaEIZcYs2liaVjXKZHn9+ffTrAUbnfNHjtAas0Avfb+TNH?= =?us-ascii?Q?ZJnTrITuynrT4RIkSbr00TxpimjkiQDG4G+qClT7v/2qIbc0cM+1SWyAqi1P?= =?us-ascii?Q?/6aaHsNLyJuyWlrmtWwBxVKxJp/T4EtFoXT+Ll/2wU20uYQz8i52ICVB4Zgk?= =?us-ascii?Q?fAtkS3jr4Wnpda3YiSCqBQ/vN5LEyUCbc0Xe4z+pEBJorF4uzWrddXwgxPVA?= =?us-ascii?Q?i66m83w7xl1Sce4xQHAbq3d+bWweSMlBhSXJHKbQaaQdJiAGq2pw/TDs5vEi?= =?us-ascii?Q?vlq4Id9e6xssL8YYA8mocso87uscJl+N8Z1RnzYdkPNR6AwhZb3Vnt44KViT?= =?us-ascii?Q?Nj2xx67mmBkZoyB3S2V9u37/ii2aoy5hhfiy6TWeAUUbloYDywXAptkfemZh?= =?us-ascii?Q?YYVROWa7dkbgb60kKmL3jHwViRs7Eo8g+YRgTgdmp2yRXo06lfazikNfSxDJ?= =?us-ascii?Q?BS+7FB3jfFnBvU8qEnC2F1L5up12g67kA1Dls8qUDJyjWHTxmARmIhs+8TcO?= =?us-ascii?Q?17kZ5KJ7J7ERmSJwwgYehf/SUAfl6e1+3M1DV1+WEtPmzx+Z6VBdr/X7u9+b?= =?us-ascii?Q?PzeKOhqb100OXD9ByYvbNUWCxgv7nTTuUKz4pK+fFfpQtduC1R8ZolNIGll4?= =?us-ascii?Q?edtmFyPAnmt1yPNC1mwfbGN40TLkCKRB/Wf/RvfV3vRUUOTXNqh5z+keEedn?= =?us-ascii?Q?u9ObP5vP?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR12MB1677.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 967e3cde-5aa7-4569-8d8c-08d8c5deca20 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2021 11:53:13.3689 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fozXkuARhkBinh17dj6LZyOvW9biBeEJzmdvCF6m3eawFE/3HbtMntF8C7CBKtmQ55aBEkQSI5ygduvIcEbbxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2555 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612094006; bh=EQtm13O5HBCcuyQBsHLfinK1u/HfA1kX4oBIUx9c1zA=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs:x-header: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: x-ms-exchange-transport-forked:Content-Type: Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=lpQJa+c4L9rJEkmGJsNLLHl+O1Yw0cAiZ+7GJEI5JAEyP655fiZcFy2yTYYe9tAEj IoQMCuHO0c4RONzrTCmiC1geF4u7tmpNcmoEO9uicWzDJz9YL4/ZUe0+6sski5YepE LbIYEJQ0ZFQuc+VvBac91+au7z4swe+1Y8yW5+44eDpX/xquvTGXTdGKxuaEr6KaDs rZ/ScH2drP2zKHvzgeovOchYjNT3gkeEXLPFaCSUDH9rD4p1J4Jfy+xNZ5769OMQaM HoxkTK0nd3Nnmc95IzuKGeahAamaq2uX7ib9KItju6TtJ6nF5CVjj0yYTjJ14AMqpD 5MuRsDX3Jsj5A== Subject: Re: [dpdk-dev] [PATCH 21.05] app/testpmd: count outer IP checksum errors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, > -----Original Message----- > From: dev On Behalf Of Lance Richardson > Sent: Saturday, January 30, 2021 12:36 AM > To: Wenzhuo Lu ; Xiaoyun Li > ; Bernard Iremonger > > Cc: dev@dpdk.org; Ajit Kumar Khaparde ; > Kalesh Anakkur Purayil > Subject: [dpdk-dev] [PATCH 21.05] app/testpmd: count outer IP checksum > errors >=20 > Count and display outer IP checksum errors in the checksum forwarder. >=20 > Example forwarder stats output: > RX-packets: 158 RX-dropped: 0 RX-total: 158 > Bad-ipcsum: 48 Bad-l4csum: 48 Bad-outer-l4csum: = 6 > Bad-outer-ipcsum: 40 > TX-packets: 0 TX-dropped: 0 TX-total: 0 >=20 > Signed-off-by: Lance Richardson > Reviewed-by: Ajit Kumar Khaparde > Reviewed-by: Kalesh Anakkur Purayil anakkur.purayil@broadcom.com> > --- > app/test-pmd/csumonly.c | 5 +++++ > app/test-pmd/testpmd.c | 11 ++++++++++- app/test-pmd/testpmd.h | 2 > ++ > 3 files changed, 17 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index > d813d4fae0..37ed415cee 100644 > --- a/app/test-pmd/csumonly.c > +++ b/app/test-pmd/csumonly.c > @@ -814,6 +814,7 @@ pkt_burst_checksum_forward(struct fwd_stream > *fs) > uint32_t rx_bad_ip_csum; > uint32_t rx_bad_l4_csum; > uint32_t rx_bad_outer_l4_csum; > + uint32_t rx_bad_outer_ip_csum; > struct testpmd_offload_info info; > uint16_t nb_segments =3D 0; > int ret; > @@ -833,6 +834,7 @@ pkt_burst_checksum_forward(struct fwd_stream > *fs) > rx_bad_ip_csum =3D 0; > rx_bad_l4_csum =3D 0; > rx_bad_outer_l4_csum =3D 0; > + rx_bad_outer_ip_csum =3D 0; > gro_enable =3D gro_ports[fs->rx_port].enable; >=20 > txp =3D &ports[fs->tx_port]; > @@ -862,6 +864,8 @@ pkt_burst_checksum_forward(struct fwd_stream > *fs) > rx_bad_l4_csum +=3D 1; > if (rx_ol_flags & PKT_RX_OUTER_L4_CKSUM_BAD) > rx_bad_outer_l4_csum +=3D 1; > + if (rx_ol_flags & PKT_RX_EIP_CKSUM_BAD) > + rx_bad_outer_ip_csum +=3D 1; >=20 > /* step 1: dissect packet, parsing optional vlan, ip4/ip6, vxlan > * and inner headers */ > @@ -1124,6 +1128,7 @@ pkt_burst_checksum_forward(struct fwd_stream > *fs) > fs->rx_bad_ip_csum +=3D rx_bad_ip_csum; > fs->rx_bad_l4_csum +=3D rx_bad_l4_csum; > fs->rx_bad_outer_l4_csum +=3D rx_bad_outer_l4_csum; > + fs->rx_bad_outer_ip_csum +=3D rx_bad_outer_ip_csum; >=20 > inc_tx_burst_stats(fs, nb_tx); > if (unlikely(nb_tx < nb_rx)) { > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > c256e719ae..67f60745a0 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -1805,6 +1805,8 @@ fwd_stream_stats_display(streamid_t stream_id) > " Rx- bad outer L4 checksum: %-14"PRIu64"\n", > fs->rx_bad_ip_csum, fs->rx_bad_l4_csum, > fs->rx_bad_outer_l4_csum); > + printf(" RX- bad outer IP checksum: %-14"PRIu64"\n", > + fs->rx_bad_outer_ip_csum); > } else { > printf("\n"); > } > @@ -1827,6 +1829,7 @@ fwd_stats_display(void) > uint64_t rx_bad_ip_csum; > uint64_t rx_bad_l4_csum; > uint64_t rx_bad_outer_l4_csum; > + uint64_t rx_bad_outer_ip_csum; > } ports_stats[RTE_MAX_ETHPORTS]; > uint64_t total_rx_dropped =3D 0; > uint64_t total_tx_dropped =3D 0; > @@ -1859,6 +1862,8 @@ fwd_stats_display(void) > ports_stats[fs->rx_port].rx_bad_l4_csum +=3D fs- > >rx_bad_l4_csum; > ports_stats[fs->rx_port].rx_bad_outer_l4_csum +=3D > fs->rx_bad_outer_l4_csum; > + ports_stats[fs->rx_port].rx_bad_outer_ip_csum +=3D > + fs->rx_bad_outer_ip_csum; >=20 > if (record_core_cycles) > fwd_cycles +=3D fs->core_cycles; > @@ -1890,13 +1895,16 @@ fwd_stats_display(void) > "RX-total: %-"PRIu64"\n", stats.ipackets, stats.imissed, > stats.ipackets + stats.imissed); >=20 > - if (cur_fwd_eng =3D=3D &csum_fwd_engine) > + if (cur_fwd_eng =3D=3D &csum_fwd_engine) { > printf(" Bad-ipcsum: %-14"PRIu64 > " Bad-l4csum: %-14"PRIu64 > "Bad-outer-l4csum: %-14"PRIu64"\n", > ports_stats[pt_id].rx_bad_ip_csum, > ports_stats[pt_id].rx_bad_l4_csum, > ports_stats[pt_id].rx_bad_outer_l4_csum); > + printf(" Bad-outer-ipcsum: %-14"PRIu64"\n", > + ports_stats[pt_id].rx_bad_outer_ip_csum); > + } > if (stats.ierrors + stats.rx_nombuf > 0) { > printf(" RX-error: %-"PRIu64"\n", stats.ierrors); > printf(" RX-nombufs: %-14"PRIu64"\n", > stats.rx_nombuf); @@ -1974,6 +1982,7 @@ fwd_stats_reset(void) > fs->rx_bad_ip_csum =3D 0; > fs->rx_bad_l4_csum =3D 0; > fs->rx_bad_outer_l4_csum =3D 0; > + fs->rx_bad_outer_ip_csum =3D 0; >=20 > memset(&fs->rx_burst_stats, 0, sizeof(fs->rx_burst_stats)); > memset(&fs->tx_burst_stats, 0, sizeof(fs->tx_burst_stats)); > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index > 5f23162107..a034dae227 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -137,6 +137,8 @@ struct fwd_stream { > uint64_t rx_bad_l4_csum ; /**< received packets has bad l4 > checksum */ > uint64_t rx_bad_outer_l4_csum; > /**< received packets has bad outer l4 checksum */ > + uint64_t rx_bad_outer_ip_csum; > + /**< received packets having bad outer ip checksum */ > unsigned int gro_times; /**< GRO operation times */ > uint64_t core_cycles; /**< used for RX and TX processing */ > struct pkt_burst_stats rx_burst_stats; > -- > 2.25.1 Acked-by: Wisam Jaddo BRs, Wisam Jaddo