Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp154701pxb; Fri, 29 Oct 2021 07:29:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8zYfoyQoBAIsbF5ZznM3ZjjBF4Z3SzE23n7AY1S7Qq1Npwt+C8z5+HGHro903ym6nxZ34 X-Received: by 2002:a05:6402:26d3:: with SMTP id x19mr15655498edd.291.1635517799715; Fri, 29 Oct 2021 07:29:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635517799; cv=none; d=google.com; s=arc-20160816; b=MFU7uiniMQQBkVa5adg6aAWXpYBuGZcXfIhbYNv90lWJ6Yz4f2oOAnX+Y96owUjZNS XSEjRVEcrVG8V3KWSmo1TqRvLuqJyf4VRYgJr6Hw8AWCaxlbxBJDn+uCNqiPDm+Ex1HR y62J/3+Ha1aJPOk1SRfYgcdT58/o4S79QT21tx0haZ51TgmESwgt3ga3ld8l8K6xdWWE 5dO2Ul5cgtnKwse6FKVXx77Zgvc+wYNzp/xP5WtlM5oLpyaG7Y2UHM5uPdwoVjq+A7Zt vuQjfHxIsM394usJsjTQjeLYeZBFKStuU94zBf49dSFMUtSLAbUeJXHP/hlk5ndRyqXd JJOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QnWkyN6KGUfNiy5qk93ywFf1HQovAYF4w85+8oNqIOw=; b=xvEZbb2sD7bQIVrZtKSmfMBu86De1n+rVD1oQmpTpKPHKSjFK+gyHyYYoRSyuK4RWM a7SYvsCp0JLxilLfgPQwgMZRzKAYa72XnDsr6261xdzLbyBEGK6jKS/9PHeAHwQwYJJz nLh9V5cWHaH+C/+bOQn7hPN8RVIFQMxfiWspOnUfCnk4hZczcCqeCI9IuDg1GZfot1TV 5v9KN5Q4U0UPL326kX3Bd/A+QqRwz3ahzQ2YRYh8Id0wmDnL4YYh5eJxln7vAabRwmq2 zS7EIjlc9wd2B8oohNpk3mdmgDhr90FkpPa7rrYF0x5Lxl739MIWwW+rFmH2juDKd8to wCnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b="h5pbQNL/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ka26si7780189ejc.280.2021.10.29.07.29.29; Fri, 29 Oct 2021 07:29:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b="h5pbQNL/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231481AbhJ2OaB (ORCPT + 99 others); Fri, 29 Oct 2021 10:30:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:41570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbhJ2OaA (ORCPT ); Fri, 29 Oct 2021 10:30:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B599B61051; Fri, 29 Oct 2021 14:27:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="h5pbQNL/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1635517650; 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: in-reply-to:in-reply-to:references:references; bh=QnWkyN6KGUfNiy5qk93ywFf1HQovAYF4w85+8oNqIOw=; b=h5pbQNL/W0oxByC5nvKmb9PSHqsXw1BVkB3Vy7zcnlpyiayS4KdCQHCK08qaZkRGeHRh35 JperHsXpJ0gcLgexSqp5qMRq9SjEGACqdoeE2kTKivTsvwh5mZ6hZPtTJI2H36ao4oSwuJ b6PcKfJzQcKenUpetv/UoUr1xG23Cko= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id ff5fffe5 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 29 Oct 2021 14:27:29 +0000 (UTC) Received: by mail-yb1-f177.google.com with SMTP id d10so13801696ybe.3; Fri, 29 Oct 2021 07:27:29 -0700 (PDT) X-Gm-Message-State: AOAM53037gVbGVwBbrieaIdW2/N8k9DcfKEsiOBZDVrq/V06KQTDZ4Qp NOt9eOXMUMoHGKj0CFMwyCDZbiaRBOCznRdFOC0= X-Received: by 2002:a25:ba0f:: with SMTP id t15mr12765514ybg.62.1635517648595; Fri, 29 Oct 2021 07:27:28 -0700 (PDT) MIME-Version: 1.0 References: <1635469664-1708957-1-git-send-email-jiasheng@iscas.ac.cn> In-Reply-To: <1635469664-1708957-1-git-send-email-jiasheng@iscas.ac.cn> From: "Jason A. Donenfeld" Date: Fri, 29 Oct 2021 16:27:17 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] wireguard: queueing: Fix implicit type conversion To: jiasheng@iscas.ac.cn Cc: David Miller , Jakub Kicinski , WireGuard mailing list , Netdev , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 29, 2021 at 3:08 AM Jiasheng Jiang wrote: > It is universally accepted that the implicit type conversion is > terrible. I'm not so sure about this, but either way, I think this needs a bit more justification and analysis to merge. cpumask_weight returns an unsigned, for example, and is used as a modulo operand later in the function. It looks like nr_cpumask_bits is also unsigned. And so on. So you're really trading one implicit type conversion package for another. If you're swapping these around, why? It can't be because, "it is universally accepted that the implicit type conversion is terrible," since you're adding more of it in a different form. Is your set of implicit type conversions semantically more proper? If so, please describe that. Alternatively, is there a way to harmonize everything into one type? Is there a minimal set of casts that enables that? Jason