[PATCH v6] net/af_packet: add Rx scatter for jumbo frames
Sriram Yagnaraman
sriram.yagnaraman at ericsson.com
Thu Mar 26 14:01:07 CET 2026
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Wednesday, 25 March 2026 18:32
> To: Sriram Yagnaraman <sriram.yagnaraman at ericsson.com>
> Cc: dev at dpdk.org; xavier.guillaume at ovhcloud.com; Robin Lin L
> <robin.l.lin at ericsson.com>
> Subject: Re: [PATCH v6] net/af_packet: add Rx scatter for jumbo frames
>
> On Tue, 24 Mar 2026 17:29:52 +0100
> Sriram Yagnaraman <sriram.yagnaraman at 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.
>
I agree, will keep in mind for future patches. Thank you for applying my patches.
> Applied to next-net
More information about the dev
mailing list