Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp867346rwi; Wed, 19 Oct 2022 04:05:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4NSV289/C47YAO3TL07vr7E68OYeOK9BjonlwsZ6vKSzVtpPsrBG+x3KsqdPi2YgC/ZtjL X-Received: by 2002:a17:907:6d27:b0:78d:46f6:c59e with SMTP id sa39-20020a1709076d2700b0078d46f6c59emr6302654ejc.30.1666177554226; Wed, 19 Oct 2022 04:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666177554; cv=none; d=google.com; s=arc-20160816; b=g0aPWZpI7+MuIr+VGApLeynWmcj86GWrYvsxVrDBiIxeBcLVcOX9jXPv4WzFbVM+PS tDQ4EJDf98oDW+oIL1K26nSbfeidVdUFvLx87Huscr5Flk3VTK9iPxQa31FvfTCmD7eJ OS/RCcEWUQ+RoMakuxzmL1zWaUdrC+xJu6lIPTNcrRhmTQ1dr9jGQRSmc3x8tninu1Ut GD2mDbmQC7UDp3MKU+Lbefh4Lat52ZMRUgLCQry1s1D+gY/djYIbbyG9JtOilf9LRPML e4jNdoyHZhonM1gWsbJL0xbgOKPhGBPuFU4XrtoUKyVrj4apba/Mzz0xq5AbOUYsdlRi Q1JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ny7L45gsfPKqOFxhhQ5alArxfjqCEGDduEhQYR3+BvI=; b=htwwOakjXHu/8L03NAqGV+0U0j/nt/HAtG1PULo3YtPrvjNRzXbq7PpnYLvjkVozgV pW/vYSFO8Cv4Q27TIn/aPAHXBNmhvi4PQgOc62DokHQL2vR6yQLA7xllgGOwdElaRBL7 CSW3i98Gf7viHxJwWIQUK52pP7FnPBPWcqP89xSRSxKGPzifi87nnNwfYy7w8hrlyGBG sP4t+wskbk2C5KkuA/55iFslnOKYbPH2qaxRnJkIuAYIPrypgwpmMaxGkYp7gBy08vup 9ihAFTxyiZ/RY5pud7vuZpO/Gacd5Puktq9EbRvJaDQAjJwe3V6kFp38dNfBsIR5YiuZ eang== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cunZMp4m; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wv2-20020a170907080200b0073146b3f95asi14643306ejb.632.2022.10.19.04.05.17; Wed, 19 Oct 2022 04:05:54 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cunZMp4m; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232535AbiJSKpB (ORCPT + 99 others); Wed, 19 Oct 2022 06:45:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232402AbiJSKnU (ORCPT ); Wed, 19 Oct 2022 06:43:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 943254330F; Wed, 19 Oct 2022 03:20:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0F511B824E7; Wed, 19 Oct 2022 09:15:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82A64C433C1; Wed, 19 Oct 2022 09:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170934; bh=f0d2g5W7whvr5O2/g5p6rp6VsVXxSHcsF+rMJ5dvsOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cunZMp4moJzdOEhcLbQiik2csL5VAD4dyejkOgK6/jSRpDrKLDATwKZSB5Uluz4Ap c3ALfW9izGGH9c+SAKUHu6dhurb3cX8fAgleCJTM5+a/cj1mZNBzhSt/IjKc1e+K4b b7GtM2owh9X+el5bTgfOSJiTxwZkD1Uif7psLj/4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Pavel Begunkov , Jens Axboe Subject: [PATCH 6.0 842/862] io_uring/net: refactor io_sr_msg types Date: Wed, 19 Oct 2022 10:35:29 +0200 Message-Id: <20221019083327.098536439@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: Pavel Begunkov [ upstream commit 0b048557db761d287777360a100e1d010760d209 ] In preparation for using struct io_sr_msg for zerocopy sends, clean up types. First, flags can be u16 as it's provided by the userspace in u16 ioprio, as well as addr_len. This saves us 4 bytes. Also use unsigned for size and done_io, both are as well limited to u32. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/42c2639d6385b8b2181342d2af3a42d3b1c5bcd2.1662639236.git.asml.silence@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- io_uring/net.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- a/io_uring/net.c +++ b/io_uring/net.c @@ -56,21 +56,21 @@ struct io_sr_msg { struct user_msghdr __user *umsg; void __user *buf; }; + unsigned len; + unsigned done_io; unsigned msg_flags; - unsigned flags; - size_t len; - size_t done_io; + u16 flags; }; struct io_sendzc { struct file *file; void __user *buf; - size_t len; + unsigned len; + unsigned done_io; unsigned msg_flags; - unsigned flags; - unsigned addr_len; + u16 flags; + u16 addr_len; void __user *addr; - size_t done_io; struct io_kiocb *notif; };