[linux-next,0/3] selftests: net: udpgso_bench_rx: Fix verifty, gsosize, and packet number exceptions
Message ID | 202304172017351308785@zte.com.cn |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2103028vqo; Mon, 17 Apr 2023 05:57:52 -0700 (PDT) X-Google-Smtp-Source: AKy350YhFgmMGzS6djOj3me4pqXPzIKFVUl5VTpUS8Iys3knKmHG26K1h+hBHad3+faDsngsrohU X-Received: by 2002:a05:6a00:1821:b0:63c:6485:d5fd with SMTP id y33-20020a056a00182100b0063c6485d5fdmr4649695pfa.2.1681736271900; Mon, 17 Apr 2023 05:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681736271; cv=none; d=google.com; s=arc-20160816; b=mVquS61yaQFb9zx/Rl/d5NdY5/oXGWIU55yjPoXI8g8ocSyzdgMuX3i8rlhELj8vnK YDsvXmLi3eqP3toxLqnPqhLNtovzLXNuz5FBm5LYHjeL26xN9ClENo2LVjQOLep3G8Y7 JxcT9GyxlY7Xz25RG9vjAExYVgkQ9pZfRgrvzRS0kduX0OGrwvjRZbf1a4hFs5ptK2eF jE9Dov9IRrZcK/+ANyARFF2urdNb7fpWsiMdF9AT8TKIKYE48p4g8E9NM1h04kklkjRL 10lq1rRLgVQ0Ddqp2l75Vw6bzRqJZlFkIcx7k5mIIsYtSojHS7NpsQ2Xw1zKgzDBD588 EO8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=xd4tbYCYSacGN1jiJVnPTzM4GSQGEKyi4GOOqVR6EKQ=; b=iD8gCQZcGdzNVycEhwKwCuBOXPn2ZjlqsigcMYHEKc2YlP1ZEh1JMmzECa4nOu3bgY qBQbaFDzLEZfhuJfRaQs6RFB5V7KjdsNpN3vzVG7mAB1q0P9oImtDhyJ0Pjc/Sz2Nmg5 lIJfppHRea8wWt1uzfm6O2vL5/u66xAa3omYj9QKFJcVHRroTRCq4/hmQ+XIPD+8qvoy LXHtO031JBjUowEJs2uacOXdrffsP2/JRczsaGIfsep238SON5Hemjmnd33IqFJNWQ8k U4s/1jQ6oX64EAmVTpF03ROyQEsbTGEzoQFHEj8yF6okDJgSFPXgtVNZzjUyKd2Uz9TW qJDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g20-20020aa796b4000000b0063b8acdf2fbsi3880059pfk.99.2023.04.17.05.57.38; Mon, 17 Apr 2023 05:57:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230453AbjDQMRz (ORCPT <rfc822;leviz.kernel.dev@gmail.com> + 99 others); Mon, 17 Apr 2023 08:17:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230008AbjDQMRw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Apr 2023 08:17:52 -0400 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 822B840C8; Mon, 17 Apr 2023 05:17:41 -0700 (PDT) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4Q0Qzl5NChz8RTWk; Mon, 17 Apr 2023 20:17:39 +0800 (CST) Received: from szxlzmapp03.zte.com.cn ([10.5.231.207]) by mse-fl2.zte.com.cn with SMTP id 33HCHWra054181; Mon, 17 Apr 2023 20:17:32 +0800 (+08) (envelope-from yang.yang29@zte.com.cn) Received: from mapi (szxlzmapp01[null]) by mapi (Zmail) with MAPI id mid14; Mon, 17 Apr 2023 20:17:35 +0800 (CST) Date: Mon, 17 Apr 2023 20:17:35 +0800 (CST) X-Zmail-TransId: 2b03643d38df06a-f65b9 X-Mailer: Zmail v1.0 Message-ID: <202304172017351308785@zte.com.cn> Mime-Version: 1.0 From: <yang.yang29@zte.com.cn> To: <davem@davemloft.net>, <willemdebruijn.kernel@gmail.com>, <edumazet@google.com> Cc: <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <shuah@kernel.org>, <netdev@vger.kernel.org>, <linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?q?=5BPATCH_linux-next_0/3=5D_selftests=3A_net=3A_udpgso=5Fb?= =?utf-8?q?ench=5Frx=3A_Fix_verifty=2C_gsosize=2C_and_packet_number_exceptio?= =?utf-8?q?ns?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl2.zte.com.cn 33HCHWra054181 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 643D38E3.000/4Q0Qzl5NChz8RTWk X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763428293102604809?= X-GMAIL-MSGID: =?utf-8?q?1763428293102604809?= |
Series |
selftests: net: udpgso_bench_rx: Fix verifty, gsosize, and packet number exceptions
|
|
Message
Yang Yang
April 17, 2023, 12:17 p.m. UTC
From: zhang yunkai (CGEL ZTE) <zhang.yunkai@zte.com.cn>
1.Fix verifty exception
Executing the following command fails:
bash# udpgso_bench_tx -l 4 -4 -D "$DST"
bash# udpgso_bench_tx -l 4 -4 -D "$DST" -S 0
bash# udpgso_bench_rx -4 -G -S 1472 -v
udpgso_bench_rx: data[1472]: len 2944, a(97) != q(113)
This is because the sending buffers are not aligned by 26 bytes, and the
GRO is not merged sequentially, and the receiver does not judge this
situation. We think of the receiver to split the data and then validate
it, just as the application actually uses this feature.
2.Fix gsosize exception
Executing the following command fails:
bash# udpgso_bench_tx -l 4 -4 -D "$DST"
bash# udpgso_bench_tx -l 4 -4 -D "$DST" -S 0
bash# udpgso_bench_rx -4 -G -S 1472
udp rx: 15 MB/s 256 calls/s
udp rx: 30 MB/s 512 calls/s
udpgso_bench_rx: recv: bad gso size, got -1, expected 1472
(-1 == no gso cmsg))
IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 7360
IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 1472
IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 1472
IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 4416
IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 11776
IP 192.168.2.199.55238 > 192.168.2.203.8000: UDP, length 20608
recv: got one message len:1472, probably not an error.
recv: got one message len:1472, probably not an error.
This is due to network, NAPI, timer, etc., only one message being received.
We believe that this situation should be normal.
3.Fix packet number exception
bash# udpgso_bench_rx -4 -n 100
bash# udpgso_bench_tx -l 1 -4 -D "$DST"
udpgso_bench_rx: wrong packet number! got 0, expected 100
This is because the packets is cleared after print.
Zhang Yunkai (3):
selftests: net: udpgso_bench_rx: Fix verifty exceptions
selftests: net: udpgso_bench_rx: Fix gsosize exceptions
selftests: net: udpgso_bench_rx: Fix packet number exceptions
tools/testing/selftests/net/udpgso_bench_rx.c | 45 +++++++++++++++++++++------
1 file changed, 35 insertions(+), 10 deletions(-)
--
2.15.2