c0d002aed9
rte_gso_segment decreased refcnt of pkt by one, but
it is wrong if pkt is external mbuf, pkt won't be
freed because of incorrect refcnt, the result is
application can't allocate mbuf from mempool because
mbufs in mempool are run out of.
One correct way is application should call
rte_pktmbuf_free after calling rte_gso_segment to free
pkt explicitly. rte_gso_segment must not handle it, this
should be responsibility of application.
This commit changed rte_gso_segment in functional behavior
and return value, so the application must take appropriate
actions according to return values, "ret < 0" means it
should free and drop 'pkt', "ret == 0" means 'pkt' isn't
GSOed but 'pkt' can be transmitted as a normal packet,
"ret > 0" means 'pkt' has been GSOed into two or multiple
segments, it should use "pkts_out" to transmit these
segments. The application must free 'pkt' after call
rte_gso_segment when return value isn't equal to 0.
Fixes:
|
||
---|---|---|
.. | ||
gso_common.c | ||
gso_common.h | ||
gso_tcp4.c | ||
gso_tcp4.h | ||
gso_tunnel_tcp4.c | ||
gso_tunnel_tcp4.h | ||
gso_udp4.c | ||
gso_udp4.h | ||
meson.build | ||
rte_gso.c | ||
rte_gso.h | ||
version.map |