diff options
| author | David S. Miller <davem@davemloft.net> | 2013-06-15 02:31:22 +0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-06-15 02:31:22 +0400 |
| commit | 09ce069dff607f86dcdeb541d20734a8f42478c5 (patch) | |
| tree | 03c7e9dc78d4dbfc2b3687053bbbd1680789934d /net/openvswitch/vport.c | |
| parent | 948e306d7d645af80ea331b60495710fe4fe12bb (diff) | |
| parent | 93d8fd1514b6862c3370ea92be3f3b4216e0bf8f (diff) | |
| download | linux-09ce069dff607f86dcdeb541d20734a8f42478c5.tar.xz | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch
Jesse Gross says:
====================
A few miscellaneous improvements and cleanups before the GRE tunnel
integration series. Intended for net-next/3.11.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport.c')
| -rw-r--r-- | net/openvswitch/vport.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index 720623190eaa..176d449351eb 100644 --- a/net/openvswitch/vport.c +++ b/net/openvswitch/vport.c @@ -351,7 +351,7 @@ int ovs_vport_send(struct vport *vport, struct sk_buff *skb) { int sent = vport->ops->send(vport, skb); - if (likely(sent)) { + if (likely(sent > 0)) { struct pcpu_tstats *stats; stats = this_cpu_ptr(vport->percpu_stats); @@ -360,7 +360,12 @@ int ovs_vport_send(struct vport *vport, struct sk_buff *skb) stats->tx_packets++; stats->tx_bytes += sent; u64_stats_update_end(&stats->syncp); - } + } else if (sent < 0) { + ovs_vport_record_error(vport, VPORT_E_TX_ERROR); + kfree_skb(skb); + } else + ovs_vport_record_error(vport, VPORT_E_TX_DROPPED); + return sent; } @@ -371,7 +376,7 @@ int ovs_vport_send(struct vport *vport, struct sk_buff *skb) * @err_type: one of enum vport_err_type types to indicate the error type * * If using the vport generic stats layer indicate that an error of the given - * type has occured. + * type has occurred. */ void ovs_vport_record_error(struct vport *vport, enum vport_err_type err_type) { |
