From patchwork Thu Dec 1 21:34:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 13061814 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E855CC47089 for ; Thu, 1 Dec 2022 21:34:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231165AbiLAVe1 (ORCPT ); Thu, 1 Dec 2022 16:34:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbiLAVeZ (ORCPT ); Thu, 1 Dec 2022 16:34:25 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E6BAC3591 for ; Thu, 1 Dec 2022 13:34:24 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 23D31B82037 for ; Thu, 1 Dec 2022 21:34:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73710C433C1; Thu, 1 Dec 2022 21:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669930461; bh=WSxq0VVXBR36KvHqkgdZDoUaRmpg0ZDZ/oFsMEnQxIU=; h=Date:From:To:Cc:Subject:From; b=CoZzjVcCPM+rOx0J2mgxjBoPtV/9Djio2jC9CzCAGaUf7+RzlpyJD3lUgtYwAgKpr AR1oOU1wH1Mesx/UgeslaUZ3DqDwLn0byOJsQZF87L2y7tchuubwTN1Ux6cEOeIUEi 0eP5FkuXBF/VhkGDHpDDRWWdJDvzHQuOlYxq+QlqHB0BIAucJfIof/j3vA8n8/KPji E1W7OSYxUVmQsQW0V/SP6B6VUN46DPy3iEc+hNZL158qmpSu9wP36O2BDEsOP/R5nE ztPuB8anac8jRtZiB3+I8UJ5MZM09EfwDAys80K1jzWmqpBxVaxFx/VyfbT/i8PiMV VeFWkCZl+JgmQ== Date: Thu, 1 Dec 2022 22:34:17 +0100 From: Lorenzo Bianconi To: claudiu.manoil@nxp.com Cc: netdev@vger.kernel.org, lorenzo.bianconi@redhat.com Subject: non-linear xdp fix for enetc driver Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Claudiu, I am not very familiar with enetc driver codebase but I guess we are missing to set frag bit in xdp_buff flag whenever the driver receives a non linear packet in xdp mode (frag bit is needed by xdp stack). Can you please check the patch below? (if it is ok I will post a formal fix). Regards, Lorenzo diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c index 8671591cb750..9ddd6c1c6e0e 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -1416,6 +1416,7 @@ static void enetc_add_rx_buff_to_xdp(struct enetc_bdr *rx_ring, int i, skb_frag_size_set(frag, size); __skb_frag_set_page(frag, rx_swbd->page); + xdp_buff_set_frags_flag(xdp_buff); shinfo->nr_frags++; }