- return;
- }
-
- ovs_dp_process_packet(skb);
-}
-
-/**
- * ovs_vport_send - send a packet on a device
- *
- * @vport: vport on which to send the packet
- * @skb: skb to send
- *
- * Sends the given packet and returns the length of data sent. Either ovs
- * lock or rcu_read_lock must be held.
- */
-int ovs_vport_send(struct vport *vport, struct sk_buff *skb)
-{
- int sent = vport->ops->send(vport, skb);
-
- if (likely(sent > 0)) {
- struct pcpu_sw_netstats *stats;
-
- stats = this_cpu_ptr(vport->percpu_stats);
-
- u64_stats_update_begin(&stats->syncp);
- 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;
-}
-
-/**
- * ovs_vport_record_error - indicate device error to generic stats layer
- *
- * @vport: vport that encountered the error
- * @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 occurred.
- */
-static void ovs_vport_record_error(struct vport *vport,
- enum vport_err_type err_type)
-{
- spin_lock(&vport->stats_lock);
-
- switch (err_type) {
- case VPORT_E_RX_DROPPED:
- vport->err_stats.rx_dropped++;
- break;
-
- case VPORT_E_RX_ERROR:
- vport->err_stats.rx_errors++;
- break;
-
- case VPORT_E_TX_DROPPED:
- vport->err_stats.tx_dropped++;
- break;
-
- case VPORT_E_TX_ERROR:
- vport->err_stats.tx_errors++;
- break;