From patchwork Sun Jun 25 08:56:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhenwei pi X-Patchwork-Id: 1799487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=bytedance.com header.i=@bytedance.com header.a=rsa-sha256 header.s=google header.b=az3G1pdC; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QplHc4WH6z20ZF for ; Sun, 25 Jun 2023 18:58:04 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDLYG-0003N1-Gf; Sun, 25 Jun 2023 04:56:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDLYE-0003MA-4l for qemu-devel@nongnu.org; Sun, 25 Jun 2023 04:56:54 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDLYC-0006q7-41 for qemu-devel@nongnu.org; Sun, 25 Jun 2023 04:56:53 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1b7f9d66812so2861925ad.0 for ; Sun, 25 Jun 2023 01:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1687683410; x=1690275410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=24YPfNosfleJuKPVRsv8yL1kyd9gmL1uJRfLV02ZmCM=; b=az3G1pdCNlYzaXB38/o4SQhNKBO1RpADI6rY60RwoMNYpP/4AOYyolO7zoAE/xzxeh KfdpLKnUi3aiQ9KFSqJSzuMINtXSYFEiHnXpLTCAicdoj1NCg+HRWuaNfvJf/UmG64i4 mBCgCTeIgSf9VIL/Md2bEX05f7oc4nYEkTSd7v9uMQubQ9Y9t3QSO8N1hdRD26IheeXM DsmeSazKBsph6ReHd8irp01ateraCVWMY+WTvGaT28PrnaIPIKa7S/toeBjZ+N/hCBxE fRPrWL9YsOFVXwo/tgdmaqWV/cN7xf0P75NmfcKto0BDOhYN2DYsawiXAcWisGs+bEey kVmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687683410; x=1690275410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=24YPfNosfleJuKPVRsv8yL1kyd9gmL1uJRfLV02ZmCM=; b=fapGWg1oHuvTaq/VOW1juWusivZjm2VRqEI4TNQZcYMgl3jPwYU79cDNvVU+TzLr8b 9AL5zXyBhTf4EUGCLvVQ5kLawS/Vwap/kezv5csR4YmdwDu9XK9p/Fvw0Go2g+3fgRJa wP2t4BZVRinHrZLtWy1dQz/RjSbHQFAwcGvbm/ApWRqqLVZ4aNz5AJ3B2liM/zStKTye ldTgJ7naBF29ybJuQaawZtU9/WxltwAA+oimvA7b2Mh+Ty7f4jf80upq2QJGLzRFGYW3 e+9+0rZ8OzIrpbbmrvxc/AifSK0z4Vnxy0NI3TBL7gqfU5BqFTixiZVPMxX53B4IPYaN kzjw== X-Gm-Message-State: AC+VfDxBKM6mYpO2Jkx/PaH3WxHbnV/qad/9sRvGqR+vDlzMm3udvlYT UNcQDmKafyzDVVgtJf/7BEOzCA== X-Google-Smtp-Source: ACHHUZ4c2n8JGRo9YUxVXN3Fxs5Hn1VwnQn+vUcv+fB7KtWB1AYo5Hwq21TTclSTh1HyXJGxsGvSRg== X-Received: by 2002:a17:902:b497:b0:1b7:f73d:524 with SMTP id y23-20020a170902b49700b001b7f73d0524mr1257026plr.43.1687683410389; Sun, 25 Jun 2023 01:56:50 -0700 (PDT) Received: from libai.bytedance.net ([61.213.176.11]) by smtp.gmail.com with ESMTPSA id w9-20020a170902e88900b001b1f991a4d0sm2176308plg.108.2023.06.25.01.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jun 2023 01:56:50 -0700 (PDT) From: zhenwei pi To: berto@igalia.com Cc: arei.gonglei@huawei.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, berrange@redhat.com, zhenwei pi Subject: [PATCH 5/5] cryptodev: use NULL throttle timer cb for read direction Date: Sun, 25 Jun 2023 16:56:31 +0800 Message-Id: <20230625085631.372238-6-pizhenwei@bytedance.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230625085631.372238-1-pizhenwei@bytedance.com> References: <20230625085631.372238-1-pizhenwei@bytedance.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=pizhenwei@bytedance.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Operations on a crytpodev are considered as *write* only, the callback of read direction is never invoked. Use NULL instead of an unreachable path(cryptodev_backend_throttle_timer_cb on read direction). Signed-off-by: zhenwei pi Reviewed-by: Alberto Garcia --- backends/cryptodev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/cryptodev.c b/backends/cryptodev.c index 94ca393cee..19c24ccfad 100644 --- a/backends/cryptodev.c +++ b/backends/cryptodev.c @@ -331,8 +331,7 @@ static void cryptodev_backend_set_throttle(CryptoDevBackend *backend, int field, if (!enabled) { throttle_init(&backend->ts); throttle_timers_init(&backend->tt, qemu_get_aio_context(), - QEMU_CLOCK_REALTIME, - cryptodev_backend_throttle_timer_cb, /* FIXME */ + QEMU_CLOCK_REALTIME, NULL, cryptodev_backend_throttle_timer_cb, backend); }