numam-dpdk/drivers/net/tap
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
..
meson.build build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
rte_eth_tap.c gso: fix mbuf freeing responsibility 2020-11-03 22:45:02 +01:00
rte_eth_tap.h net/tap: free mempool when closing 2020-09-18 18:55:10 +02:00
tap_bpf_api.c align SPDX Mellanox copyrights 2018-04-11 01:47:47 +02:00
tap_bpf_insns.h add missing static keyword to globals 2018-10-29 02:01:08 +01:00
tap_bpf_program.c replace packed attributes 2020-04-16 18:16:46 +02:00
tap_bpf.h replace alignment attributes 2020-04-16 18:16:18 +02:00
tap_flow.c net/tap: fix crash in flow destroy 2020-05-11 22:27:39 +02:00
tap_flow.h align SPDX Mellanox copyrights 2018-04-11 01:47:47 +02:00
tap_intr.c net/tap: fix queues fd check before close 2020-04-21 13:57:09 +02:00
tap_log.h net/tap: convert to dynamic logging 2018-04-27 18:00:59 +01:00
tap_netlink.c net/tap: fix build for glibc < 2.24 2020-05-11 22:27:39 +02:00
tap_netlink.h align SPDX Mellanox copyrights 2018-04-11 01:47:47 +02:00
tap_rss.h replace packed attributes 2020-04-16 18:16:46 +02:00
tap_tcmsgs.c net/tap: fix possible uninitialized variable access 2018-12-21 16:22:41 +01:00
tap_tcmsgs.h align SPDX Mellanox copyrights 2018-04-11 01:47:47 +02:00
version.map build: remove library name from version map file name 2020-10-19 22:13:59 +02:00