#include <net/xfrm.h>
#endif /* CONFIG_XFRM */
-#include <linux/atomic.h>
-
#include <asm/octeon/octeon.h>
#include "ethernet-defines.h"
/* Increment RX stats for virtual ports */
if (port >= CVMX_PIP_NUM_INPUT_PORTS) {
-#ifdef CONFIG_64BIT
- atomic64_add(1,
- (atomic64_t *)&priv->stats.rx_packets);
- atomic64_add(skb->len,
- (atomic64_t *)&priv->stats.rx_bytes);
-#else
- atomic_add(1,
- (atomic_t *)&priv->stats.rx_packets);
- atomic_add(skb->len,
- (atomic_t *)&priv->stats.rx_bytes);
-#endif
+ priv->stats.rx_packets++;
+ priv->stats.rx_bytes += skb->len;
}
netif_receive_skb(skb);
} else {
printk_ratelimited("%s: Device not up, packet dropped\n",
dev->name);
*/
-#ifdef CONFIG_64BIT
- atomic64_add(1,
- (atomic64_t *)&priv->stats.rx_dropped);
-#else
- atomic_add(1,
- (atomic_t *)&priv->stats.rx_dropped);
-#endif
+ priv->stats.rx_dropped++;
dev_kfree_skb_irq(skb);
}
} else {
priv->stats.multicast += rx_status.multicast_packets;
priv->stats.rx_crc_errors += rx_status.inb_errors;
priv->stats.rx_frame_errors += rx_status.fcs_align_err_packets;
-
- /*
- * The drop counter must be incremented atomically
- * since the RX tasklet also increments it.
- */
-#ifdef CONFIG_64BIT
- atomic64_add(rx_status.dropped_packets,
- (atomic64_t *)&priv->stats.rx_dropped);
-#else
- atomic_add(rx_status.dropped_packets,
- (atomic_t *)&priv->stats.rx_dropped);
-#endif
+ priv->stats.rx_dropped += rx_status.dropped_packets;
}
return &priv->stats;