Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187968
b: refs/heads/master
c: 8bfe8b9
h: refs/heads/master
v: v3
  • Loading branch information
Sucheta Chakraborty authored and David S. Miller committed Mar 8, 2010
1 parent 4d4a899 commit 756f4d4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8bae5698616ac336938684ce7a7370299bd55d01
refs/heads/master: 8bfe8b91b8b877066c8ac788f59a40324eaac6d8
5 changes: 5 additions & 0 deletions trunk/drivers/net/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ struct qlcnic_adapter_stats {
u64 lro_pkts;
u64 rxbytes;
u64 txbytes;
u64 lrobytes;
u64 lso_frames;
u64 xmit_on;
u64 xmit_off;
u64 skb_alloc_failure;
};

/*
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/net/qlcnic/qlcnic_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ static const struct qlcnic_stats qlcnic_gstrings_stats[] = {
QLC_SIZEOF(stats.rxbytes), QLC_OFF(stats.rxbytes)},
{"tx_bytes",
QLC_SIZEOF(stats.txbytes), QLC_OFF(stats.txbytes)},
{"lrobytes",
QLC_SIZEOF(stats.lrobytes), QLC_OFF(stats.lrobytes)},
{"lso_frames",
QLC_SIZEOF(stats.lso_frames), QLC_OFF(stats.lso_frames)},
{"xmit_on",
QLC_SIZEOF(stats.xmit_on), QLC_OFF(stats.xmit_on)},
{"xmit_off",
QLC_SIZEOF(stats.xmit_off), QLC_OFF(stats.xmit_off)},
{"skb_alloc_failure", QLC_SIZEOF(stats.skb_alloc_failure),
QLC_OFF(stats.skb_alloc_failure)},

};

#define QLCNIC_STATS_LEN ARRAY_SIZE(qlcnic_gstrings_stats)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/qlcnic/qlcnic_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ qlcnic_send_cmd_descs(struct qlcnic_adapter *adapter,
if (nr_desc >= qlcnic_tx_avail(tx_ring)) {
netif_tx_stop_queue(tx_ring->txq);
__netif_tx_unlock_bh(tx_ring->txq);
adapter->stats.xmit_off++;
return -EBUSY;
}

Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/net/qlcnic/qlcnic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,10 @@ qlcnic_alloc_rx_skb(struct qlcnic_adapter *adapter,
struct pci_dev *pdev = adapter->pdev;

buffer->skb = dev_alloc_skb(rds_ring->skb_size);
if (!buffer->skb)
if (!buffer->skb) {
adapter->stats.skb_alloc_failure++;
return -ENOMEM;
}

skb = buffer->skb;

Expand Down Expand Up @@ -1289,7 +1291,7 @@ qlcnic_process_lro(struct qlcnic_adapter *adapter,
netif_receive_skb(skb);

adapter->stats.lro_pkts++;
adapter->stats.rxbytes += length;
adapter->stats.lrobytes += length;

return buffer;
}
Expand Down Expand Up @@ -1505,6 +1507,8 @@ qlcnic_process_rcv_diag(struct qlcnic_adapter *adapter,
adapter->diag_cnt++;

dev_kfree_skb_any(skb);
adapter->stats.rx_pkts++;
adapter->stats.rxbytes += length;

return buffer;
}
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ qlcnic_update_cmd_producer(struct qlcnic_adapter *adapter,
if (qlcnic_tx_avail(tx_ring) <= TX_STOP_THRESH) {
netif_stop_queue(adapter->netdev);
smp_mb();
adapter->stats.xmit_off++;
}
}

Expand Down Expand Up @@ -1385,6 +1386,7 @@ qlcnic_tso_check(struct net_device *netdev,
int copied, offset, copy_len, hdr_len = 0, tso = 0, vlan_oob = 0;
struct cmd_desc_type0 *hwdesc;
struct vlan_ethhdr *vh;
struct qlcnic_adapter *adapter = netdev_priv(netdev);

if (protocol == cpu_to_be16(ETH_P_8021Q)) {

Expand Down Expand Up @@ -1494,6 +1496,7 @@ qlcnic_tso_check(struct net_device *netdev,

tx_ring->producer = producer;
barrier();
adapter->stats.lso_frames++;
}

static int
Expand Down Expand Up @@ -1573,6 +1576,7 @@ qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)

if (unlikely(no_of_desc + 2 > qlcnic_tx_avail(tx_ring))) {
netif_stop_queue(netdev);
adapter->stats.xmit_off++;
return NETDEV_TX_BUSY;
}

Expand Down Expand Up @@ -1880,6 +1884,7 @@ static int qlcnic_process_cmd_ring(struct qlcnic_adapter *adapter)
if (qlcnic_tx_avail(tx_ring) > TX_STOP_THRESH) {
netif_wake_queue(netdev);
adapter->tx_timeo_cnt = 0;
adapter->stats.xmit_on++;
}
__netif_tx_unlock(tx_ring->txq);
}
Expand Down

0 comments on commit 756f4d4

Please sign in to comment.