Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2423882rdh; Wed, 27 Sep 2023 02:04:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEh9f69/EjqtrT02cB9OMClNNfikhAwM0v2YF/q6i4pj9+puh+sCjveEwGQqF4364xoA2zo X-Received: by 2002:a05:6a20:9699:b0:14c:628b:4b98 with SMTP id hp25-20020a056a20969900b0014c628b4b98mr1142122pzc.4.1695805453793; Wed, 27 Sep 2023 02:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695805453; cv=none; d=google.com; s=arc-20160816; b=dXYHv1h4DgzVtSrbUImvjTbivj0EanIfhLFurfvwagOIrTrvbpR6NH8c00+N7Nkgxt I27OZFR2BwJcZv5PykJzIviGCCjDIDTdn1dRWg6TUgoSkxtPOS4uoYUrcWe0ziErJwbt FUdPP+vHoIuNsksNugpTrK+pSGAhNi/nfrSUqbd+EP0uo0+fi1x6St0Q7/QBRqtJpi67 7xbb0lOxIuytQTRjK5jPWTjFLEcFlL1PQIioZkWLR9HczNO5t/fwxt4trJdUYWYzgZJc +KxJL3UIGGEkVmukL0n1oHq6IdwhpLpEeoDzBB67wT8dl3vnk0+STGoMF+JZOM2hwV+L lujA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tzmdkgJVacl611f+REy0nRFcZdf1f4FGc4mWf9kNvKg=; fh=JEq7ZyqHwnKMAbPjHbEHIOO1u1YxTWxtQlCbJmwG+xw=; b=KS52sgJazOXbcAnv15zPpGgZ5dDg/rgxMVFdbCMGkhUUgK6NTgpD0il06Txcsc3Rv8 9h1OFWqRRgHFvhHoEnOJq4I0OfUAJyvkmZVLY/4B5Y86FYKVOLUhr/7e33swf7fYTESS CyYVuyQq+Xtv5AVcIHBbNwND73IMPBV3f9KNIQvJA7howrQEHQV1BbvuwQrlUEFBFbLH O+su/5ultXY0WKiTeGNipIfd12Eo+cg5j8ncH8ur6Ma7w7jD8vFe6TB3BV3vFv8kfOrT I7buoYR5+AZvwkNM/dldvSe1UA3nKadvqQJHJ46kbqVHbOEvYZO9Hck6xYpL3OpDtH/H BqeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bOP9XgI+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b8-20020a170902d50800b001bbc0ca8650si16165302plg.370.2023.09.27.02.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 02:04:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bOP9XgI+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F15B180267D2; Wed, 27 Sep 2023 00:38:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230019AbjI0Hio (ORCPT + 99 others); Wed, 27 Sep 2023 03:38:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbjI0Hil (ORCPT ); Wed, 27 Sep 2023 03:38:41 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33467BF for ; Wed, 27 Sep 2023 00:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695800273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tzmdkgJVacl611f+REy0nRFcZdf1f4FGc4mWf9kNvKg=; b=bOP9XgI+m2HXexDHDrJTYYvdPMv1rVsNTTKhX7yYlx7Kg2xORj6wZFR72csW+khcgkmhRQ z0VgKBrm+Kb6vo0hX72rDoUoPFyL+FN1siKDsU1lvFznELZgRddhunHZmla2elWqp47WC4 iRulFBdPpQSJXWEM2xC1LbOLSS+bLro= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-426-7LnBs-UrMqadSqTU288DVQ-1; Wed, 27 Sep 2023 03:37:51 -0400 X-MC-Unique: 7LnBs-UrMqadSqTU288DVQ-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-405629826ccso72896035e9.0 for ; Wed, 27 Sep 2023 00:37:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695800271; x=1696405071; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tzmdkgJVacl611f+REy0nRFcZdf1f4FGc4mWf9kNvKg=; b=IEr6gzI17udo+BrhXhHDpKwvQHsOZ+jQG48d07JgRrKNPkuXkmSN9T5EpYUA9uUf35 IlLEAw7zdplBrwSf1or7zKLhMNRl22bMMDfrupLbhnS7gia0nUu+vlopTep6M/l71MMj dT5e/z1hybcv11PYN9LPCBa0eHJnGL9GnRhqkh9SIr4+CENUSU2+L+nkkN38w/h6zdVQ DVsYT7mgwx9lKEKCYIvmw/qtPA0P4tnDmxvEMb5yYppC51z1o5cFWVwo5xovpccO0e0L wYb/pNuoVCszWi8fywLHmnJe07THSqDAbSAlxDLwTxTgagapL02tBDIdcEnN5QzRcEBx xavg== X-Gm-Message-State: AOJu0Yxen+pnfkouu2mXSWSbXZ0cqVrXaA22+/A+7q9ABRPJay4WMPKL 8wY83p0dNOp92tbTd/knaWqAMxG21oXRxnen+qqmDY3Kd7TGxQosJBsNIyLtLsB3zjLX/316cNG O/FAFjymnZNzwJkZyYdzbYqK8 X-Received: by 2002:a05:600c:214:b0:401:bcb4:f133 with SMTP id 20-20020a05600c021400b00401bcb4f133mr1317737wmi.22.1695800270782; Wed, 27 Sep 2023 00:37:50 -0700 (PDT) X-Received: by 2002:a05:600c:214:b0:401:bcb4:f133 with SMTP id 20-20020a05600c021400b00401bcb4f133mr1317712wmi.22.1695800270393; Wed, 27 Sep 2023 00:37:50 -0700 (PDT) Received: from sgarzare-redhat ([46.222.19.70]) by smtp.gmail.com with ESMTPSA id e9-20020adfe7c9000000b003197efd1e7bsm2530401wrn.114.2023.09.27.00.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 00:37:49 -0700 (PDT) Date: Wed, 27 Sep 2023 09:37:46 +0200 From: Stefano Garzarella To: Arseniy Krasnov Cc: Stefan Hajnoczi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, oxffffaa@gmail.com Subject: Re: [PATCH net-next v1 12/12] test/vsock: io_uring rx/tx tests Message-ID: <46h5yyg62ize2woqu6rp5ebffuhrivo4y7fw3iknicozcaxiz5@ojfvm6qeqzam> References: <20230922052428.4005676-1-avkrasnov@salutedevices.com> <20230922052428.4005676-13-avkrasnov@salutedevices.com> <708be048-862f-76ee-6671-16b54e72e5a8@salutedevices.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <708be048-862f-76ee-6671-16b54e72e5a8@salutedevices.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 00:38:50 -0700 (PDT) On Tue, Sep 26, 2023 at 11:00:19PM +0300, Arseniy Krasnov wrote: > > >On 26.09.2023 16:04, Stefano Garzarella wrote: >> On Fri, Sep 22, 2023 at 08:24:28AM +0300, Arseniy Krasnov wrote: >>> This adds set of tests which use io_uring for rx/tx. This test suite is >>> implemented as separated util like 'vsock_test' and has the same set of >>> input arguments as 'vsock_test'. These tests only cover cases of data >>> transmission (no connect/bind/accept etc). >>> >>> Signed-off-by: Arseniy Krasnov >>> --- >>> Changelog: >>> v5(big patchset) -> v1: >>> ?* Use LDLIBS instead of LDFLAGS. >>> >>> tools/testing/vsock/Makefile?????????? |?? 7 +- >>> tools/testing/vsock/vsock_uring_test.c | 321 +++++++++++++++++++++++++ >>> 2 files changed, 327 insertions(+), 1 deletion(-) >>> create mode 100644 tools/testing/vsock/vsock_uring_test.c >>> >>> diff --git a/tools/testing/vsock/Makefile b/tools/testing/vsock/Makefile >>> index 1a26f60a596c..c84380bfc18d 100644 >>> --- a/tools/testing/vsock/Makefile >>> +++ b/tools/testing/vsock/Makefile >>> @@ -1,12 +1,17 @@ >>> # SPDX-License-Identifier: GPL-2.0-only >>> +ifeq ($(MAKECMDGOALS),vsock_uring_test) >>> +LDLIBS = -luring >>> +endif >>> + >> >> This will fails if for example we call make with more targets, >> e.g. `make vsock_test vsock_uring_test`. >> >> I'd suggest to use something like this: >> >> --- a/tools/testing/vsock/Makefile >> +++ b/tools/testing/vsock/Makefile >> @@ -1,13 +1,11 @@ >> ?# SPDX-License-Identifier: GPL-2.0-only >> -ifeq ($(MAKECMDGOALS),vsock_uring_test) >> -LDLIBS = -luring >> -endif >> - >> ?all: test vsock_perf >> ?test: vsock_test vsock_diag_test >> ?vsock_test: vsock_test.o vsock_test_zerocopy.o timeout.o control.o util.o >> ?vsock_diag_test: vsock_diag_test.o timeout.o control.o util.o >> ?vsock_perf: vsock_perf.o >> + >> +vsock_uring_test: LDLIBS = -luring >> ?vsock_uring_test: control.o util.o vsock_uring_test.o timeout.o >> >> ?CFLAGS += -g -O2 -Werror -Wall -I. -I../../include -I../../../usr/include -Wno-pointer-sign -fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE -D_GNU_SOURCE >> >>> all: test vsock_perf >>> test: vsock_test vsock_diag_test >>> vsock_test: vsock_test.o vsock_test_zerocopy.o timeout.o control.o util.o >>> vsock_diag_test: vsock_diag_test.o timeout.o control.o util.o >>> vsock_perf: vsock_perf.o >>> +vsock_uring_test: control.o util.o vsock_uring_test.o timeout.o >> >> Shoud we add this new test to the "test" target as well? > >Ok, but in this case, this target will always depend on liburing. I think it's fine. If they want to run all the tests, they need liburing. If they don't want to build io_uring tests, they can just do `make vsock_test`. Stefano