From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f51.google.com ([209.85.160.51]:40814 "EHLO mail-pl0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbeCHSQs (ORCPT ); Thu, 8 Mar 2018 13:16:48 -0500 Received: by mail-pl0-f51.google.com with SMTP id i6-v6so3754849plt.7 for ; Thu, 08 Mar 2018 10:16:48 -0800 (PST) Subject: Re: [PATCH V2 iproute2-next] ip-address: Fix negative prints of large TX rate limits To: Tariq Toukan , Stephen Hemminger Cc: netdev@vger.kernel.org References: <1520525306-26614-1-git-send-email-tariqt@mellanox.com> From: David Ahern Message-ID: <8596d95b-cbdf-0c1a-d421-eb2630b829dc@gmail.com> Date: Thu, 8 Mar 2018 11:16:46 -0700 MIME-Version: 1.0 In-Reply-To: <1520525306-26614-1-git-send-email-tariqt@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 3/8/18 9:08 AM, Tariq Toukan wrote: > TX rate limit fields are unsigned (__u32). > Use %u and print_uint when printing. > > Tested: > $ ip link set ens1 vf 1 rate 2294967296 > $ ip link show |grep -iE "vf 1" | grep rate > > before: > vf 1 MAC 00:00:00:00:00:00, tx rate -2000000000 (Mbps), max_tx_rate -2000000000Mbps, ... > > after: > vf 1 MAC 00:00:00:00:00:00, tx rate 2294967296 (Mbps), max_tx_rate 2294967296Mbps, ... > > Fixes: 3fd86630876a ("iproute2: rework SR-IOV VF support") > Fixes: 8c29ae7cc249 ("ip link: Fix crash on older kernels when show VF dev") > Fixes: f89a2a05ffa9 ("Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool") > Fixes: ae7229d5f99e ("ip: Add support for setting and showing SR-IOV virtual funtion link params") > Fixes: d0e720111aad ("ip: ipaddress.c: add support for json output") > Signed-off-by: Tariq Toukan > --- > > v1 -> v2: > Fixed JSON output (print_uint) as well. > Updated commit message. > change looks fine to me. As a bug fix seems like this should go to iproute2-master not -next.