[ovs-dev] [PATCH] vport: Record and free packets on unattached ports.
Jesse Gross
jesse at nicira.com
Tue May 11 01:45:57 UTC 2010
We throw away packets that are received on vports not attached to
a datapath but we are actually leaking them. This records that an
error took place and frees the skb.
---
datapath/vport.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/datapath/vport.c b/datapath/vport.c
index 5e164a9..716a458 100644
--- a/datapath/vport.c
+++ b/datapath/vport.c
@@ -1047,8 +1047,12 @@ vport_receive(struct vport *vport, struct sk_buff *skb)
{
struct dp_port *dp_port = vport_get_dp_port(vport);
- if (!dp_port)
+ if (!dp_port) {
+ vport_record_error(vport, VPORT_E_RX_DROPPED);
+ kfree_skb(skb);
+
return;
+ }
if (vport->ops->flags & VPORT_F_GEN_STATS) {
struct vport_percpu_stats *stats;
--
1.7.0.4
More information about the dev
mailing list