From: Lorenzo Bianconi <lorenzo@kernel.org>
To: claudiu.manoil@nxp.com
Cc: netdev@vger.kernel.org, lorenzo.bianconi@redhat.com
Subject: non-linear xdp fix for enetc driver
Date: Thu, 1 Dec 2022 22:34:17 +0100 [thread overview]
Message-ID: <Y4kd2f0563PVof5O@lore-desk> (raw)
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
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++;
}
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
reply other threads:[~2022-12-01 21:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y4kd2f0563PVof5O@lore-desk \
--to=lorenzo@kernel.org \
--cc=claudiu.manoil@nxp.com \
--cc=lorenzo.bianconi@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.