Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2320801ybl; Thu, 30 Jan 2020 15:28:01 -0800 (PST) X-Google-Smtp-Source: APXvYqxO48rDahA/K590I7tVKkmD/AM63JLcyrk79jEHerI6+z1BEubqK4SCJtrIh8oon+AWX0my X-Received: by 2002:a9d:60c4:: with SMTP id b4mr5706536otk.166.1580426881772; Thu, 30 Jan 2020 15:28:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580426881; cv=none; d=google.com; s=arc-20160816; b=fZKPx4r8YBV2vzEIKBFH6OSZGN1QEx4/qEu1Bgo3hfpG5oyk8RbUKlFfplF/HJK40h C/+5XlYl7vuCfkscVQ/ePsf9YpaVOdqnFPy/FBJj5md7aWtIm0vGmQ3Lf9N3DJGpESlu Wl6Jj+isvxm3P7iyWYo7kG4v1polVKuR1RwLE0qlE1LfxOUSEAMRa9WOtE02qphLz4Wl yZoSeGRxwE4kDLtvCvopHiw9ZwJe60Zyw1nD8APDbVJl+AfyQst0FOtURcYWCy1A8owk MFTvl+uz3Q0RgrfXUX1du+NYdqgtHal728nFI0IOknwxi5uDbbLq0BBb9QDujzlhBEBE 1psw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uiPnoOAYPt0TxpEOOk3xyCGG2sxkTQwY14DXYCt3mdw=; b=SeXYPL6cR8C/iMWIYO+SRgXwoYcTDBLatidf7WKmqURMW+SiYkiLw1hw89UCO7tdBa PgSpsn8k4mC3PMBadW0tnowd9D8dhglLNL28/W66m/9tt4Kh0I2ICeu5s/oKoBEYEayV 4blFXFyjRD6m4QYmtenMxi3R4HJE5VJgYIqZEmrhLxL/m10wZN+q9AFLfzijFwnQzd9u +ss5P93ukJ651GFfiMF6roFPpNZl07BrydzqKyV8y3ZjvcQXQ+gm94RsjoeqCm99GBtP Fw6IcFGXA92lyMe2tLNwJFOeTbpEw6qzddZJs+14D/rWRL7egJzXsYF2LZs9IsIoBENL 3kIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="XlIy0Vu/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si1683195oti.104.2020.01.30.15.27.47; Thu, 30 Jan 2020 15:28:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="XlIy0Vu/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727585AbgA3X0x (ORCPT + 99 others); Thu, 30 Jan 2020 18:26:53 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:32777 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbgA3X0w (ORCPT ); Thu, 30 Jan 2020 18:26:52 -0500 Received: by mail-ot1-f66.google.com with SMTP id b18so4884079otp.0; Thu, 30 Jan 2020 15:26:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uiPnoOAYPt0TxpEOOk3xyCGG2sxkTQwY14DXYCt3mdw=; b=XlIy0Vu/CiLZtlGrJG2TgfCjV1o+mfeLuhhL+eMsuwQxVRfyGWn+5TE9WRAB4Xq+CF wGj16HUb/YW4TQ3G2cAAZ0iEWD7t54L7fE3whumbk2FAgell+92Lotp877b8/JAOuOPp QBQiS16J6/ZGaWHMo9kt7WXTAycbonDuW6OXrQzJ6/6ChsS4XZTf9XgItWbI8Xkdh4J4 0m7pwpRRZGmlqdrZ8wWQBvQ5kVJTcPF1fcELzWSTp5qnf/V0ZiLhKy+UCPm6yDRHbQGU xWcxLSfWzDJE3eiri6UV/6UMv+kErLMRGv+Z6RQM0VxEjsNy+vh2zjfxLxFQIu/5aNgy YBOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uiPnoOAYPt0TxpEOOk3xyCGG2sxkTQwY14DXYCt3mdw=; b=BTqAKwLlcU6MwTnsliYJ0kZVlx+jUVniLT0zBTHvLuEuEaR6izDt3UrUo5E9yvAj5u 7VJtJiz9fr+3z9iCe2bR/755LSDFeKVRE6ii5BteZuP/jkbyNldQhRcW7kzT/ip4oZG2 FDynvi77bo2tBD4u+xNcppSchyeOnylcArT3M2MoGAH6yUey7dvsG2VZJPsWEGUStRXj UfyZftFmnEJLgfzpsaxaeX6+hy2/gKmFhJQhXMo520EAjEtAYPcsfJpgEyobsx9K35Cn LH6AGeBbBOdtTPm24KpcEHYYWaLUdSaWeVGjcz6dXnUA/lRVCaZyKxrCgiidJ71kmz9t 6Rpg== X-Gm-Message-State: APjAAAWYkdLVa8/iOdeecK02SZx/4omsUuTLqQWE/rhdrx7CdGzdRsa+ dxix4c+r+Qw8p/6/CzqSi4R2AXdM X-Received: by 2002:a9d:6505:: with SMTP id i5mr5181796otl.121.1580426811624; Thu, 30 Jan 2020 15:26:51 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id 96sm2294473otn.29.2020.01.30.15.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jan 2020 15:26:51 -0800 (PST) From: Nathan Chancellor To: Jiri Pirko , Ido Schimmel , "David S. Miller" Cc: Petr Machata , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH] mlxsw: spectrum_qdisc: Fix 64-bit division error in mlxsw_sp_qdisc_tbf_rate_kbps Date: Thu, 30 Jan 2020 16:26:41 -0700 Message-Id: <20200130232641.51095-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building arm32 allmodconfig: ERROR: "__aeabi_uldivmod" [drivers/net/ethernet/mellanox/mlxsw/mlxsw_spectrum.ko] undefined! rate_bytes_ps has type u64, we need to use a 64-bit division helper to avoid a build error. Fixes: a44f58c41bfb ("mlxsw: spectrum_qdisc: Support offloading of TBF Qdisc") Signed-off-by: Nathan Chancellor --- drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c index 79a2801d59f6..65e681ef01e8 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c @@ -614,7 +614,7 @@ mlxsw_sp_qdisc_tbf_rate_kbps(struct tc_tbf_qopt_offload_replace_params *p) /* TBF interface is in bytes/s, whereas Spectrum ASIC is configured in * Kbits/s. */ - return p->rate.rate_bytes_ps / 1000 * 8; + return div_u64(p->rate.rate_bytes_ps, 1000 * 8); } static int -- 2.25.0