qcacmn: Add NAPI statistics to dumpstats

Currently NAPI stats are retrieved as a part of iwpriv getStats command.
The buffer available for this command is limited and NAPI stats get
trucncated.

Add a new dumpStats parameter (9) to dump NAPI stats.

Change-Id: Iaf52a3dcecac2f7b24fde2f8220fbfddc767965b
CRs-Fixed: 1076563
This commit is contained in:
Mohit Khanna
2016-10-06 19:58:02 -07:00
committed by Sandeep Puligilla
부모 17720241d4
커밋 518eb5092e
9개의 변경된 파일122개의 추가작업 그리고 25개의 파일을 삭제

파일 보기

@@ -182,13 +182,15 @@ struct CE_state;
/* NOTE: "napi->scale" can be changed,
but this does not change the number of buckets */
#define QCA_NAPI_NUM_BUCKETS (QCA_NAPI_BUDGET / QCA_NAPI_DEF_SCALE)
#define QCA_NAPI_NUM_BUCKETS 4
struct qca_napi_stat {
uint32_t napi_schedules;
uint32_t napi_polls;
uint32_t napi_completes;
uint32_t napi_workdone;
uint32_t napi_budget_uses[QCA_NAPI_NUM_BUCKETS];
uint32_t time_limit_reached;
uint32_t rxpkt_thresh_reached;
};
/**
@@ -201,7 +203,7 @@ struct qca_napi_stat {
struct qca_napi_info {
struct net_device netdev; /* dummy net_dev */
void *hif_ctx;
struct napi_struct napi; /* one NAPI Instance per CE in phase I */
struct napi_struct napi;
uint8_t scale; /* currently same on all instances */
uint8_t id;
int irq;

파일 보기

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -129,6 +129,20 @@ int hif_napi_schedule(struct hif_opaque_softc *scn, int ce_id);
/* called by hdd_napi, which is called by kernel */
int hif_napi_poll(struct hif_opaque_softc *hif_ctx,
struct napi_struct *napi, int budget);
#ifdef HELIUMPLUS
/* called to retrieve NAPI CPU statistics */
void hif_napi_stats(struct qca_napi_data *napid);
void hif_napi_update_yield_stats(struct CE_state *ce_state,
bool time_limit_reached,
bool rxpkt_thresh_reached);
#else
static inline void hif_napi_stats(struct qca_napi_data *napid) { }
static inline void hif_napi_update_yield_stats(struct CE_state *ce_state,
bool time_limit_reached,
bool rxpkt_thresh_reached) { }
#endif
#ifdef FEATURE_NAPI_DEBUG
#define NAPI_DEBUG(fmt, ...) \
@@ -226,6 +240,10 @@ static inline int hif_napi_schedule(struct hif_opaque_softc *hif, int ce_id)
static inline int hif_napi_poll(struct napi_struct *napi, int budget)
{ return -EPERM; }
static inline void hif_napi_stats(struct qca_napi_data *napid) { }
static inline void hif_napi_update_yield_stats(struct CE_state *ce_state,
bool time_limit_reached,
bool rxpkt_thresh_reached) { }
#endif /* FEATURE_NAPI */
static inline int hif_ext_napi_enabled(struct hif_opaque_softc *hif, int ce)