From patchwork Tue Feb 9 10:32:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Aleksandrov X-Patchwork-Id: 12077715 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91121C433DB for ; Tue, 9 Feb 2021 10:38:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 441E064EA6 for ; Tue, 9 Feb 2021 10:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231905AbhBIKhl (ORCPT ); Tue, 9 Feb 2021 05:37:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231761AbhBIKdq (ORCPT ); Tue, 9 Feb 2021 05:33:46 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93CCFC06178B for ; Tue, 9 Feb 2021 02:33:05 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id g10so22816757eds.2 for ; Tue, 09 Feb 2021 02:33:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TKQ1UQj1xew0STcnsGD6Hcrs1RmaMhBETBwTXfNQszA=; b=vuHO+IlGt+5nd4vhOjPjau19hGJg2pz7v//MpO6rIJy7hHpVub0bGSn+c9+vFYECTZ +mRl3EqNKfuNjJMAuqP8gaThFycUEAYwr1myQlxC9A+83Gih0SUaSvffK+O/Q7W7YVvG 6MlMDENufYHHwhsdHswMbrGqA9dm+KsyMmKirFcxWvsTsP2x9AhS9Y++qrl/yx1aNqoe oVqtN74/EK4kZxFbdmnjPc6GsfUWwtS/SSWagxBPOy+RyLDUAS5goMR+X/HygWMSH8fi cDJGqgO5JWyI9DB65vBfYyxB1xpMM3X5/stsubNOVC0+k8oqzHCtF4rVwmD8mai3FAqq Z6vw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=TKQ1UQj1xew0STcnsGD6Hcrs1RmaMhBETBwTXfNQszA=; b=euqsQbhHgffmgeqEYvSbC7wfJYxtxAEyg/q/yIzlmu6ULu3gY9Oei91tO8QIwEAnRh 7x7snhSKlxsk2u/FSd4YRjvxogPyltStysCdglUu20lxfKTSWebkugin8pa71NuTl3Ui pzsD3N6CiQhZg36Q54kJs0IbOyjvdXpdohjLtIT4s11HS45B5qQcjzYSWv6Ieo40uYlp h1UQYtVw7O3vD245jFGJryIkhdovWt4LsbhR5LLi28GuCdR79q8Sr2CpAZPDVA/+skNU 9K0yIvPIdorP4M6cI3Std2Q3EXjS7JHwhNugNArzDqs7/vgKeYl/+aBa/9tlSlo6VFra GkCg== X-Gm-Message-State: AOAM532h4bAT0aKL6c3dc3ambxx5HglWs7vL/FO7gQhkmi6TUCQpVQs/ eO2Vw1uX70pNNj8RHzqTKIQBxOveYCV7uR2aPfH1SQ== X-Google-Smtp-Source: ABdhPJydvGrflFO6/qYCbXRzHZh43eQ3wYl1cGR1ck8+jpNBmIaUi3aSncnobTm6rNZx9n/cncwlpg== X-Received: by 2002:a05:6402:206f:: with SMTP id bd15mr3929712edb.342.1612866784050; Tue, 09 Feb 2021 02:33:04 -0800 (PST) Received: from debil.vdiclient.nvidia.com (84-238-136-197.ip.btc-net.bg. [84.238.136.197]) by smtp.gmail.com with ESMTPSA id q20sm8486896ejs.17.2021.02.09.02.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 02:33:03 -0800 (PST) From: Nikolay Aleksandrov To: netdev@vger.kernel.org Cc: roopa@nvidia.com, idosch@nvidia.com, andy@greyhouse.net, j.vosburgh@gmail.com, vfalico@gmail.com, kuba@kernel.org, davem@davemloft.net, Nikolay Aleksandrov Subject: [PATCH net-next 1/3] bonding: 3ad: add support for 200G speed Date: Tue, 9 Feb 2021 12:32:07 +0200 Message-Id: <20210209103209.482770-2-razor@blackwall.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210209103209.482770-1-razor@blackwall.org> References: <20210209103209.482770-1-razor@blackwall.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Nikolay Aleksandrov In order to be able to use 3ad mode with 200G devices we need to extend the supported speeds. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Ido Schimmel --- drivers/net/bonding/bond_3ad.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index aa001b16765a..390e877419f3 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -73,6 +73,7 @@ enum ad_link_speed_type { AD_LINK_SPEED_50000MBPS, AD_LINK_SPEED_56000MBPS, AD_LINK_SPEED_100000MBPS, + AD_LINK_SPEED_200000MBPS, }; /* compare MAC addresses */ @@ -245,6 +246,7 @@ static inline int __check_agg_selection_timer(struct port *port) * %AD_LINK_SPEED_50000MBPS * %AD_LINK_SPEED_56000MBPS * %AD_LINK_SPEED_100000MBPS + * %AD_LINK_SPEED_200000MBPS */ static u16 __get_link_speed(struct port *port) { @@ -312,6 +314,10 @@ static u16 __get_link_speed(struct port *port) speed = AD_LINK_SPEED_100000MBPS; break; + case SPEED_200000: + speed = AD_LINK_SPEED_200000MBPS; + break; + default: /* unknown speed value from ethtool. shouldn't happen */ if (slave->speed != SPEED_UNKNOWN) @@ -733,6 +739,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator) case AD_LINK_SPEED_100000MBPS: bandwidth = nports * 100000; break; + case AD_LINK_SPEED_200000MBPS: + bandwidth = nports * 200000; + break; default: bandwidth = 0; /* to silence the compiler */ } From patchwork Tue Feb 9 10:32:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Aleksandrov X-Patchwork-Id: 12077717 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC5F6C43381 for ; Tue, 9 Feb 2021 10:38:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A48264E6F for ; Tue, 9 Feb 2021 10:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231993AbhBIKiI (ORCPT ); Tue, 9 Feb 2021 05:38:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231784AbhBIKdt (ORCPT ); Tue, 9 Feb 2021 05:33:49 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3534C06178C for ; Tue, 9 Feb 2021 02:33:06 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id y8so22788566ede.6 for ; Tue, 09 Feb 2021 02:33:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=I8p1yL8oL+Ytya5lcpHLR75uvtJn3LoCt97HohBn+ks=; b=YI1w/guZWdhG297ZQ4L7uOg6Pe55rowm3b9+hYnWJ3B8mcaLtSXdzQ3Vh46Y8PP7iU 1Y87kncl96eW8097+ZKEFjcpoyVe7evG9cQNYwl4MciyMaaSwog3tpzZ80MaN4wb3Db0 TY21pRV4KaN/4i12MefEk8vLQrhPDueHJL749oO3uRdAwIdRCGcjCF+6Pp672V98/wQa 8BoQFp6msbz3z2yXCBAfapeSuf9rEPVdfs8riG8V7CB9YRbTo/JZKV1d24oLX10zWgX9 XnVjDszsFkhOXXWvsXsYTWMIvrO0/LJuvvILfrBHYFVRpFgEiDBMvo7N6LM0SLF/tWhO sCUQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=I8p1yL8oL+Ytya5lcpHLR75uvtJn3LoCt97HohBn+ks=; b=VPDzvWVTLmAoaU3dRW+TCnOsB9W643VQNtrg85qZeVCvaNVxZjqIXuRr4vKd8AhyK8 2kn8d13VqNKTZfVH1qvDXn/coV0mBCoxV47uxDJbpI5iJUgoy0cI61U8ekSQoq8e/ZuN /hLmGq3CerWzBAqDByKW+Dx9lkEmiV03kqr8u3Q1wz4lv3Sn9vnhts2eMAqV2rkNsor4 SLrzWx42OgmpQ9wXP91K1OJfROh76uypz1iZIeQRmftKY0JDCPvZXXNQYHlA2YTPP7v8 QwGj8Z7TF+56++7XxGseMKpbgN7kmaXgOOHDNEa3HEm2RY5V7IEizuj5nwjHrsejkF1m Iz0g== X-Gm-Message-State: AOAM532Q9Swp3p4+x9JtDrNsBwjhdAC8qd6653Elhc2+KgruMCp6crlS JEvwxVWxtq3bMvXuPRD+UpoqeQl89ok960B0/txzgg== X-Google-Smtp-Source: ABdhPJzJBn61lo/lsFj/+wFwovU10TZghsHxqLpRtQhfiO2KdNLn/9AN9LUm7kze+E3AacZs+6ocHw== X-Received: by 2002:a05:6402:d05:: with SMTP id eb5mr21675130edb.143.1612866785399; Tue, 09 Feb 2021 02:33:05 -0800 (PST) Received: from debil.vdiclient.nvidia.com (84-238-136-197.ip.btc-net.bg. [84.238.136.197]) by smtp.gmail.com with ESMTPSA id q20sm8486896ejs.17.2021.02.09.02.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 02:33:04 -0800 (PST) From: Nikolay Aleksandrov To: netdev@vger.kernel.org Cc: roopa@nvidia.com, idosch@nvidia.com, andy@greyhouse.net, j.vosburgh@gmail.com, vfalico@gmail.com, kuba@kernel.org, davem@davemloft.net, Nikolay Aleksandrov Subject: [PATCH net-next 2/3] bonding: 3ad: add support for 400G speed Date: Tue, 9 Feb 2021 12:32:08 +0200 Message-Id: <20210209103209.482770-3-razor@blackwall.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210209103209.482770-1-razor@blackwall.org> References: <20210209103209.482770-1-razor@blackwall.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Nikolay Aleksandrov In order to be able to use 3ad mode with 400G devices we need to extend the supported speeds. Signed-off-by: Nikolay Aleksandrov Signed-off-by: Ido Schimmel --- drivers/net/bonding/bond_3ad.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 390e877419f3..2e670f68626d 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -74,6 +74,7 @@ enum ad_link_speed_type { AD_LINK_SPEED_56000MBPS, AD_LINK_SPEED_100000MBPS, AD_LINK_SPEED_200000MBPS, + AD_LINK_SPEED_400000MBPS, }; /* compare MAC addresses */ @@ -247,6 +248,7 @@ static inline int __check_agg_selection_timer(struct port *port) * %AD_LINK_SPEED_56000MBPS * %AD_LINK_SPEED_100000MBPS * %AD_LINK_SPEED_200000MBPS + * %AD_LINK_SPEED_400000MBPS */ static u16 __get_link_speed(struct port *port) { @@ -318,6 +320,10 @@ static u16 __get_link_speed(struct port *port) speed = AD_LINK_SPEED_200000MBPS; break; + case SPEED_400000: + speed = AD_LINK_SPEED_400000MBPS; + break; + default: /* unknown speed value from ethtool. shouldn't happen */ if (slave->speed != SPEED_UNKNOWN) @@ -742,6 +748,9 @@ static u32 __get_agg_bandwidth(struct aggregator *aggregator) case AD_LINK_SPEED_200000MBPS: bandwidth = nports * 200000; break; + case AD_LINK_SPEED_400000MBPS: + bandwidth = nports * 400000; + break; default: bandwidth = 0; /* to silence the compiler */ } From patchwork Tue Feb 9 10:32:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Aleksandrov X-Patchwork-Id: 12077719 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 092C8C4332B for ; Tue, 9 Feb 2021 10:38:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9E0964EA6 for ; Tue, 9 Feb 2021 10:38:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232012AbhBIKiP (ORCPT ); Tue, 9 Feb 2021 05:38:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231785AbhBIKdt (ORCPT ); Tue, 9 Feb 2021 05:33:49 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C118C061793 for ; Tue, 9 Feb 2021 02:33:08 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id hs11so30501242ejc.1 for ; Tue, 09 Feb 2021 02:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pU+OX90lxBxSULEfhANKbIE/Stad0bhVCCPB37fq3V8=; b=uOeVlII1joPJGrGM7ioEQvI4TFcu7uvVOunOZY6MZHQkWkF6Au3YhdUcxNrnRD4X1S NznynEhjLxkgnzisVcEc2EXlLsXRPdYFyR4i7H8cpACTdVYxLxpXmuvk60weC2BzmhII 7G4ogf70dvX5DMbEBEJ5F6gVXdHRZPXSdzs5HMNetNZ/yOf/sejlIG5MXJ04qXrK38wU tsuz3uXVYiFfKbqTUFE1+ThCqVHSChnRsdsOSalPB4nWbjRdD2LgDJCJMfR6LyRB23bn 08fLL8GRIdIcCRZ/Bl73I8/gdPif+0/1t63Uuw4fetlReRxTRX3NFFBVvdXqYyaM5jYG HTqA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=pU+OX90lxBxSULEfhANKbIE/Stad0bhVCCPB37fq3V8=; b=UkCJVn89uQPJ+xBDgX3DONgyfnBgFutn7I12pTz7wQ5RsQ1zM184af1JtquAAB28d5 7oR+s33NKnRdDy957zm3hu5d5KaUSNP/cM9NC3SzfGlnSUjblPj/FGzMRpgDdpr3mWXr mQka0nWVuKrBpsC8/1aPhglCwxJYGlymj7Z9w+W6SgrXyfE0ARSHL5xq0XNK2MU+iIfd siUbQSsZvsqShiPIaGQBY7GdAUKOb7pGp655Qc9UGjIf48j4kFheAAAvdYTybjOGnucj T2sSjviTVKyWPxBs5dSIG8QIR0qIIPjANiU8tbYpaWLxM2QVLRESkwNhXmKJZzhyPPZB YYlA== X-Gm-Message-State: AOAM531uClJ/f8Z0ywkWXFtQQSIHZ7zCjalpWq5D38wWHIv38HknUK20 jZeRnRY358d2k7YUy6IFZK1r6f+iLE+JOPoCyziOPQ== X-Google-Smtp-Source: ABdhPJxj32UCAuGucKAdAzpyJRyGa1U1L+vcZZ882Xy+JRW4pT7i729xjX+0bj445/Xj0tYhm0jBIQ== X-Received: by 2002:a17:906:3484:: with SMTP id g4mr21255904ejb.38.1612866786517; Tue, 09 Feb 2021 02:33:06 -0800 (PST) Received: from debil.vdiclient.nvidia.com (84-238-136-197.ip.btc-net.bg. [84.238.136.197]) by smtp.gmail.com with ESMTPSA id q20sm8486896ejs.17.2021.02.09.02.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 02:33:06 -0800 (PST) From: Nikolay Aleksandrov To: netdev@vger.kernel.org Cc: roopa@nvidia.com, idosch@nvidia.com, andy@greyhouse.net, j.vosburgh@gmail.com, vfalico@gmail.com, kuba@kernel.org, davem@davemloft.net Subject: [PATCH net-next 3/3] bonding: 3ad: Use a more verbose warning for unknown speeds Date: Tue, 9 Feb 2021 12:32:09 +0200 Message-Id: <20210209103209.482770-4-razor@blackwall.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210209103209.482770-1-razor@blackwall.org> References: <20210209103209.482770-1-razor@blackwall.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel The bond driver needs to be patched to support new ethtool speeds. Currently it emits a single warning [1] when it encounters an unknown speed. As evident by the two previous patches, this is not explicit enough. Instead, use WARN_ONCE() to get a more verbose warning [2]. [1] bond10: (slave swp1): unknown ethtool speed (200000) for port 1 (set it to 0) [2] bond20: (slave swp2): unknown ethtool speed (400000) for port 1 (set it to 0) WARNING: CPU: 5 PID: 96 at drivers/net/bonding/bond_3ad.c:317 __get_link_speed.isra.0+0x110/0x120 Modules linked in: CPU: 5 PID: 96 Comm: kworker/u16:5 Not tainted 5.11.0-rc6-custom-02818-g69a767ec7302 #3243 Hardware name: Mellanox Technologies Ltd. MSN4700/VMOD0010, BIOS 5.11 01/06/2019 Workqueue: bond20 bond_mii_monitor RIP: 0010:__get_link_speed.isra.0+0x110/0x120 Code: 5b ff ff ff 52 4c 8b 4e 08 44 0f b7 c7 48 c7 c7 18 46 4a b8 48 8b 16 c6 05 d9 76 41 01 01 49 8b 31 89 44 24 04 e8 a2 8a 3f 00 <0f> 0b 8b 44 24 04 59 c3 0 f 1f 84 00 00 00 00 00 48 85 ff 74 3b 53 RSP: 0018:ffffb683c03afde0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff96bd3f2a9a38 RCX: 0000000000000000 RDX: ffff96c06fd67560 RSI: ffff96c06fd57850 RDI: ffff96c06fd57850 RBP: 0000000000000000 R08: ffffffffb8b49888 R09: 0000000000009ffb R10: 00000000ffffe000 R11: 3fffffffffffffff R12: 0000000000000000 R13: ffff96bd3f2a9a38 R14: ffff96bd49c56400 R15: ffff96bd49c564f0 FS: 0000000000000000(0000) GS:ffff96c06fd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f327ad804b0 CR3: 0000000142ad5006 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ad_update_actor_keys+0x36/0xc0 bond_3ad_handle_link_change+0x5d/0xf0 bond_mii_monitor.cold+0x1c2/0x1e8 process_one_work+0x1c9/0x360 worker_thread+0x48/0x3c0 kthread+0x113/0x130 ret_from_fork+0x1f/0x30 Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov --- drivers/net/bonding/bond_3ad.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 2e670f68626d..460dc1bfc7a9 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -326,11 +326,10 @@ static u16 __get_link_speed(struct port *port) default: /* unknown speed value from ethtool. shouldn't happen */ - if (slave->speed != SPEED_UNKNOWN) - pr_warn_once("%s: (slave %s): unknown ethtool speed (%d) for port %d (set it to 0)\n", - slave->bond->dev->name, - slave->dev->name, slave->speed, - port->actor_port_number); + WARN_ONCE(slave->speed != SPEED_UNKNOWN, + "%s: (slave %s): unknown ethtool speed (%d) for port %d (set it to 0)\n", + slave->bond->dev->name, slave->dev->name, + slave->speed, port->actor_port_number); speed = 0; break; }