Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265167
b: refs/heads/master
c: d6916f8
h: refs/heads/master
i:
  265165: b62907a
  265163: 232cdb0
  265159: 189f6da
  265151: 4e7d916
v: v3
  • Loading branch information
Gerrit Renker committed Aug 1, 2011
1 parent 74fda8d commit 11d44a3
Show file tree
Hide file tree
Showing 28 changed files with 669 additions and 478 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: fc502ba0086f142639208f879e577e1b5a4eeb8e
refs/heads/master: d6916f87ca5e566786f1a935a7cabba54774bbda
3 changes: 2 additions & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2643,8 +2643,9 @@ S: Maintained
F: arch/x86/math-emu/

FRAME RELAY DLCI/FRAD (Sangoma drivers too)
M: Mike McLagan <mike.mclagan@linux.org>
L: netdev@vger.kernel.org
S: Orphan
S: Maintained
F: drivers/net/wan/dlci.c
F: drivers/net/wan/sdla.c

Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/connector/cn_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ void proc_fork_connector(struct task_struct *task)
struct proc_event *ev;
__u8 buffer[CN_PROC_MSG_SIZE];
struct timespec ts;
struct task_struct *parent;

if (atomic_read(&proc_event_num_listeners) < 1)
return;
Expand All @@ -68,11 +67,8 @@ void proc_fork_connector(struct task_struct *task)
ktime_get_ts(&ts); /* get high res monotonic timestamp */
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
ev->what = PROC_EVENT_FORK;
rcu_read_lock();
parent = rcu_dereference(task->real_parent);
ev->event_data.fork.parent_pid = parent->pid;
ev->event_data.fork.parent_tgid = parent->tgid;
rcu_read_unlock();
ev->event_data.fork.parent_pid = task->real_parent->pid;
ev->event_data.fork.parent_tgid = task->real_parent->tgid;
ev->event_data.fork.child_pid = task->pid;
ev->event_data.fork.child_tgid = task->tgid;

Expand Down
115 changes: 60 additions & 55 deletions trunk/drivers/net/benet/be.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <linux/interrupt.h>
#include <linux/firmware.h>
#include <linux/slab.h>
#include <linux/u64_stats_sync.h>

#include "be_hw.h"

Expand Down Expand Up @@ -168,15 +167,15 @@ struct be_mcc_obj {
};

struct be_tx_stats {
u64 tx_bytes;
u64 tx_pkts;
u64 tx_reqs;
u64 tx_wrbs;
u64 tx_compl;
ulong tx_jiffies;
u32 tx_stops;
struct u64_stats_sync sync;
struct u64_stats_sync sync_compl;
u32 be_tx_reqs; /* number of TX requests initiated */
u32 be_tx_stops; /* number of times TX Q was stopped */
u32 be_tx_wrbs; /* number of tx WRBs used */
u32 be_tx_compl; /* number of tx completion entries processed */
ulong be_tx_jiffies;
u64 be_tx_bytes;
u64 be_tx_bytes_prev;
u64 be_tx_pkts;
u32 be_tx_rate;
};

struct be_tx_obj {
Expand All @@ -196,20 +195,22 @@ struct be_rx_page_info {
};

struct be_rx_stats {
u32 rx_post_fail;/* number of ethrx buffer alloc failures */
u32 rx_polls; /* number of times NAPI called poll function */
u32 rx_events; /* number of ucast rx completion events */
u32 rx_compl; /* number of rx completion entries processed */
ulong rx_dropped; /* number of skb allocation errors */
ulong rx_jiffies;
u64 rx_bytes;
u64 rx_bytes_prev;
u64 rx_pkts;
u64 rx_pkts_prev;
ulong rx_jiffies;
u32 rx_drops_no_skbs; /* skb allocation errors */
u32 rx_drops_no_frags; /* HW has no fetched frags */
u32 rx_post_fail; /* page post alloc failures */
u32 rx_polls; /* NAPI calls */
u32 rx_events;
u32 rx_compl;
u32 rx_rate;
u32 rx_mcast_pkts;
u32 rx_compl_err; /* completions with err set */
u32 rx_pps; /* pkts per second */
struct u64_stats_sync sync;
u32 rxcp_err; /* Num rx completion entries w/ err set. */
ulong rx_fps_jiffies; /* jiffies at last FPS calc */
u32 rx_frags;
u32 prev_rx_frags;
u32 rx_fps; /* Rx frags per second */
};

struct be_rx_compl_info {
Expand Down Expand Up @@ -246,40 +247,43 @@ struct be_rx_obj {

struct be_drv_stats {
u8 be_on_die_temperature;
u32 tx_events;
u32 eth_red_drops;
u32 rx_drops_no_pbuf;
u32 rx_drops_no_txpb;
u32 rx_drops_no_erx_descr;
u32 rx_drops_no_tpre_descr;
u32 rx_drops_too_many_frags;
u32 rx_drops_invalid_ring;
u32 forwarded_packets;
u32 rx_drops_mtu;
u32 rx_crc_errors;
u32 rx_alignment_symbol_errors;
u32 rx_pause_frames;
u32 rx_priority_pause_frames;
u32 rx_control_frames;
u32 rx_in_range_errors;
u32 rx_out_range_errors;
u32 rx_frame_too_long;
u32 rx_address_match_errors;
u32 rx_dropped_too_small;
u32 rx_dropped_too_short;
u32 rx_dropped_header_too_small;
u32 rx_dropped_tcp_length;
u32 rx_dropped_runt;
u32 rx_ip_checksum_errs;
u32 rx_tcp_checksum_errs;
u32 rx_udp_checksum_errs;
u32 tx_pauseframes;
u32 tx_priority_pauseframes;
u32 tx_controlframes;
u32 rxpp_fifo_overflow_drop;
u32 rx_input_fifo_overflow_drop;
u32 pmem_fifo_overflow_drop;
u32 jabber_events;
u64 be_tx_events;
u64 eth_red_drops;
u64 rx_drops_no_pbuf;
u64 rx_drops_no_txpb;
u64 rx_drops_no_erx_descr;
u64 rx_drops_no_tpre_descr;
u64 rx_drops_too_many_frags;
u64 rx_drops_invalid_ring;
u64 forwarded_packets;
u64 rx_drops_mtu;
u64 rx_crc_errors;
u64 rx_alignment_symbol_errors;
u64 rx_pause_frames;
u64 rx_priority_pause_frames;
u64 rx_control_frames;
u64 rx_in_range_errors;
u64 rx_out_range_errors;
u64 rx_frame_too_long;
u64 rx_address_match_errors;
u64 rx_dropped_too_small;
u64 rx_dropped_too_short;
u64 rx_dropped_header_too_small;
u64 rx_dropped_tcp_length;
u64 rx_dropped_runt;
u64 rx_ip_checksum_errs;
u64 rx_tcp_checksum_errs;
u64 rx_udp_checksum_errs;
u64 rx_switched_unicast_packets;
u64 rx_switched_multicast_packets;
u64 rx_switched_broadcast_packets;
u64 tx_pauseframes;
u64 tx_priority_pauseframes;
u64 tx_controlframes;
u64 rxpp_fifo_overflow_drop;
u64 rx_input_fifo_overflow_drop;
u64 pmem_fifo_overflow_drop;
u64 jabber_events;
};

struct be_vf_cfg {
Expand Down Expand Up @@ -522,6 +526,7 @@ static inline bool be_multi_rxq(const struct be_adapter *adapter)
extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
u16 num_popped);
extern void be_link_status_update(struct be_adapter *adapter, bool link_up);
extern void netdev_stats_update(struct be_adapter *adapter);
extern void be_parse_stats(struct be_adapter *adapter);
extern int be_load_fw(struct be_adapter *adapter, u8 *func);
#endif /* BE_H */
21 changes: 21 additions & 0 deletions trunk/drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,28 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
if (((compl->tag0 == OPCODE_ETH_GET_STATISTICS) ||
(compl->tag0 == OPCODE_ETH_GET_PPORT_STATS)) &&
(compl->tag1 == CMD_SUBSYSTEM_ETH)) {
if (adapter->generation == BE_GEN3) {
if (lancer_chip(adapter)) {
struct lancer_cmd_resp_pport_stats
*resp = adapter->stats_cmd.va;
be_dws_le_to_cpu(&resp->pport_stats,
sizeof(resp->pport_stats));
} else {
struct be_cmd_resp_get_stats_v1 *resp =
adapter->stats_cmd.va;

be_dws_le_to_cpu(&resp->hw_stats,
sizeof(resp->hw_stats));
}
} else {
struct be_cmd_resp_get_stats_v0 *resp =
adapter->stats_cmd.va;

be_dws_le_to_cpu(&resp->hw_stats,
sizeof(resp->hw_stats));
}
be_parse_stats(adapter);
netdev_stats_update(adapter);
adapter->stats_cmd_sent = false;
}
} else {
Expand Down
53 changes: 48 additions & 5 deletions trunk/drivers/net/benet/be_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@ struct be_cmd_resp_get_stats_v0 {
struct be_hw_stats_v0 hw_stats;
};

struct lancer_pport_stats {
#define make_64bit_val(hi_32, lo_32) (((u64)hi_32<<32) | lo_32)
struct lancer_cmd_pport_stats {
u32 tx_packets_lo;
u32 tx_packets_hi;
u32 tx_unicast_packets_lo;
Expand Down Expand Up @@ -870,16 +871,16 @@ struct lancer_cmd_req_pport_stats {
struct be_cmd_req_hdr hdr;
union {
struct pport_stats_params params;
u8 rsvd[sizeof(struct lancer_pport_stats)];
u8 rsvd[sizeof(struct lancer_cmd_pport_stats)];
} cmd_params;
};

struct lancer_cmd_resp_pport_stats {
struct be_cmd_resp_hdr hdr;
struct lancer_pport_stats pport_stats;
struct lancer_cmd_pport_stats pport_stats;
};

static inline struct lancer_pport_stats*
static inline struct lancer_cmd_pport_stats*
pport_stats_from_cmd(struct be_adapter *adapter)
{
struct lancer_cmd_resp_pport_stats *cmd = adapter->stats_cmd.va;
Expand Down Expand Up @@ -1382,7 +1383,8 @@ struct be_cmd_resp_get_stats_v1 {
struct be_hw_stats_v1 hw_stats;
};

static inline void *hw_stats_from_cmd(struct be_adapter *adapter)
static inline void *
hw_stats_from_cmd(struct be_adapter *adapter)
{
if (adapter->generation == BE_GEN3) {
struct be_cmd_resp_get_stats_v1 *cmd = adapter->stats_cmd.va;
Expand All @@ -1395,6 +1397,34 @@ static inline void *hw_stats_from_cmd(struct be_adapter *adapter)
}
}

static inline void *be_port_rxf_stats_from_cmd(struct be_adapter *adapter)
{
if (adapter->generation == BE_GEN3) {
struct be_hw_stats_v1 *hw_stats = hw_stats_from_cmd(adapter);
struct be_rxf_stats_v1 *rxf_stats = &hw_stats->rxf;

return &rxf_stats->port[adapter->port_num];
} else {
struct be_hw_stats_v0 *hw_stats = hw_stats_from_cmd(adapter);
struct be_rxf_stats_v0 *rxf_stats = &hw_stats->rxf;

return &rxf_stats->port[adapter->port_num];
}
}

static inline void *be_rxf_stats_from_cmd(struct be_adapter *adapter)
{
if (adapter->generation == BE_GEN3) {
struct be_hw_stats_v1 *hw_stats = hw_stats_from_cmd(adapter);

return &hw_stats->rxf;
} else {
struct be_hw_stats_v0 *hw_stats = hw_stats_from_cmd(adapter);

return &hw_stats->rxf;
}
}

static inline void *be_erx_stats_from_cmd(struct be_adapter *adapter)
{
if (adapter->generation == BE_GEN3) {
Expand All @@ -1408,6 +1438,19 @@ static inline void *be_erx_stats_from_cmd(struct be_adapter *adapter)
}
}

static inline void *be_pmem_stats_from_cmd(struct be_adapter *adapter)
{
if (adapter->generation == BE_GEN3) {
struct be_hw_stats_v1 *hw_stats = hw_stats_from_cmd(adapter);

return &hw_stats->pmem;
} else {
struct be_hw_stats_v0 *hw_stats = hw_stats_from_cmd(adapter);

return &hw_stats->pmem;
}
}

extern int be_pci_fnum_get(struct be_adapter *adapter);
extern int be_cmd_POST(struct be_adapter *adapter);
extern int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
Expand Down
Loading

0 comments on commit 11d44a3

Please sign in to comment.