Thread (112 messages) 112 messages, 8 authors, 2018-01-21

Re: [PATCH v10 3/5] net: add a helper for making RARP packet

From: Wang, Xiao W <hidden>
Date: 2018-01-16 11:03:30

Hi Olivier,
-----Original Message-----
From: Olivier Matz [mailto:olivier.matz@6wind.com]
Sent: Tuesday, January 16, 2018 6:43 PM
To: Wang, Xiao W <redacted>
Cc: yliu@fridaylinux.org; thomas@monjalon.net; Bie, Tiwei
[off-list ref]; dev@dpdk.org; stephen@networkplumber.org;
maxime.coquelin@redhat.com
Subject: Re: [dpdk-dev] [PATCH v10 3/5] net: add a helper for making RARP
packet

Hi Xiao,

On Tue, Jan 16, 2018 at 09:43:43AM +0000, Wang, Xiao W wrote:
quoted
Hi Olivier,
quoted
You can also use rte_pktmbuf_append() to check for the tailroom and
update data_len/pkt_len:

	m = rte_pktmbuf_alloc();
I just realized that if we let this function to allocate mbuf, it may restrict this api's applicability.
E.g. the caller just has a mbuf, without a mempool.
How do you think?
quoted
quoted
	if (m == NULL)
		return NULL;
	eth_hdr = rte_pktmbuf_append(m, RARP_PKT_SIZE);
When data_len is not enough, we need to rte_pktmbuf_append(m,
RARP_PKT_SIZE - m->data_len);

Sorry, I don't get your point here.
I mean we just need to extend the data_len by "RARP_PKT_SIZE - m->data_len" when the room is not big enough.

BRs,
Xiao
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help