Previous l3fwd-power only processes IP and IPv6 packets, other
packets' mbufs are not freed, and this causes a memory leak.
This patch fixes this issue.
Fixes:
3c0184cc0c60 ("examples: replace some offload flags with packet type")
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Michael Qiu <michael.qiu@intel.com>
Examples
~~~~~~~~
+* **l3fwd-power: Fixed memory leak for non-IP packet.**
+
+ Fixed issue in l3fwd-power where, on receiving packets of types
+ other than IPv4 or IPv6, the mbuf was not released, and caused
+ a memory leak.
+
* **examples/vhost: Fixed frequent mbuf allocation failure.**
vhost-switch often fails to allocate mbuf when dequeue from vring because it
/* We don't currently handle IPv6 packets in LPM mode. */
rte_pktmbuf_free(m);
#endif
- }
+ } else
+ rte_pktmbuf_free(m);
}