numam-dpdk/app
Yi Yang c0d002aed9 gso: fix mbuf freeing responsibility
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: 119583797b ("gso: support TCP/IPv4 GSO")
Cc: stable@dpdk.org

Signed-off-by: Yi Yang <yangyi01@inspur.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2020-11-03 22:45:02 +01:00
..
pdump eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
proc-info app/procinfo: clean old build macro 2020-10-26 12:03:31 +01:00
test test/crypto: disable wireless cases for CPU crypto API 2020-11-02 09:24:41 +01:00
test-acl eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-bbdev app/bbdev: dequeue full ring in offload test 2020-11-02 09:24:41 +01:00
test-cmdline cmdline: make implementation logically opaque 2020-10-15 00:39:10 +02:00
test-compress-perf eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-crypto-perf eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-eventdev app/eventdev: switch sequence number to dynamic mbuf field 2020-10-31 22:14:43 +01:00
test-fib app/fib: select lookup 2020-10-28 21:29:13 +01:00
test-flow-perf eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-pipeline eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-pmd gso: fix mbuf freeing responsibility 2020-11-03 22:45:02 +01:00
test-regex app/regex: add job context 2020-11-03 02:06:03 +01:00
test-sad eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
meson.build app/regex: add RegEx test application 2020-07-30 09:13:52 +02:00