On Tue, May 06, 2014 at 04:56:06PM +0200, Tobias Klauser wrote: > > + if (skb) { > > + memcpy(skb_put(skb, pkt_size), data, pkt_size); > > + skb->protocol = eth_type_trans(skb, priv->net_dev); > > + dev_dbg(dev, "Protocol type: %x\n", skb->protocol); > > + > > + netif_rx(skb); > > + } else { > > + dev_err_ratelimited(dev, > > + "Couldn't allocate a skb_buff for a packet of > > size %u\n", > > + pkt_size); > > + } > > + > > + priv->stat_rx_bytes += pkt_size; > > This should only be incremented if the packet was actually passed to > netif_rx(), no? Yes, I guees it should. > > > + > > +static struct rtnl_link_stats64 * > > +ec_bhf_get_stats(struct net_device *net_dev, > > + struct rtnl_link_stats64 *stats) > > +{ > > + struct ec_bhf_priv *priv = netdev_priv(net_dev); > > + > > + memset(stats, 0, sizeof(*stats)); > > No need to memset() here, this is already done in dev_get_stats() > Ok, thanks. Will send updated patch.
-- DM -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/