From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 2BC73C433E0 for ; Tue, 5 Jan 2021 20:24:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9EF022D5A for ; Tue, 5 Jan 2021 20:24:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731239AbhAEUXz (ORCPT ); Tue, 5 Jan 2021 15:23:55 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:50750 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727403AbhAEUXy (ORCPT ); Tue, 5 Jan 2021 15:23:54 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kwsrI-00GEIt-Rf; Tue, 05 Jan 2021 21:23:12 +0100 Date: Tue, 5 Jan 2021 21:23:12 +0100 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: netdev@vger.kernel.org, davem@davemloft.net, Jakub Kicinski , Sven Auhagen , Matteo Croce , Lorenzo Bianconi Subject: Re: [PATCH net-next] net: mvpp2: increase MTU limit when XDP enabled Message-ID: References: <20210105171921.8022-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210105171921.8022-1-kabel@kernel.org> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > @@ -4913,8 +4914,8 @@ static int mvpp2_xdp_setup(struct mvpp2_port *port, struct netdev_bpf *bpf) > bool running = netif_running(port->dev); > bool reset = !prog != !port->xdp_prog; > > - if (port->dev->mtu > ETH_DATA_LEN) { > - NL_SET_ERR_MSG_MOD(bpf->extack, "XDP is not supported with jumbo frames enabled"); > + if (port->dev->mtu > MVPP2_MAX_RX_BUF_SIZE) { > + NL_SET_ERR_MSG_MOD(bpf->extack, "MTU too large for XDP"); Hi Marek Since MVPP2_MAX_RX_BUF_SIZE is a constant, you can probably do some CPP magic and have it part of the extack message, to give the user a clue what the maximum is. Andrew