All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>
Cc: <dev@dpdk.org>, <xavier.guillaume@ovhcloud.com>,
	<robin.l.lin@ericsson.com>
Subject: Re: [PATCH v6] net/af_packet: add Rx scatter for jumbo frames
Date: Wed, 25 Mar 2026 10:31:56 -0700	[thread overview]
Message-ID: <20260325103156.1742d922@phoenix.local> (raw)
In-Reply-To: <20260324162952.2827453-1-sriram.yagnaraman@ericsson.com>

On Tue, 24 Mar 2026 17:29:52 +0100
Sriram Yagnaraman <sriram.yagnaraman@ericsson.com> wrote:

> +/*
> + * Copy packet data into chained mbufs when it exceeds single mbuf tailroom.
> + * Returns 0 on success, -1 on mbuf allocation failure.
> + */
> +static int
> +eth_af_packet_rx_scatter(struct rte_mempool *mb_pool, struct rte_mbuf *mbuf,
> +		const uint8_t *data, uint32_t data_len)
> +{
> +	uint16_t len = rte_pktmbuf_tailroom(mbuf);
> +	struct rte_mbuf *m = mbuf;
> +
> +	memcpy(rte_pktmbuf_mtod(mbuf, void *), data, len);
> +	rte_pktmbuf_data_len(mbuf) = len;

Very minor personal preference here. I prefer avoiding using
rte_pktmbuf_data_len() and rte_pktmbuf_pkt_len() since they are
really macros and the use of data_len and pkt_len directly is clearer
in code that is manipulating other mbuf fields.

Applied to next-net

  reply	other threads:[~2026-03-25 18:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12  7:34 [PATCH v3] net/af_packet: add multi-segment mbuf support for jumbo frames Sriram Yagnaraman
2026-03-12 16:06 ` Stephen Hemminger
2026-03-12 16:34 ` Stephen Hemminger
2026-03-13  9:10 ` [PATCH v4] " Sriram Yagnaraman
2026-03-18  9:47   ` [PATCH v5] " Sriram Yagnaraman
2026-03-23 23:42     ` Stephen Hemminger
2026-03-24 16:29     ` [PATCH v6] net/af_packet: add Rx scatter " Sriram Yagnaraman
2026-03-25 17:31       ` Stephen Hemminger [this message]
2026-03-26 13:01         ` Sriram Yagnaraman

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=20260325103156.1742d922@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=robin.l.lin@ericsson.com \
    --cc=sriram.yagnaraman@ericsson.com \
    --cc=xavier.guillaume@ovhcloud.com \
    /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.