* [dpdk-stable] [PATCH] mbuf: fix debug checks for headroom and tailroom
@ 2017-06-28 12:25 Vasily Philipov
2017-06-30 14:27 ` Olivier Matz
0 siblings, 1 reply; 3+ messages in thread
From: Vasily Philipov @ 2017-06-28 12:25 UTC (permalink / raw)
To: olivier.matz; +Cc: Vasily Philipov, dev, stable
rte_pktmbuf_headroom() and rte_pktmbuf_tailroom() should be usable
with any segment, not only with headered ones, so is_header should be 0
when we call for sanity check inside them.
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
---
lib/librte_mbuf/rte_mbuf.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index fe605c7..fbe8203 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1452,7 +1452,7 @@ static inline void rte_pktmbuf_refcnt_update(struct rte_mbuf *m, int16_t v)
*/
static inline uint16_t rte_pktmbuf_headroom(const struct rte_mbuf *m)
{
- __rte_mbuf_sanity_check(m, 1);
+ __rte_mbuf_sanity_check(m, 0);
return m->data_off;
}
@@ -1466,7 +1466,7 @@ static inline uint16_t rte_pktmbuf_headroom(const struct rte_mbuf *m)
*/
static inline uint16_t rte_pktmbuf_tailroom(const struct rte_mbuf *m)
{
- __rte_mbuf_sanity_check(m, 1);
+ __rte_mbuf_sanity_check(m, 0);
return (uint16_t)(m->buf_len - rte_pktmbuf_headroom(m) -
m->data_len);
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH] mbuf: fix debug checks for headroom and tailroom
2017-06-28 12:25 [dpdk-stable] [PATCH] mbuf: fix debug checks for headroom and tailroom Vasily Philipov
@ 2017-06-30 14:27 ` Olivier Matz
2017-07-01 10:18 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Olivier Matz @ 2017-06-30 14:27 UTC (permalink / raw)
To: Vasily Philipov; +Cc: dev, stable
On Wed, 28 Jun 2017 15:25:12 +0300, Vasily Philipov <vasilyf@mellanox.com> wrote:
> rte_pktmbuf_headroom() and rte_pktmbuf_tailroom() should be usable
> with any segment, not only with headered ones, so is_header should be 0
> when we call for sanity check inside them.
>
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
>
> Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] mbuf: fix debug checks for headroom and tailroom
2017-06-30 14:27 ` Olivier Matz
@ 2017-07-01 10:18 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-07-01 10:18 UTC (permalink / raw)
To: Olivier Matz; +Cc: dev, Vasily Philipov, stable
30/06/2017 16:27, Olivier Matz:
> On Wed, 28 Jun 2017 15:25:12 +0300, Vasily Philipov <vasilyf@mellanox.com> wrote:
> > rte_pktmbuf_headroom() and rte_pktmbuf_tailroom() should be usable
> > with any segment, not only with headered ones, so is_header should be 0
> > when we call for sanity check inside them.
> >
> > Fixes: af75078fece3 ("first public release")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-01 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28 12:25 [dpdk-stable] [PATCH] mbuf: fix debug checks for headroom and tailroom Vasily Philipov
2017-06-30 14:27 ` Olivier Matz
2017-07-01 10:18 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).