Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp441965iog; Mon, 13 Jun 2022 06:05:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgz7CULwBS7KmZAiUP20uWWgwgZKWnBBjL2byIUBm+wQJ5rWg/9CLjpU88W8qeOxIjF8SC X-Received: by 2002:a17:907:ea7:b0:70f:a27a:dac0 with SMTP id ho39-20020a1709070ea700b0070fa27adac0mr45688603ejc.25.1655125444240; Mon, 13 Jun 2022 06:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125444; cv=none; d=google.com; s=arc-20160816; b=HvRsZ1KN36GqIaFohIdrQd68ls3pCsLiEh4P4GcEZaCq/VG7G0LdPu57xPIfPgRuwK xIxxK2A3F68CoGBqWKGYJA+RhAV41ysQH8yAk9eQ50n6MalrwrSIF83M/22f54DmaJ6g lFO7NEh2C/j3yttOa+4IN5BEOd8LrCIZBF5CzWzveiJcJRxxP7Oh/I4OE6ZpbLgYoqt7 TpZZhxxV5MOiCqNlIjyi6s9b2QaXncfyfo5Fpm/sLBWG1NtFQcW0Os7ojGFc5Kz9/WL1 FT3OYcOv4/detyFySog6c456FhV4HqTj2jVgP8pj20aS6F7J4amzlV3FNPf+irzE893I BWrQ== 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=WkWqyRbwCY4k5I7LohdE/Zbz4dOkbVV2F/i7lrlmM5E=; b=p6eC6gPNTvm0v+MY8cU13k1pdMvdoPfmoujuhbPcRMhbtwW+h6Xj/KxgnGezrGtP7p 69/cmxLwL/hzA/N++oXersoYRdnBYey4aiY33t0Ch6cTjYNrLsTvy8M2dlMzzLUP0Mqv neTI1Jh9jCcFfMKiXuhoGRNQIAapTnV9fl4YJa7MnRwl1eYZ4WTgZJekfRwNE6Lb755p GKTAo1iNjSkkjqji1ajlF/p53lk0TVvYQYu/AcuiiqMfmdflQxByz3e3zQUIeYLWVGxo uXlWZTjqzZHmsjP+cc4gSdlIHqJIZGBuQr1bAlo56gb4u7zq1w8EeeJsXFj4NTEl7OcK yrkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hqz5DN0c; 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 y10-20020a056402440a00b0042aed1df374si7011820eda.308.2022.06.13.06.03.37; Mon, 13 Jun 2022 06:04:04 -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=Hqz5DN0c; 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 S1355768AbiFMLlO (ORCPT + 99 others); Mon, 13 Jun 2022 07:41:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354487AbiFMLcw (ORCPT ); Mon, 13 Jun 2022 07:32:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9738FDF73; Mon, 13 Jun 2022 03:47:24 -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 dfw.source.kernel.org (Postfix) with ESMTPS id C0BB26125C; Mon, 13 Jun 2022 10:47:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C77C9C34114; Mon, 13 Jun 2022 10:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655117243; bh=p9LAIdd8z0hn26BqqnEUtXo7j+0h6wN8DowSzt00xtg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hqz5DN0c0JmFCbzfMX/AIXHDbx94DTGxvTf6zOV3bgqm1r6zwoGgyLOKo64SPYgu/ c9u+wKkj5mEqZL45DTz/4ToMuypJKtTWIKWdT0NSWsMhTL5GvzylyI/uana2QFIMCY w4NdgPS9rmEgDsGBuqFA2RjZvwei0WuWsT6Olg5w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maxim Mikityanskiy , Tariq Toukan , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.4 331/411] net/mlx5e: Update netdev features after changing XDP state Date: Mon, 13 Jun 2022 12:10:04 +0200 Message-Id: <20220613094938.650118465@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 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,T_SCC_BODY_TEXT_LINE 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: Maxim Mikityanskiy [ Upstream commit f6279f113ad593971999c877eb69dc3d36a75894 ] Some features (LRO, HW GRO) conflict with XDP. If there is an attempt to enable such features while XDP is active, they will be set to `off [requested on]`. In order to activate these features after XDP is turned off, the driver needs to call netdev_update_features(). This commit adds this missing call after XDP state changes. Fixes: cf6e34c8c22f ("net/mlx5e: Properly block LRO when XDP is enabled") Fixes: b0617e7b3500 ("net/mlx5e: Properly block HW GRO when XDP is enabled") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 73291051808f..35630b538c82 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4638,6 +4638,11 @@ static int mlx5e_xdp_set(struct net_device *netdev, struct bpf_prog *prog) unlock: mutex_unlock(&priv->state_lock); + + /* Need to fix some features. */ + if (!err) + netdev_update_features(netdev); + return err; } -- 2.35.1