* [PATCH 1/3] cxgb3: function namespace cleanup
From: Stephen Hemminger @ 2010-10-15 22:43 UTC (permalink / raw)
To: Divy Le Ray, David S. Miller, Casey Leedom, Dimitris Michailidis; +Cc: netdev
In-Reply-To: <20101015224309.179898823@vyatta.com>
[-- Attachment #1: cxgb3-local.patch --]
[-- Type: text/plain, Size: 18193 bytes --]
Make local functions static. Remove functions that are
defined and never used. Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/cxgb3/adapter.h | 3
drivers/net/cxgb3/common.h | 18 ---
drivers/net/cxgb3/cxgb3_defs.h | 3
drivers/net/cxgb3/cxgb3_offload.c | 9 +
drivers/net/cxgb3/mc5.c | 38 -------
drivers/net/cxgb3/sge.c | 39 -------
drivers/net/cxgb3/t3_hw.c | 197 ++------------------------------------
7 files changed, 18 insertions(+), 289 deletions(-)
--- a/drivers/net/cxgb3/common.h 2010-10-15 11:13:45.087851624 -0700
+++ b/drivers/net/cxgb3/common.h 2010-10-15 11:24:41.425577576 -0700
@@ -673,7 +673,6 @@ void t3_xgm_intr_enable(struct adapter *
void t3_xgm_intr_disable(struct adapter *adapter, int idx);
void t3_port_intr_enable(struct adapter *adapter, int idx);
void t3_port_intr_disable(struct adapter *adapter, int idx);
-void t3_port_intr_clear(struct adapter *adapter, int idx);
int t3_slow_intr_handler(struct adapter *adapter);
int t3_phy_intr_handler(struct adapter *adapter);
@@ -689,14 +688,10 @@ int t3_check_tpsram_version(struct adapt
int t3_check_tpsram(struct adapter *adapter, const u8 *tp_ram,
unsigned int size);
int t3_set_proto_sram(struct adapter *adap, const u8 *data);
-int t3_read_flash(struct adapter *adapter, unsigned int addr,
- unsigned int nwords, u32 *data, int byte_oriented);
int t3_load_fw(struct adapter *adapter, const u8 * fw_data, unsigned int size);
int t3_get_fw_version(struct adapter *adapter, u32 *vers);
int t3_check_fw_version(struct adapter *adapter);
int t3_init_hw(struct adapter *adapter, u32 fw_params);
-void mac_prep(struct cmac *mac, struct adapter *adapter, int index);
-void early_hw_init(struct adapter *adapter, const struct adapter_info *ai);
int t3_reset_adapter(struct adapter *adapter);
int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
int reset);
@@ -706,8 +701,6 @@ void t3_fatal_err(struct adapter *adapte
void t3_set_vlan_accel(struct adapter *adapter, unsigned int ports, int on);
void t3_config_rss(struct adapter *adapter, unsigned int rss_config,
const u8 * cpus, const u16 *rspq);
-int t3_read_rss(struct adapter *adapter, u8 * lkup, u16 *map);
-int t3_mps_set_active_ports(struct adapter *adap, unsigned int port_mask);
int t3_cim_ctl_blk_read(struct adapter *adap, unsigned int addr,
unsigned int n, unsigned int *valp);
int t3_mc7_bd_read(struct mc7 *mc7, unsigned int start, unsigned int n,
@@ -731,19 +724,12 @@ void t3_mc5_prep(struct adapter *adapter
int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters,
unsigned int nroutes);
void t3_mc5_intr_handler(struct mc5 *mc5);
-int t3_read_mc5_range(const struct mc5 *mc5, unsigned int start, unsigned int n,
- u32 *buf);
-int t3_tp_set_coalescing_size(struct adapter *adap, unsigned int size, int psh);
-void t3_tp_set_max_rxsize(struct adapter *adap, unsigned int size);
void t3_tp_set_offload_mode(struct adapter *adap, int enable);
void t3_tp_get_mib_stats(struct adapter *adap, struct tp_mib_stats *tps);
void t3_load_mtus(struct adapter *adap, unsigned short mtus[NMTUS],
unsigned short alpha[NCCTRL_WIN],
unsigned short beta[NCCTRL_WIN], unsigned short mtu_cap);
-void t3_read_hw_mtus(struct adapter *adap, unsigned short mtus[NMTUS]);
-void t3_get_cong_cntl_tab(struct adapter *adap,
- unsigned short incr[NMTUS][NCCTRL_WIN]);
void t3_config_trace_filter(struct adapter *adapter,
const struct trace_params *tp, int filter_index,
int invert, int enable);
@@ -769,10 +755,6 @@ int t3_sge_enable_ecntxt(struct adapter
int t3_sge_disable_fl(struct adapter *adapter, unsigned int id);
int t3_sge_disable_rspcntxt(struct adapter *adapter, unsigned int id);
int t3_sge_disable_cqcntxt(struct adapter *adapter, unsigned int id);
-int t3_sge_read_ecntxt(struct adapter *adapter, unsigned int id, u32 data[4]);
-int t3_sge_read_fl(struct adapter *adapter, unsigned int id, u32 data[4]);
-int t3_sge_read_cq(struct adapter *adapter, unsigned int id, u32 data[4]);
-int t3_sge_read_rspq(struct adapter *adapter, unsigned int id, u32 data[4]);
int t3_sge_cqcntxt_op(struct adapter *adapter, unsigned int id, unsigned int op,
unsigned int credits);
--- a/drivers/net/cxgb3/cxgb3_defs.h 2010-10-15 11:17:35.345242098 -0700
+++ b/drivers/net/cxgb3/cxgb3_defs.h 2010-10-15 11:28:15.233294035 -0700
@@ -43,8 +43,6 @@
void *cxgb_alloc_mem(unsigned long size);
void cxgb_free_mem(void *addr);
-void cxgb_neigh_update(struct neighbour *neigh);
-void cxgb_redirect(struct dst_entry *old, struct dst_entry *new);
/*
* Map an ATID or STID to their entries in the corresponding TID tables.
@@ -111,7 +109,6 @@ static inline struct t3c_tid_entry *look
return &e->t3c_tid;
}
-int process_rx(struct t3cdev *dev, struct sk_buff **skbs, int n);
int attach_t3cdev(struct t3cdev *dev);
void detach_t3cdev(struct t3cdev *dev);
#endif
--- a/drivers/net/cxgb3/cxgb3_offload.c 2010-10-15 11:12:57.413912920 -0700
+++ b/drivers/net/cxgb3/cxgb3_offload.c 2010-10-15 11:28:04.412900334 -0700
@@ -60,6 +60,9 @@ static LIST_HEAD(adapter_list);
static const unsigned int MAX_ATIDS = 64 * 1024;
static const unsigned int ATID_BASE = 0x10000;
+static void cxgb_neigh_update(struct neighbour *neigh);
+static void cxgb_redirect(struct dst_entry *old, struct dst_entry *new);
+
static inline int offload_activated(struct t3cdev *tdev)
{
const struct adapter *adapter = tdev2adap(tdev);
@@ -1015,7 +1018,7 @@ EXPORT_SYMBOL(t3_register_cpl_handler);
/*
* T3CDEV's receive method.
*/
-int process_rx(struct t3cdev *dev, struct sk_buff **skbs, int n)
+static int process_rx(struct t3cdev *dev, struct sk_buff **skbs, int n)
{
while (n--) {
struct sk_buff *skb = *skbs++;
@@ -1070,7 +1073,7 @@ static int is_offloading(struct net_devi
return 0;
}
-void cxgb_neigh_update(struct neighbour *neigh)
+static void cxgb_neigh_update(struct neighbour *neigh)
{
struct net_device *dev = neigh->dev;
@@ -1104,7 +1107,7 @@ static void set_l2t_ix(struct t3cdev *td
tdev->send(tdev, skb);
}
-void cxgb_redirect(struct dst_entry *old, struct dst_entry *new)
+static void cxgb_redirect(struct dst_entry *old, struct dst_entry *new)
{
struct net_device *olddev, *newdev;
struct tid_info *ti;
--- a/drivers/net/cxgb3/mc5.c 2010-10-15 11:12:49.041572658 -0700
+++ b/drivers/net/cxgb3/mc5.c 2010-10-15 11:15:00.746932380 -0700
@@ -374,44 +374,6 @@ int t3_mc5_init(struct mc5 *mc5, unsigne
return err;
}
-/*
- * read_mc5_range - dump a part of the memory managed by MC5
- * @mc5: the MC5 handle
- * @start: the start address for the dump
- * @n: number of 72-bit words to read
- * @buf: result buffer
- *
- * Read n 72-bit words from MC5 memory from the given start location.
- */
-int t3_read_mc5_range(const struct mc5 *mc5, unsigned int start,
- unsigned int n, u32 *buf)
-{
- u32 read_cmd;
- int err = 0;
- struct adapter *adap = mc5->adapter;
-
- if (mc5->part_type == IDT75P52100)
- read_cmd = IDT_CMD_READ;
- else if (mc5->part_type == IDT75N43102)
- read_cmd = IDT4_CMD_READ;
- else
- return -EINVAL;
-
- mc5_dbgi_mode_enable(mc5);
-
- while (n--) {
- t3_write_reg(adap, A_MC5_DB_DBGI_REQ_ADDR0, start++);
- if (mc5_cmd_write(adap, read_cmd)) {
- err = -EIO;
- break;
- }
- dbgi_rd_rsp3(adap, buf + 2, buf + 1, buf);
- buf += 3;
- }
-
- mc5_dbgi_mode_disable(mc5);
- return 0;
-}
#define MC5_INT_FATAL (F_PARITYERR | F_REQQPARERR | F_DISPQPARERR)
--- a/drivers/net/cxgb3/t3_hw.c 2010-10-15 11:13:07.590326587 -0700
+++ b/drivers/net/cxgb3/t3_hw.c 2010-10-15 11:26:01.636456578 -0700
@@ -34,6 +34,8 @@
#include "sge_defs.h"
#include "firmware_exports.h"
+static void t3_port_intr_clear(struct adapter *adapter, int idx);
+
/**
* t3_wait_op_done_val - wait until an operation is completed
* @adapter: the adapter performing the operation
@@ -840,8 +842,8 @@ static int flash_wait_op(struct adapter
* (i.e., big-endian), otherwise as 32-bit words in the platform's
* natural endianess.
*/
-int t3_read_flash(struct adapter *adapter, unsigned int addr,
- unsigned int nwords, u32 *data, int byte_oriented)
+static int t3_read_flash(struct adapter *adapter, unsigned int addr,
+ unsigned int nwords, u32 *data, int byte_oriented)
{
int ret;
@@ -2111,7 +2113,7 @@ void t3_port_intr_disable(struct adapter
* Clear port-specific (i.e., MAC and PHY) interrupts for the given
* adapter port.
*/
-void t3_port_intr_clear(struct adapter *adapter, int idx)
+static void t3_port_intr_clear(struct adapter *adapter, int idx)
{
struct cphy *phy = &adap2pinfo(adapter, idx)->phy;
@@ -2484,98 +2486,6 @@ int t3_sge_cqcntxt_op(struct adapter *ad
}
/**
- * t3_sge_read_context - read an SGE context
- * @type: the context type
- * @adapter: the adapter
- * @id: the context id
- * @data: holds the retrieved context
- *
- * Read an SGE egress context. The caller is responsible for ensuring
- * only one context operation occurs at a time.
- */
-static int t3_sge_read_context(unsigned int type, struct adapter *adapter,
- unsigned int id, u32 data[4])
-{
- if (t3_read_reg(adapter, A_SG_CONTEXT_CMD) & F_CONTEXT_CMD_BUSY)
- return -EBUSY;
-
- t3_write_reg(adapter, A_SG_CONTEXT_CMD,
- V_CONTEXT_CMD_OPCODE(0) | type | V_CONTEXT(id));
- if (t3_wait_op_done(adapter, A_SG_CONTEXT_CMD, F_CONTEXT_CMD_BUSY, 0,
- SG_CONTEXT_CMD_ATTEMPTS, 1))
- return -EIO;
- data[0] = t3_read_reg(adapter, A_SG_CONTEXT_DATA0);
- data[1] = t3_read_reg(adapter, A_SG_CONTEXT_DATA1);
- data[2] = t3_read_reg(adapter, A_SG_CONTEXT_DATA2);
- data[3] = t3_read_reg(adapter, A_SG_CONTEXT_DATA3);
- return 0;
-}
-
-/**
- * t3_sge_read_ecntxt - read an SGE egress context
- * @adapter: the adapter
- * @id: the context id
- * @data: holds the retrieved context
- *
- * Read an SGE egress context. The caller is responsible for ensuring
- * only one context operation occurs at a time.
- */
-int t3_sge_read_ecntxt(struct adapter *adapter, unsigned int id, u32 data[4])
-{
- if (id >= 65536)
- return -EINVAL;
- return t3_sge_read_context(F_EGRESS, adapter, id, data);
-}
-
-/**
- * t3_sge_read_cq - read an SGE CQ context
- * @adapter: the adapter
- * @id: the context id
- * @data: holds the retrieved context
- *
- * Read an SGE CQ context. The caller is responsible for ensuring
- * only one context operation occurs at a time.
- */
-int t3_sge_read_cq(struct adapter *adapter, unsigned int id, u32 data[4])
-{
- if (id >= 65536)
- return -EINVAL;
- return t3_sge_read_context(F_CQ, adapter, id, data);
-}
-
-/**
- * t3_sge_read_fl - read an SGE free-list context
- * @adapter: the adapter
- * @id: the context id
- * @data: holds the retrieved context
- *
- * Read an SGE free-list context. The caller is responsible for ensuring
- * only one context operation occurs at a time.
- */
-int t3_sge_read_fl(struct adapter *adapter, unsigned int id, u32 data[4])
-{
- if (id >= SGE_QSETS * 2)
- return -EINVAL;
- return t3_sge_read_context(F_FREELIST, adapter, id, data);
-}
-
-/**
- * t3_sge_read_rspq - read an SGE response queue context
- * @adapter: the adapter
- * @id: the context id
- * @data: holds the retrieved context
- *
- * Read an SGE response queue context. The caller is responsible for
- * ensuring only one context operation occurs at a time.
- */
-int t3_sge_read_rspq(struct adapter *adapter, unsigned int id, u32 data[4])
-{
- if (id >= SGE_QSETS)
- return -EINVAL;
- return t3_sge_read_context(F_RESPONSEQ, adapter, id, data);
-}
-
-/**
* t3_config_rss - configure Rx packet steering
* @adapter: the adapter
* @rss_config: RSS settings (written to TP_RSS_CONFIG)
@@ -2616,42 +2526,6 @@ void t3_config_rss(struct adapter *adapt
}
/**
- * t3_read_rss - read the contents of the RSS tables
- * @adapter: the adapter
- * @lkup: holds the contents of the RSS lookup table
- * @map: holds the contents of the RSS map table
- *
- * Reads the contents of the receive packet steering tables.
- */
-int t3_read_rss(struct adapter *adapter, u8 * lkup, u16 *map)
-{
- int i;
- u32 val;
-
- if (lkup)
- for (i = 0; i < RSS_TABLE_SIZE; ++i) {
- t3_write_reg(adapter, A_TP_RSS_LKP_TABLE,
- 0xffff0000 | i);
- val = t3_read_reg(adapter, A_TP_RSS_LKP_TABLE);
- if (!(val & 0x80000000))
- return -EAGAIN;
- *lkup++ = val;
- *lkup++ = (val >> 8);
- }
-
- if (map)
- for (i = 0; i < RSS_TABLE_SIZE; ++i) {
- t3_write_reg(adapter, A_TP_RSS_MAP_TABLE,
- 0xffff0000 | i);
- val = t3_read_reg(adapter, A_TP_RSS_MAP_TABLE);
- if (!(val & 0x80000000))
- return -EAGAIN;
- *map++ = val;
- }
- return 0;
-}
-
-/**
* t3_tp_set_offload_mode - put TP in NIC/offload mode
* @adap: the adapter
* @enable: 1 to select offload mode, 0 for regular NIC
@@ -2868,7 +2742,8 @@ static void tp_set_timers(struct adapter
*
* Set the receive coalescing size and PSH bit handling.
*/
-int t3_tp_set_coalescing_size(struct adapter *adap, unsigned int size, int psh)
+static int t3_tp_set_coalescing_size(struct adapter *adap,
+ unsigned int size, int psh)
{
u32 val;
@@ -2898,7 +2773,7 @@ int t3_tp_set_coalescing_size(struct ada
* Set TP's max receive size. This is the limit that applies when
* receive coalescing is disabled.
*/
-void t3_tp_set_max_rxsize(struct adapter *adap, unsigned int size)
+static void t3_tp_set_max_rxsize(struct adapter *adap, unsigned int size)
{
t3_write_reg(adap, A_TP_PARA_REG7,
V_PMMAXXFERLEN0(size) | V_PMMAXXFERLEN1(size));
@@ -3018,48 +2893,6 @@ void t3_load_mtus(struct adapter *adap,
}
/**
- * t3_read_hw_mtus - returns the values in the HW MTU table
- * @adap: the adapter
- * @mtus: where to store the HW MTU values
- *
- * Reads the HW MTU table.
- */
-void t3_read_hw_mtus(struct adapter *adap, unsigned short mtus[NMTUS])
-{
- int i;
-
- for (i = 0; i < NMTUS; ++i) {
- unsigned int val;
-
- t3_write_reg(adap, A_TP_MTU_TABLE, 0xff000000 | i);
- val = t3_read_reg(adap, A_TP_MTU_TABLE);
- mtus[i] = val & 0x3fff;
- }
-}
-
-/**
- * t3_get_cong_cntl_tab - reads the congestion control table
- * @adap: the adapter
- * @incr: where to store the alpha values
- *
- * Reads the additive increments programmed into the HW congestion
- * control table.
- */
-void t3_get_cong_cntl_tab(struct adapter *adap,
- unsigned short incr[NMTUS][NCCTRL_WIN])
-{
- unsigned int mtu, w;
-
- for (mtu = 0; mtu < NMTUS; ++mtu)
- for (w = 0; w < NCCTRL_WIN; ++w) {
- t3_write_reg(adap, A_TP_CCTRL_TABLE,
- 0xffff0000 | (mtu << 5) | w);
- incr[mtu][w] = t3_read_reg(adap, A_TP_CCTRL_TABLE) &
- 0x1fff;
- }
-}
-
-/**
* t3_tp_get_mib_stats - read TP's MIB counters
* @adap: the adapter
* @tps: holds the returned counter values
@@ -3223,15 +3056,6 @@ static int tp_init(struct adapter *adap,
return busy;
}
-int t3_mps_set_active_ports(struct adapter *adap, unsigned int port_mask)
-{
- if (port_mask & ~((1 << adap->params.nports) - 1))
- return -EINVAL;
- t3_set_reg_field(adap, A_MPS_CFG, F_PORT1ACTIVE | F_PORT0ACTIVE,
- port_mask << S_PORT0ACTIVE);
- return 0;
-}
-
/*
* Perform the bits of HW initialization that are dependent on the Tx
* channels being used.
@@ -3687,7 +3511,7 @@ static void mc7_prep(struct adapter *ada
mc7->width = G_WIDTH(cfg);
}
-void mac_prep(struct cmac *mac, struct adapter *adapter, int index)
+static void mac_prep(struct cmac *mac, struct adapter *adapter, int index)
{
u16 devid;
@@ -3707,7 +3531,8 @@ void mac_prep(struct cmac *mac, struct a
}
}
-void early_hw_init(struct adapter *adapter, const struct adapter_info *ai)
+static void early_hw_init(struct adapter *adapter,
+ const struct adapter_info *ai)
{
u32 val = V_PORTSPEED(is_10G(adapter) ? 3 : 2);
--- a/drivers/net/cxgb3/adapter.h 2010-10-15 11:29:31.428075569 -0700
+++ b/drivers/net/cxgb3/adapter.h 2010-10-15 11:29:46.280619610 -0700
@@ -336,9 +336,6 @@ int t3_sge_alloc_qset(struct adapter *ad
int irq_vec_idx, const struct qset_params *p,
int ntxq, struct net_device *dev,
struct netdev_queue *netdevq);
-int t3_get_desc(const struct sge_qset *qs, unsigned int qnum, unsigned int idx,
- unsigned char *data);
-irqreturn_t t3_sge_intr_msix(int irq, void *cookie);
extern struct workqueue_struct *cxgb3_wq;
int t3_get_edc_fw(struct cphy *phy, int edc_idx, int size);
--- a/drivers/net/cxgb3/sge.c 2010-10-15 11:13:02.710128196 -0700
+++ b/drivers/net/cxgb3/sge.c 2010-10-15 11:30:17.141751919 -0700
@@ -2554,7 +2554,7 @@ static inline int handle_responses(struc
* The MSI-X interrupt handler for an SGE response queue for the non-NAPI case
* (i.e., response queue serviced in hard interrupt).
*/
-irqreturn_t t3_sge_intr_msix(int irq, void *cookie)
+static irqreturn_t t3_sge_intr_msix(int irq, void *cookie)
{
struct sge_qset *qs = cookie;
struct adapter *adap = qs->adap;
@@ -3320,40 +3320,3 @@ void t3_sge_prep(struct adapter *adap, s
spin_lock_init(&adap->sge.reg_lock);
}
-
-/**
- * t3_get_desc - dump an SGE descriptor for debugging purposes
- * @qs: the queue set
- * @qnum: identifies the specific queue (0..2: Tx, 3:response, 4..5: Rx)
- * @idx: the descriptor index in the queue
- * @data: where to dump the descriptor contents
- *
- * Dumps the contents of a HW descriptor of an SGE queue. Returns the
- * size of the descriptor.
- */
-int t3_get_desc(const struct sge_qset *qs, unsigned int qnum, unsigned int idx,
- unsigned char *data)
-{
- if (qnum >= 6)
- return -EINVAL;
-
- if (qnum < 3) {
- if (!qs->txq[qnum].desc || idx >= qs->txq[qnum].size)
- return -EINVAL;
- memcpy(data, &qs->txq[qnum].desc[idx], sizeof(struct tx_desc));
- return sizeof(struct tx_desc);
- }
-
- if (qnum == 3) {
- if (!qs->rspq.desc || idx >= qs->rspq.size)
- return -EINVAL;
- memcpy(data, &qs->rspq.desc[idx], sizeof(struct rsp_desc));
- return sizeof(struct rsp_desc);
- }
-
- qnum -= 4;
- if (!qs->fl[qnum].desc || idx >= qs->fl[qnum].size)
- return -EINVAL;
- memcpy(data, &qs->fl[qnum].desc[idx], sizeof(struct rx_desc));
- return sizeof(struct rx_desc);
-}
^ permalink raw reply
* [PATCH 3/3] cxgb4vf: function namespace cleanup
From: Stephen Hemminger @ 2010-10-15 22:43 UTC (permalink / raw)
To: Divy Le Ray, David S. Miller, Casey Leedom, Dimitris Michailidis; +Cc: netdev
In-Reply-To: <20101015224309.179898823@vyatta.com>
[-- Attachment #1: cxgb4vf-local.patch --]
[-- Type: text/plain, Size: 2603 bytes --]
Where possible make functions local.
Compile tested only
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/cxgb4vf/sge.c | 6 +++---
drivers/net/cxgb4vf/t4vf_common.h | 1 -
drivers/net/cxgb4vf/t4vf_hw.c | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
--- a/drivers/net/cxgb4vf/sge.c 2010-10-15 13:35:37.841741143 -0700
+++ b/drivers/net/cxgb4vf/sge.c 2010-10-15 13:37:26.753998981 -0700
@@ -1361,7 +1361,7 @@ out_free:
* Releases the pages of a packet gather list. We do not own the last
* page on the list and do not free it.
*/
-void t4vf_pktgl_free(const struct pkt_gl *gl)
+static void t4vf_pktgl_free(const struct pkt_gl *gl)
{
int frag;
@@ -1636,7 +1636,7 @@ static inline void rspq_next(struct sge_
* on this queue. If the system is under memory shortage use a fairly
* long delay to help recovery.
*/
-int process_responses(struct sge_rspq *rspq, int budget)
+static int process_responses(struct sge_rspq *rspq, int budget)
{
struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq);
int budget_left = budget;
@@ -1888,7 +1888,7 @@ static unsigned int process_intrq(struct
* The MSI interrupt handler handles data events from SGE response queues as
* well as error and other async events as they all use the same MSI vector.
*/
-irqreturn_t t4vf_intr_msi(int irq, void *cookie)
+static irqreturn_t t4vf_intr_msi(int irq, void *cookie)
{
struct adapter *adapter = cookie;
--- a/drivers/net/cxgb4vf/t4vf_common.h 2010-10-15 13:38:12.555553059 -0700
+++ b/drivers/net/cxgb4vf/t4vf_common.h 2010-10-15 13:38:30.716055176 -0700
@@ -235,7 +235,6 @@ static inline int t4vf_wr_mbox_ns(struct
int __devinit t4vf_wait_dev_ready(struct adapter *);
int __devinit t4vf_port_init(struct adapter *, int);
-int t4vf_query_params(struct adapter *, unsigned int, const u32 *, u32 *);
int t4vf_set_params(struct adapter *, unsigned int, const u32 *, const u32 *);
int t4vf_get_sge_params(struct adapter *);
--- a/drivers/net/cxgb4vf/t4vf_hw.c 2010-10-15 13:35:44.638006598 -0700
+++ b/drivers/net/cxgb4vf/t4vf_hw.c 2010-10-15 13:38:04.503330665 -0700
@@ -335,8 +335,8 @@ int __devinit t4vf_port_init(struct adap
* Reads the values of firmware or device parameters. Up to 7 parameters
* can be queried at once.
*/
-int t4vf_query_params(struct adapter *adapter, unsigned int nparams,
- const u32 *params, u32 *vals)
+static int t4vf_query_params(struct adapter *adapter, unsigned int nparams,
+ const u32 *params, u32 *vals)
{
int i, ret;
struct fw_params_cmd cmd, rpl;
^ permalink raw reply
* [PATCH 0/3] Chelsio driver namespace cleanups
From: Stephen Hemminger @ 2010-10-15 22:43 UTC (permalink / raw)
To: Divy Le Ray, David S. Miller, Casey Leedom, Dimitris Michailidis; +Cc: netdev
Cleanup functions and dead code in Chelsio drivers
^ permalink raw reply
* Re: [Bonding-devel] [PATCH net-next] bonding: make release_and_destroy static
From: Jay Vosburgh @ 2010-10-15 23:16 UTC (permalink / raw)
To: Andy Gospodarek; +Cc: Stephen Hemminger, netdev, David Miller, bonding-devel
In-Reply-To: <20101015153725.GC7497@gospo.rdu.redhat.com>
Andy Gospodarek <andy@greyhouse.net> wrote:
>On Fri, Oct 15, 2010 at 08:09:34AM -0700, Stephen Hemminger wrote:
>> Only used in main file.
>>
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>>
>> --- a/drivers/net/bonding/bond_main.c 2010-10-15 08:07:14.163898236 -0700
>> +++ b/drivers/net/bonding/bond_main.c 2010-10-15 08:07:31.956373660 -0700
>> @@ -2057,8 +2057,8 @@ int bond_release(struct net_device *bond
>> * First release a slave and than destroy the bond if no more slaves are left.
>> * Must be under rtnl_lock when this function is called.
>> */
>> -int bond_release_and_destroy(struct net_device *bond_dev,
>> - struct net_device *slave_dev)
>> +static int bond_release_and_destroy(struct net_device *bond_dev,
>> + struct net_device *slave_dev)
>> {
>> struct bonding *bond = netdev_priv(bond_dev);
>> int ret;
>> --- a/drivers/net/bonding/bonding.h 2010-10-15 08:07:14.179898632 -0700
>> +++ b/drivers/net/bonding/bonding.h 2010-10-15 08:07:31.956373660 -0700
>> @@ -334,7 +334,6 @@ static inline void bond_unset_master_alb
>> struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);
>> int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
>> int bond_create(struct net *net, const char *name);
>> -int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev);
>> int bond_create_sysfs(void);
>> void bond_destroy_sysfs(void);
>> void bond_prepare_sysfs_group(struct bonding *bond);
>
>Seems fine.
>
>Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* Re: [PATCH net-next] bonding: make bond_resend_igmp_join_requests_delayed static
From: Jay Vosburgh @ 2010-10-15 23:15 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev, bonding-devel
In-Reply-To: <20101015140256.4192fd34@nehalam>
Stephen Hemminger <shemminger@vyatta.com> wrote:
>Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
>--- a/drivers/net/bonding/bond_main.c 2010-10-15 13:52:01.747192520 -0700
>+++ b/drivers/net/bonding/bond_main.c 2010-10-15 13:52:39.004286643 -0700
>@@ -914,7 +914,7 @@ static void bond_resend_igmp_join_reques
> read_unlock(&bond->lock);
> }
>
>-void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
>+static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
> {
> struct bonding *bond = container_of(work, struct bonding,
> mcast_work.work);
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* Re: [Bugme-new] [Bug 19692] New: linux-2.6.36-rc5 crash with gianfar ethernet at full line rate traffic
From: emin ak @ 2010-10-15 23:14 UTC (permalink / raw)
To: Jarek Poplawski
Cc: Andrew Morton, netdev, bugzilla-daemon, bugme-daemon,
Anton Vorontsov
In-Reply-To: <20101015085853.GA8091@ff.dom.local>
> Hi Emin,
> Are there any problems with this testing?
>
> Jarek P.
>
Hi Jarek.
Sorry for delayed answer. As I promised, I have started the tests on
Monday (in spite of dealing with The Monday Syndrome:) I had applied
your patch and after two billions packet (and approximatly four hours)
passed kernel crashed with skb_over_panic error similar with first
type. To ensure the patch is failed or not, I rerun the same test
again. That time, surprisingly, it did'nt crashed again for two days
with same kernel. But this situation had occured before, I think
sometimes because of randomness of the applied ethernet traffic and
mostly because I cant apply all full line rate random traffic to my
target device because of wrong test setup (switch / hardware packet
generator settings etc..), it takes three or more day to crash the
kernel and sometimes it never crashes. My device only and only crashes
when I can apply full line rate random traffic. Before informing you
and the list with (official) test results, I want to be sure with the
truth of them. So that please let me apply more test to the target
device for a fews day more. After that I wish I'll came with good
news!
Thanks for your time and care alot.
Emin
^ permalink raw reply
* 2.6.36-rc7: net/bridge causes temporary network I/O lockups
From: Patrick Ringl @ 2010-10-15 23:13 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel
Hi,
after I recently switched from 2.6.32 to 2.6.35 (and for testing to
2.6.36-rc7) I had massive issues with temporarily occurring freezes
regarding the whole network stack.
The freezes are occurring randomly and usually take 20-30 seconds until
the system is responsive again (in addition locally thus with a screen
and keyboard attached the system is still fully functional).
I noticed that this behavior only occurs once I have a bridge set up for
KVM (with one local interface configured as port, fd and maxwait set to
0). If I disable the bridge and configure the interfaces with an IP,
things are back to normal and thus everything works fine.
The network hardware in question was an nforce onboard controller (using
dethforce) and the 2nd interface I have the exact same issue with is a
realtek using r8169.
So here it is: Could commit 573201f36fd9c7c6d5218cdcd9948cee700b277d (
partially disabling netpoll support) be the issue for the problem I am
currently facing? If not, what could it be then?
Please CC to me since I am not subscribed! :-)
regards,
Patrick
^ permalink raw reply
* 2.6.36-rc7: net/bridge causes temporary network I/O lockups
From: Patrick Ringl @ 2010-10-15 23:04 UTC (permalink / raw)
To: netdev; +Cc: herbert, bridge, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1091 bytes --]
Hi,
after I recently switched from 2.6.32 to 2.6.35 (and for testing to
2.6.36-rc7) I had massive issues with temporarily occurring freezes
regarding the whole network stack.
The freezes are occurring randomly and usually take 20-30 seconds until
the system is responsive again (in addition locally thus with a screen
and keyboard attached the system is still fully functional).
I noticed that this behavior only occurs once I have a bridge set up for
KVM (with one local interface configured as port, fd and maxwait set to
0). If I disable the bridge and configure the interfaces with an IP,
things are back to normal and thus everything works fine.
The network hardware in question was an nforce onboard controller (using
dethforce) and the 2nd interface I have the exact same issue with is a
realtek using r8169.
So here it is: Could commit 573201f36fd9c7c6d5218cdcd9948cee700b277d (
partially disabling netpoll support) be the issue for the problem I am
currently facing? If not, what could it be then?
Please CC to me since I am not subscribed! :-)
regards,
Patrick
[-- Attachment #1.2: Type: text/html, Size: 2246 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Bridge mailing list
Bridge@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/bridge
^ permalink raw reply
* Message From Dr. Paul Blair
From: Dr. Paul Blair @ 2010-10-15 22:40 UTC (permalink / raw)
--
Greetings,
This message may come to you as a surprise, because we have never met
before now.
I am Dr. Paul Blair, I am a Senior Director with the Royal Bank of
Scotland. There is the sum of $20,600,000.00 in my Bank {Royal Bank of
Scotland} United Kingdom, But, there were no beneficiaries stated
concerning these funds which means no one would ever come forward to
claim it.
This is why i am requesting for your Partnership, so we can have this
sum transfered out of my Royal Bank of Scotland into your Bank Account
or any other account of your choice.I will be pleased to see if you
can help me and also be a good and Trusted person. Once the funds have
been transferred to your Nominated Bank Account we shall then share in
the ratio of 60% for me, 40% for you.
Send me an email to my private email address: pau1957@gncn.net if you
are interested in assisting me, so i can give you more details.
This is a great Life time opportunity for both of us. IT IS 100% RISK FREE.
Regards
Dr. Paul Blair
^ permalink raw reply
* Re: tbf/htb qdisc limitations
From: Jarek Poplawski @ 2010-10-15 22:05 UTC (permalink / raw)
To: Bill Fink; +Cc: Eric Dumazet, Rick Jones, Steven Brudenell, netdev
In-Reply-To: <20101015173746.12c7c40a.billfink@mindspring.com>
On Fri, Oct 15, 2010 at 05:37:46PM -0400, Bill Fink wrote:
...
> i7test7% tc -s -d qdisc show dev eth2
> qdisc prio 1: root refcnt 33 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
> Sent 11028687119 bytes 1223828 pkt (dropped 293, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
> qdisc tbf 10: parent 1:1 rate 8900Mbit burst 1112500b/64 mpu 0b lat 4295.0s
> Sent 11028687077 bytes 1223827 pkt (dropped 293, overlimits 593 requeues 0)
> backlog 0b 0p requeues 0
>
> I'm not sure how you can have so many dropped but not have
> any TCP retransmissions (or not show up as requeues). But
> there's probably something basic I just don't understand
> about how all this stuff works.
Me either, but it seems higher "limit" might help with these drops.
Jarek P.
^ permalink raw reply
* Re: tbf/htb qdisc limitations
From: Bill Fink @ 2010-10-15 21:37 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Jarek Poplawski, Rick Jones, Steven Brudenell, netdev
In-Reply-To: <1287125059.2659.1812.camel@edumazet-laptop>
On Fri, 15 Oct 2010, Eric Dumazet wrote:
> Le vendredi 15 octobre 2010 à 02:37 -0400, Bill Fink a écrit :
> > On Thu, 14 Oct 2010, Jarek Poplawski wrote:
> >
> > > On Thu, Oct 14, 2010 at 08:09:39AM +0000, Jarek Poplawski wrote:
> > > > On Thu, Oct 14, 2010 at 03:13:54AM -0400, Bill Fink wrote:
> > > > > TSO/GSO was disabled and was using 9000-byte jumbo frames
> > > > > (and specified mtu 9000 to tc command).
> > > > >
> > > > > Here was one attempt I made using tbf:
> > > > >
> > > > > tc qdisc add dev eth2 root handle 1: prio
> > > > > tc qdisc add dev eth2 parent 1:1 handle 10: tbf rate 8900mbit buffer 1112500 limit 10000 mtu 9000
> > > > > tc filter add dev eth2 protocol ip parent 1: prio 1 u32 match ip dst 192.168.1.23 flowid 10:1
> > > > >
> > > > > I tried many variations of the above, all without success.
> > > >
> > > > The main problem are smaller packets. If you had (almost) only 9000b
> > > > frames this probably could work. [...]
> > >
> > > On the other hand, e.g. the limit above seems too low wrt mtu & rate.
> >
> > Actually, I discovered my commands above work just fine on
> > a 2.6.35 box:
> >
> > i7test7% nuttcp -T10 -i1 192.168.1.17
> > 1045.3125 MB / 1.00 sec = 8768.3573 Mbps 0 retrans
> > 1045.6875 MB / 1.00 sec = 8772.0292 Mbps 0 retrans
> > 1049.5625 MB / 1.00 sec = 8804.2627 Mbps 0 retrans
> > 1043.1875 MB / 1.00 sec = 8750.9960 Mbps 0 retrans
> > 1048.6875 MB / 1.00 sec = 8796.3246 Mbps 0 retrans
> > 1033.4375 MB / 1.00 sec = 8669.3188 Mbps 0 retrans
> > 1040.7500 MB / 1.00 sec = 8730.7057 Mbps 0 retrans
> > 1047.0000 MB / 1.00 sec = 8783.2063 Mbps 0 retrans
> > 1040.0000 MB / 1.00 sec = 8724.0564 Mbps 0 retrans
> > 1037.4375 MB / 1.00 sec = 8702.5434 Mbps 0 retrans
> >
> > 10431.5608 MB / 10.00 sec = 8749.7542 Mbps 25 %TX 35 %RX 0 retrans 0.11 msRTT
> >
> > The problems I encountered were on a field system running
> > 2.6.30.10. I will investigate upgrading the field system
> > to 2.6.35.
> >
>
> Yes, I noticed same thing for me on net-next-2.6
>
> Please report :
>
> tc -s -d qdisc
Not sure why you want this on the older 2.6.30.10 kernel,
but here it is:
i7test6% nuttcp -T10 -i1 192.168.1.14
1169.1875 MB / 1.00 sec = 9807.2868 Mbps 0 retrans
1181.1875 MB / 1.00 sec = 9908.9054 Mbps 0 retrans
1181.1250 MB / 1.00 sec = 9907.9253 Mbps 0 retrans
1181.1875 MB / 1.00 sec = 9908.4991 Mbps 0 retrans
1180.6875 MB / 1.00 sec = 9904.3345 Mbps 0 retrans
1181.1250 MB / 1.00 sec = 9908.0838 Mbps 0 retrans
1181.1875 MB / 1.00 sec = 9908.4099 Mbps 0 retrans
1181.0625 MB / 1.00 sec = 9907.3911 Mbps 0 retrans
1181.3750 MB / 1.00 sec = 9910.2801 Mbps 0 retrans
1181.1875 MB / 1.00 sec = 9908.2118 Mbps 0 retrans
11801.1382 MB / 10.04 sec = 9858.7159 Mbps 24 %TX 40 %RX 0 retrans 0.11 msRTT
i7test6% tc -s -d qdisc show dev eth2
qdisc prio 1: root refcnt 32 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 12448974085 bytes 1381173 pkt (dropped 266, overlimits 0 requeues 12)
rate 0bit 0pps backlog 0b 0p requeues 12
qdisc tbf 10: parent 1:1 rate 8900Mbit burst 1111387b/64 mpu 0b lat 4295.0s
Sent 12448974043 bytes 1381172 pkt (dropped 266, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
I'm guessing this is probably related to the schedulers
time resolution issue that Jarek mentioned.
And for completeness, here's the info for the working
2.6.35 case:
i7test7% nuttcp -T10 -i1 192.168.1.17
1045.5625 MB / 1.00 sec = 8770.6210 Mbps 0 retrans
1032.1875 MB / 1.00 sec = 8658.3825 Mbps 0 retrans
1039.8125 MB / 1.00 sec = 8722.7801 Mbps 0 retrans
1050.2500 MB / 1.00 sec = 8810.0739 Mbps 0 retrans
1050.6875 MB / 1.00 sec = 8813.9378 Mbps 0 retrans
1048.8125 MB / 1.00 sec = 8798.0857 Mbps 0 retrans
1046.1875 MB / 1.00 sec = 8775.9954 Mbps 0 retrans
1045.7500 MB / 1.00 sec = 8771.9307 Mbps 0 retrans
1051.1250 MB / 1.00 sec = 8817.8900 Mbps 0 retrans
1044.0625 MB / 1.00 sec = 8757.8019 Mbps 0 retrans
10454.7500 MB / 10.00 sec = 8769.2206 Mbps 26 %TX 35 %RX 0 retrans 0.11 msRTT
i7test7% tc -s -d qdisc show dev eth2
qdisc prio 1: root refcnt 33 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 11028687119 bytes 1223828 pkt (dropped 293, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc tbf 10: parent 1:1 rate 8900Mbit burst 1112500b/64 mpu 0b lat 4295.0s
Sent 11028687077 bytes 1223827 pkt (dropped 293, overlimits 593 requeues 0)
backlog 0b 0p requeues 0
I'm not sure how you can have so many dropped but not have
any TCP retransmissions (or not show up as requeues). But
there's probably something basic I just don't understand
about how all this stuff works.
-Bill
^ permalink raw reply
* Re: large divisor for flow classifier
From: Jarek Poplawski @ 2010-10-15 21:45 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Jonathan Thibault, Patrick McHardy, netdev
In-Reply-To: <4CB8C341.40000@gmail.com>
Jarek Poplawski wrote:
> Because of low SFQ_DEPTH, which limits its queue to 127 packets,
> SFQ isn't suitable for serving so many users. There is sch_drr as
> a replacement, alas more complex and undocumented [...]
Sorry! Actually there is a man page already!
Kudos to Florian!
Jarek P.
^ permalink raw reply
* Re: [PATCH net-next] bonding: make bond_resend_igmp_join_requests_delayed static
From: Flavio Leitner @ 2010-10-15 21:40 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, Jay Vosburgh, netdev, bonding-devel
In-Reply-To: <20101015140256.4192fd34@nehalam>
On Fri, Oct 15, 2010 at 02:02:56PM -0700, Stephen Hemminger wrote:
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> --- a/drivers/net/bonding/bond_main.c 2010-10-15 13:52:01.747192520 -0700
> +++ b/drivers/net/bonding/bond_main.c 2010-10-15 13:52:39.004286643 -0700
> @@ -914,7 +914,7 @@ static void bond_resend_igmp_join_reques
> read_unlock(&bond->lock);
> }
>
> -void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
> +static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
> {
> struct bonding *bond = container_of(work, struct bonding,
> mcast_work.work);
Indeed, thanks.
Acked-by: Flavio Leitner <fleitner@redhat.com>
--
Flavio
^ permalink raw reply
* Re: openvswitch/flow WAS ( Re: [rfc] Merging the Open vSwitch datapath
From: Jesse Gross @ 2010-10-15 21:35 UTC (permalink / raw)
To: hadi; +Cc: Ben Pfaff, netdev
In-Reply-To: <1287142292.3642.19.camel@bigi>
On Fri, Oct 15, 2010 at 4:31 AM, jamal <hadi@cyberus.ca> wrote:
> It seems to me that you reinvented things that exist in
> Linux already such as bridging, tunnels and what really
> caught my attention: ability to do flows (tc actions).
> It is possible Linux is missing something you wanted or was
> not efficient enough?
> [For example: I couldnt see anything you needed
> on flow-action management that Linux couldnt do already
> (with already very nice well structured netlink APIs)]
You're right, at a high level, it appears that there is a bit of an
overlap between bridging, tc, and Open vSwitch. However, in reality
each is targeting a pretty different use case. Given that the design
goals are not aligned, keeping separate things separate actually helps
with overall simplicity. Where there is overlap, I am certainly happy
to see common functionality reused: for example, Open vSwitch uses tc
for its QoS capabilities.
In the future, I expect there to be an even clearer delineation
between the various components. One of the primary use cases of Open
vSwitch at the moment is for virtualized data center networking but a
few of the other potential uses that have been brought up include
security processing (involving sending traffic of interest to
userspace) and configuring SR-IOV NICs (to appropriately program rules
in hardware). You can see how each of these makes sense in the
context of a virtual switch datapath but less so as a set of tc
actions.
So, in short, I don't see this as something lacking in Linux, just
complementary functionality.
^ permalink raw reply
* Re: VLAN packets silently dropped in promiscuous mode
From: Jesse Gross @ 2010-10-15 21:33 UTC (permalink / raw)
To: Guillaume Gaudonville; +Cc: Roger Luethi, netdev, Patrick McHardy
In-Reply-To: <4CB81BF1.1050906@6wind.com>
On Fri, Oct 15, 2010 at 2:16 AM, Guillaume Gaudonville
<guillaume.gaudonville@6wind.com> wrote:
> Jesse Gross wrote:
>>
>> On Thu, Sep 30, 2010 at 1:07 AM, Roger Luethi <rl@hellgate.ch> wrote:
>>
>>>
>>> On Wed, 29 Sep 2010 10:44:26 -0700, Jesse Gross wrote:
>>>
>>>>
>>>> On Wed, Sep 29, 2010 at 4:37 AM, Roger Luethi <rl@hellgate.ch> wrote:
>>>>
>>>>>
>>>>> I noticed packets for unknown VLANs getting silently dropped even in
>>>>> promiscuous mode (this is true only for the hardware accelerated path).
>>>>> netif_nit_deliver was introduced specifically to prevent that, but the
>>>>> function gets called only _after_ packets from unknown VLANs have been
>>>>> dropped.
>>>>>
>>>>
>>>> Some drivers are fixing this on a case by case basis by disabling
>>>> hardware accelerated VLAN stripping when in promiscuous mode, i.e.:
>>>>
>>>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f6c01819979afbfec7e0b15fe52371b8eed87e8
>>>>
>>>> However, at this point it is more or less random which drivers do
>>>> this. It would obviously be much better if it were consistent.
>>>>
>>>
>>> My understanding is this. Hardware VLAN tagging and stripping can always
>>> be
>>> enabled. The kernel passes 802.1Q information along with the stripped
>>> header to libpcap which reassembles the original header where necessary.
>>> Works for me.
>>>
>>
>> Sorry, I misread your original post as saying that the VLAN header
>> gets dropped, rather than the entire packet. I agree that this is how
>> it should work but not necessarily how it does work (again, depending
>> on the driver). Here's the problem that I was talking about:
>>
>> Most drivers have a snippet of code that looks something like this
>> (taken from ixgbe):
>>
>> if (adapter->vlgrp && is_vlan && (tag & VLAN_VID_MASK))
>> vlan_gro_receive(napi, adapter->vlgrp, tag, skb);
>> else
>> napi_gro_receive(napi, skb);
>>
>> At this point the VLAN has already been stripped in hardware. If
>> there is no VLAN group configured on the device then we hit the second
>> case. The VLAN header was removed from the SKB and the tag variable
>> is unused. It is no longer possible for libpcap to reconstruct the
>> header because the information was thrown away (even the fact that
>> there was a VLAN tag at all).
>>
>> There are a couple ways to fix this:
>>
>> * Turn off VLAN stripping when in promiscuous mode (as done by the ixgbe
>> driver)
>>
>
> This is not totally true: if changing the MTU ixgbe_change_mtu will call:
> ixgbe_reinit_locked--> ixgbe_up --> ixgbe_configure:
> --> ixgbe_set_rx_mode: flag IFF_PROMISC is tested
> ixgbe_vlan_filter_enable is not called
> --> ixgbe_restore_vlan --> ixgbe_vlan_rx_register: flag
> IFF_PROMISC is not tested ixgbe_vlan_filter_enable
> will be called.
>
> In fact it should happen each time we configure something which needs a
> reset of the device. Why don't add a test
> on flag promiscuous directly in ixgbe_vlan_filter_enable? Or do it on each
> call, if we want to allow a device in promiscuous
> mode to enable this feature.
>
> What do you think?
I can believe that there are paths that lead to this not working
correctly. That was actually my larger point: this is something that
is commonly not implemented correctly in drivers. Rather than try to
study every driver my goal is to just avoid the problem completely by
handling vlan acceleration centrally in the networking core. I sent
out an RFC patch series a few days ago that should solve this problem:
http://marc.info/?l=linux-netdev&m=128700022614170&w=3
^ permalink raw reply
* Re: [PATCH net-next 3/5] tipc: Optimizations to bearer enabling logic
From: Paul Gortmaker @ 2010-10-15 21:31 UTC (permalink / raw)
To: Neil Horman; +Cc: davem, netdev, allan.stephens
In-Reply-To: <20101015110033.GC22294@hmsreliant.think-freely.org>
On 10-10-15 07:00 AM, Neil Horman wrote:
[...]
> This definately looks more concise, but I don't see why its necessecary to drop
> the tipc_net_lock around the call to enable_bearer. The only caler of
> tipc_register_media sets the enable_bearer pointer to the enable_bearer
> function, and I' don't see any path through that function which would
> potentially retake that lock. In fact it seems dropping it might be dangerous,
> if other paths (like from cfg_named_msg_event), tried to enable a bearer in
> parallel with a user space directive from the netlink socket). With out the
> protection of tipc_net_lock, you could use the same eth_bearer twice, and
> corrupt that array.
I think it would be protected by config_lock. but in the end if it is
just an academic optimization that really isn't in a hot code path
anyway, and if it just adds more confusion than real world value, then
I'm fine with just dropping this on the floor (and deleting the extra
memset in a cleanup patch) -- it won't be the 1st time doing this with
these carry forward patches, and I'm sure it won't be the last.
Thanks,
Paul.
>
> Neil
>
^ permalink raw reply
* Re: [PATCH net-next] vmxnet3: make bit twiddle routines inline
From: Harvey Harrison @ 2010-10-15 21:22 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Shreyas Bhatewara, David S. Miller, VMware, Inc., netdev
In-Reply-To: <20101015140620.63d0a615@nehalam>
On Fri, Oct 15, 2010 at 2:06 PM, Stephen Hemminger
<shemminger@vyatta.com> wrote:
> +static inline void set_flag_le16(__le16 *data, u16 flag)
> +{
> + *data = cpu_to_le16(le16_to_cpu(*data) | flag);
> +}
> +
Instead of swapping twice on BE machines, why not:
*data |= cpu_to_le16(flag);
Which may even get done away with at compile time if flag is a constant.
Similarly for the others.
Cheers,
Harvey
^ permalink raw reply
* RE: [PATCH net-next] vmxnet3: make bit twiddle routines inline
From: Shreyas Bhatewara @ 2010-10-15 21:14 UTC (permalink / raw)
To: Stephen Hemminger, David S. Miller; +Cc: VMware, Inc., netdev@vger.kernel.org
In-Reply-To: <20101015140620.63d0a615@nehalam>
Thanks for the change Stephen. Looks good.
Acked-by: Shreyas Bhatewara <sbhatewara@vmware.com>
> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@vyatta.com]
> Sent: Friday, October 15, 2010 2:06 PM
> To: Shreyas Bhatewara; David S. Miller
> Cc: VMware, Inc.; netdev@vger.kernel.org
> Subject: [PATCH net-next] vmxnet3: make bit twiddle routines inline
>
> Gcc doesn't usually handle inline across compilation units, and the
> functions don't have to be global in scope. Move the set/reset flag
> functions int the existing vmxnet3 header.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> ---
> drivers/net/vmxnet3/vmxnet3_drv.c | 17 -----------------
> drivers/net/vmxnet3/vmxnet3_int.h | 17 ++++++++++++++---
> 2 files changed, 14 insertions(+), 20 deletions(-)
>
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c 2010-10-15 13:58:23.378722695
> -0700
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c 2010-10-15 13:59:32.724873755
> -0700
> @@ -1548,23 +1548,6 @@ vmxnet3_free_irqs(struct vmxnet3_adapter
> }
> }
>
> -
> -inline void set_flag_le16(__le16 *data, u16 flag)
> -{
> - *data = cpu_to_le16(le16_to_cpu(*data) | flag);
> -}
> -
> -inline void set_flag_le64(__le64 *data, u64 flag)
> -{
> - *data = cpu_to_le64(le64_to_cpu(*data) | flag);
> -}
> -
> -inline void reset_flag_le64(__le64 *data, u64 flag)
> -{
> - *data = cpu_to_le64(le64_to_cpu(*data) & ~flag);
> -}
> -
> -
> static void
> vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group
> *grp)
> {
> --- a/drivers/net/vmxnet3/vmxnet3_int.h 2010-10-15 13:58:23.390723065
> -0700
> +++ b/drivers/net/vmxnet3/vmxnet3_int.h 2010-10-15 13:59:46.329296549
> -0700
> @@ -353,9 +353,20 @@ struct vmxnet3_adapter {
> #define VMXNET3_MAX_ETH_HDR_SIZE 22
> #define VMXNET3_MAX_SKB_BUF_SIZE (3*1024)
>
> -void set_flag_le16(__le16 *data, u16 flag);
> -void set_flag_le64(__le64 *data, u64 flag);
> -void reset_flag_le64(__le64 *data, u64 flag);
> +static inline void set_flag_le16(__le16 *data, u16 flag)
> +{
> + *data = cpu_to_le16(le16_to_cpu(*data) | flag);
> +}
> +
> +static inline void set_flag_le64(__le64 *data, u64 flag)
> +{
> + *data = cpu_to_le64(le64_to_cpu(*data) | flag);
> +}
> +
> +static inline void reset_flag_le64(__le64 *data, u64 flag)
> +{
> + *data = cpu_to_le64(le64_to_cpu(*data) & ~flag);
> +}
>
> int
> vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter);
^ permalink raw reply
* Re: large divisor for flow classifier
From: Jarek Poplawski @ 2010-10-15 21:10 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Jonathan Thibault, Patrick McHardy, netdev
In-Reply-To: <1287172905.2799.8.camel@edumazet-laptop>
Eric Dumazet wrote:
> Le vendredi 15 octobre 2010 à 14:14 -0400, Jonathan Thibault a écrit :
>> It appears that when setting a fairly large divisor on the flow classifier for sfq, traffic stops altogether.
>>
>> On my machine, anything above divisor 2200 seems to stop all traffic. If I want to be fair between hosts (but not flows) for a large network (say 6000 hosts), I run into problems. Obviously the rates here are quite low but this is just an example.
...
> SFQ is limited to a 1024 divisor
>
> You might try following patch :
>
> (8192 is the smallest power of two greater than 6144)
>
> sizeof(struct sfq_sched_data) becomes 0x2ccc instead of 0x10cc
>
> keep in mind hash distribution is not perfect.
>
> What would be the real rate ?
>
>
> diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
> index 3cf478d..c4a53d6 100644
> --- a/net/sched/sch_sfq.c
> +++ b/net/sched/sch_sfq.c
> @@ -77,7 +77,7 @@
> It is easy to increase these values, but not in flight. */
>
> #define SFQ_DEPTH 128
> -#define SFQ_HASH_DIVISOR 1024
> +#define SFQ_HASH_DIVISOR 8192
Because of low SFQ_DEPTH, which limits its queue to 127 packets,
SFQ isn't suitable for serving so many users. There is sch_drr as
a replacement, alas more complex and undocumented, but google should
help you enough.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=13d2a1d2b032de08d7dcab6a1edcd47802681f96
Jarek P.
^ permalink raw reply
* [PATCH net-next] pch_gbe: make local functions static
From: Stephen Hemminger @ 2010-10-15 21:09 UTC (permalink / raw)
To: David Miller, Masayuki Ohtake; +Cc: netdev
Make routines that are only used in one file static.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/pch_gbe/pch_gbe.h | 4 +---
drivers/net/pch_gbe/pch_gbe_api.c | 2 +-
drivers/net/pch_gbe/pch_gbe_main.c | 26 +++++++++++++++-----------
3 files changed, 17 insertions(+), 15 deletions(-)
--- a/drivers/net/pch_gbe/pch_gbe.h 2010-10-15 13:56:27.823153599 -0700
+++ b/drivers/net/pch_gbe/pch_gbe.h 2010-10-15 13:56:34.519359889 -0700
@@ -644,9 +644,7 @@ extern void pch_gbe_free_tx_resources(st
extern void pch_gbe_free_rx_resources(struct pch_gbe_adapter *adapter,
struct pch_gbe_rx_ring *rx_ring);
extern void pch_gbe_update_stats(struct pch_gbe_adapter *adapter);
-extern int pch_gbe_mdio_read(struct net_device *netdev, int addr, int reg);
-extern void pch_gbe_mdio_write(struct net_device *netdev, int addr, int reg,
- int data);
+
/* pch_gbe_param.c */
extern void pch_gbe_check_options(struct pch_gbe_adapter *adapter);
--- a/drivers/net/pch_gbe/pch_gbe_api.c 2010-10-15 13:54:46.088037739 -0700
+++ b/drivers/net/pch_gbe/pch_gbe_api.c 2010-10-15 13:54:57.484377021 -0700
@@ -97,7 +97,7 @@ static const struct pch_gbe_functions pc
* pch_gbe_plat_init_function_pointers - Init func ptrs
* @hw: Pointer to the HW structure
*/
-void pch_gbe_plat_init_function_pointers(struct pch_gbe_hw *hw)
+static void pch_gbe_plat_init_function_pointers(struct pch_gbe_hw *hw)
{
/* Set PHY parameter */
hw->phy.reset_delay_us = PCH_GBE_PHY_RESET_DELAY_US;
--- a/drivers/net/pch_gbe/pch_gbe_main.c 2010-10-15 13:54:03.014763090 -0700
+++ b/drivers/net/pch_gbe/pch_gbe_main.c 2010-10-15 13:57:16.992669897 -0700
@@ -85,6 +85,9 @@ const char pch_driver_version[] = DRV_VE
static unsigned int copybreak __read_mostly = PCH_GBE_COPYBREAK_DEFAULT;
+static int pch_gbe_mdio_read(struct net_device *netdev, int addr, int reg);
+static void pch_gbe_mdio_write(struct net_device *netdev, int addr, int reg,
+ int data);
/**
* pch_gbe_mac_read_mac_addr - Read MAC address
* @hw: Pointer to the HW structure
@@ -114,7 +117,7 @@ s32 pch_gbe_mac_read_mac_addr(struct pch
* @reg: Pointer of register
* @busy: Busy bit
*/
-void pch_gbe_wait_clr_bit(void *reg, u32 bit)
+static void pch_gbe_wait_clr_bit(void *reg, u32 bit)
{
u32 tmp;
/* wait busy */
@@ -130,7 +133,7 @@ void pch_gbe_wait_clr_bit(void *reg, u32
* @addr: Pointer to the MAC address
* @index: MAC address array register
*/
-void pch_gbe_mac_mar_set(struct pch_gbe_hw *hw, u8 * addr, u32 index)
+static void pch_gbe_mac_mar_set(struct pch_gbe_hw *hw, u8 * addr, u32 index)
{
u32 mar_low, mar_high, adrmask;
@@ -161,7 +164,7 @@ void pch_gbe_mac_mar_set(struct pch_gbe_
* pch_gbe_mac_reset_hw - Reset hardware
* @hw: Pointer to the HW structure
*/
-void pch_gbe_mac_reset_hw(struct pch_gbe_hw *hw)
+static void pch_gbe_mac_reset_hw(struct pch_gbe_hw *hw)
{
/* Read the MAC address. and store to the private data */
pch_gbe_mac_read_mac_addr(hw);
@@ -180,7 +183,7 @@ void pch_gbe_mac_reset_hw(struct pch_gbe
* @hw: Pointer to the HW structure
* @mar_count: Receive address registers
*/
-void pch_gbe_mac_init_rx_addrs(struct pch_gbe_hw *hw, u16 mar_count)
+static void pch_gbe_mac_init_rx_addrs(struct pch_gbe_hw *hw, u16 mar_count)
{
u32 i;
@@ -206,9 +209,9 @@ void pch_gbe_mac_init_rx_addrs(struct pc
* @mar_used_count: The first MAC Address register free to program
* @mar_total_num: Total number of supported MAC Address Registers
*/
-void pch_gbe_mac_mc_addr_list_update(struct pch_gbe_hw *hw,
- u8 *mc_addr_list, u32 mc_addr_count,
- u32 mar_used_count, u32 mar_total_num)
+static void pch_gbe_mac_mc_addr_list_update(struct pch_gbe_hw *hw,
+ u8 *mc_addr_list, u32 mc_addr_count,
+ u32 mar_used_count, u32 mar_total_num)
{
u32 i, adrmask;
@@ -285,7 +288,7 @@ s32 pch_gbe_mac_force_mac_fc(struct pch_
* @hw: Pointer to the HW structure
* @wu_evt: Wake up event
*/
-void pch_gbe_mac_set_wol_event(struct pch_gbe_hw *hw, u32 wu_evt)
+static void pch_gbe_mac_set_wol_event(struct pch_gbe_hw *hw, u32 wu_evt)
{
u32 addr_mask;
@@ -359,7 +362,7 @@ u16 pch_gbe_mac_ctrl_miim(struct pch_gbe
* pch_gbe_mac_set_pause_packet - Set pause packet
* @hw: Pointer to the HW structure
*/
-void pch_gbe_mac_set_pause_packet(struct pch_gbe_hw *hw)
+static void pch_gbe_mac_set_pause_packet(struct pch_gbe_hw *hw)
{
unsigned long tmp2, tmp3;
@@ -482,7 +485,7 @@ static int pch_gbe_init_phy(struct pch_g
* 0: Successfully
* Negative value: Failed
*/
-int pch_gbe_mdio_read(struct net_device *netdev, int addr, int reg)
+static int pch_gbe_mdio_read(struct net_device *netdev, int addr, int reg)
{
struct pch_gbe_adapter *adapter = netdev_priv(netdev);
struct pch_gbe_hw *hw = &adapter->hw;
@@ -498,7 +501,8 @@ int pch_gbe_mdio_read(struct net_device
* @reg: Access location
* @data: Write data
*/
-void pch_gbe_mdio_write(struct net_device *netdev, int addr, int reg, int data)
+static void pch_gbe_mdio_write(struct net_device *netdev,
+ int addr, int reg, int data)
{
struct pch_gbe_adapter *adapter = netdev_priv(netdev);
struct pch_gbe_hw *hw = &adapter->hw;
^ permalink raw reply
* [PATCH net-next] vmxnet3: make bit twiddle routines inline
From: Stephen Hemminger @ 2010-10-15 21:06 UTC (permalink / raw)
To: Shreyas Bhatewara, David S. Miller; +Cc: VMware, Inc., netdev
Gcc doesn't usually handle inline across compilation units, and the
functions don't have to be global in scope. Move the set/reset flag
functions int the existing vmxnet3 header.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 17 -----------------
drivers/net/vmxnet3/vmxnet3_int.h | 17 ++++++++++++++---
2 files changed, 14 insertions(+), 20 deletions(-)
--- a/drivers/net/vmxnet3/vmxnet3_drv.c 2010-10-15 13:58:23.378722695 -0700
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c 2010-10-15 13:59:32.724873755 -0700
@@ -1548,23 +1548,6 @@ vmxnet3_free_irqs(struct vmxnet3_adapter
}
}
-
-inline void set_flag_le16(__le16 *data, u16 flag)
-{
- *data = cpu_to_le16(le16_to_cpu(*data) | flag);
-}
-
-inline void set_flag_le64(__le64 *data, u64 flag)
-{
- *data = cpu_to_le64(le64_to_cpu(*data) | flag);
-}
-
-inline void reset_flag_le64(__le64 *data, u64 flag)
-{
- *data = cpu_to_le64(le64_to_cpu(*data) & ~flag);
-}
-
-
static void
vmxnet3_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
{
--- a/drivers/net/vmxnet3/vmxnet3_int.h 2010-10-15 13:58:23.390723065 -0700
+++ b/drivers/net/vmxnet3/vmxnet3_int.h 2010-10-15 13:59:46.329296549 -0700
@@ -353,9 +353,20 @@ struct vmxnet3_adapter {
#define VMXNET3_MAX_ETH_HDR_SIZE 22
#define VMXNET3_MAX_SKB_BUF_SIZE (3*1024)
-void set_flag_le16(__le16 *data, u16 flag);
-void set_flag_le64(__le64 *data, u64 flag);
-void reset_flag_le64(__le64 *data, u64 flag);
+static inline void set_flag_le16(__le16 *data, u16 flag)
+{
+ *data = cpu_to_le16(le16_to_cpu(*data) | flag);
+}
+
+static inline void set_flag_le64(__le64 *data, u64 flag)
+{
+ *data = cpu_to_le64(le64_to_cpu(*data) | flag);
+}
+
+static inline void reset_flag_le64(__le64 *data, u64 flag)
+{
+ *data = cpu_to_le64(le64_to_cpu(*data) & ~flag);
+}
int
vmxnet3_quiesce_dev(struct vmxnet3_adapter *adapter);
^ permalink raw reply
* [PATCH net-next] bonding: make bond_resend_igmp_join_requests_delayed static
From: Stephen Hemminger @ 2010-10-15 21:02 UTC (permalink / raw)
To: David Miller, Jay Vosburgh, netdev; +Cc: bonding-devel
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/bonding/bond_main.c 2010-10-15 13:52:01.747192520 -0700
+++ b/drivers/net/bonding/bond_main.c 2010-10-15 13:52:39.004286643 -0700
@@ -914,7 +914,7 @@ static void bond_resend_igmp_join_reques
read_unlock(&bond->lock);
}
-void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
+static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
{
struct bonding *bond = container_of(work, struct bonding,
mcast_work.work);
^ permalink raw reply
* pull request: wireless-next-2.6 2010-10-15
From: John W. Linville @ 2010-10-15 20:40 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
Dave,
Here is the latest batch of updates intended for 2.6.37. As usual,
it is primarily a bunch of driver updates and fixes to code already
in -next. This also includes a batch of Bluetooth updates courtesy
of Gustavo Padovan. There is also the movement of the wl1251 driver
out of the wl12xx directory. This is a prelude to the expansion of
the wl1271 code to cover some new hardware, all of which is actually
largely unrelated to wl1251.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 7662ff46b7b3678162ce125903115e4ab0607a2d:
ixgbe: DCB: remove DCB check config (2010-10-15 09:27:38 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git for-davem
Andrei Emeltchenko (4):
Bluetooth: remove extra newline from debug output
Bluetooth: check L2CAP length in first ACL fragment
Bluetooth: check for l2cap header in start fragment
Bluetooth: clean up rfcomm code
Ben Greear (9):
mac80211: Improve mlme probe response log messages.
wireless: Set some stats used by /proc/net/wireless (wext)
ath5k: Print out opmode in debugfs.
ath5k: Adjust opmode when interfaces are removed.
wireless: Print wiphy name in sysfs.
ath5k: Move debugfs under ieee80211/[wiphy-name]
ath9k: Fix potential use-after-free.
ath9k: Remove bf_dmacontext.
ath9k: Null out references to stale pointers.
Björn Smedman (3):
mac80211: minstrel_ht A-MPDU fix
ath9k: A-MPDU rate control info fix
ath9k: built-in rate control A-MPDU fix
Christian Lamparter (5):
mac80211: fix possible null-pointer de-reference
mac80211: temporarily disable reorder release timer
carl9170: common error path for bad frames
carl9170: remove stale rx error path
carl9170: A-MPDU frame type filter
David Vrabel (2):
Bluetooth: HCI devices are either BR/EDR or AMP radios
Bluetooth: Support SDIO devices that are AMP controllers
Felix Fietkau (14):
ath9k_hw: store the clock rate in common data on channel changes
ath5k: store the clock rate in common data on channel changes
ath9k_hw: move the cycle counter tracking to ath
ath5k: use the common cycle counter / listen time implementation
cfg80211: add channel utilization stats to the survey command
ath9k: add compile time checking for the size of the channel list
ath9k: implement channel utilization stats for survey
ath9k: do not track cycle counter updates in powersave mode
ath9k_hw: fix division by zero in the ANI monitor code
ath9k_hw: fix PHY counter overflow handling in ANI v1
ath9k: add missing locking around ath9k_hw_proc_mib_event
ath9k: make rate control debugfs stats per station
ath9k: remove sc->cur_rate_table and sc->cur_rate_mode
ath9k_hw: remove enum wireless_mode and its users
Gerrit Renker (1):
wext: fix alignment problem in serializing 'struct iw_point'
Gustavo F. Padovan (4):
Bluetooth: remove unused variable from cmtp
Bluetooth: make batostr() print in the right order
Bluetooth: Use the proper error value from bt_skb_send_alloc()
Bluetooth: update MAINTAINERS for Bluetooth subsys
Haijun Liu (1):
Bluetooth: Update conf_state before send config_req out
Helmut Schaa (6):
rt2x00: Shortcut link state updates when not operating as STA
rt2x00: Optimize unmapping of skbs
rt2x00: Use proper type for rxwi_w2 in rt2800_agc_to_rssi
rt2x00: Use unlikely for error case in rt2x00queue_write_tx_frame
rt2x00: Remove superfluous initialization of qidx
rt2x00: Fix tx status handling in rt2800pci
Ivo van Doorn (7):
rt2x00: Simplify Queue function arguments
rt2x00: Move watchdog work to kernel work_queue
rt2x00: Validate MCS on RX path
rt2x00: Fix dead queue when skb allocation failed
rt2x00: Make queue_entry flags access atomic
rt2x00: Don't perform watchdog checks on empty queue
rt2x00: Fix URB error handling
Jiri Slaby (1):
WIRELESS: at76c50x, remove unneeded NULL check
Joe Perches (1):
ath5k: fix build break from "ath5k: Print out opmode in debugfs"
Johan Hedberg (1):
Bluetooth: Don't clear the blacklist when closing the HCI device
Johannes Berg (32):
iwlagn: rename iwl_commit_rxon
iwlwifi: introduce post_scan hook
iwl3945: use iwl3945_commit_rxon
iwlwifi: move chain settings to agn
iwlwifi: rename iwl_mac_beacon_update
iwlwifi: remove verify_signature eeprom operation
iwlwifi: move agn specific station code there
iwlwifi: move tx fail code to agn
iwlwifi: remove spurious exports
iwlwifi: remove agn rates info there
iwlwifi: move iwl_toggle_rx_ant to agn
iwlwifi: move iwl_dump_csr to agn
iwlwifi: move iwl_dump_fh to agn
iwlwifi: remove set_ct_kill operation
iwlwifi: remove set_pwr_src operation
iwlwifi: remove apm_ops.stop
iwlwifi: clean up declarations
iwlwifi: remove iwl_check_bits
iwlwifi: fix dual-mode scanning
Revert "wireless: Use first phyX name available when registering phy devices."
mac80211: don't kmalloc 16 bytes
iwl3945: fix queue allocation
cfg80211: notify drivers about frame registrations
mac80211: add probe request filter flag
mac80211: fix SMPS request
iwlwifi: allow probe-after-rx on 2.4 GHz
iwlwifi: rename ibss_beacon variable
iwlwifi: clean up some beacon handling
iwlwifi: rewrite RXON checks
iwlwifi: blink LED in IBSS mode
iwlagn: check beacon frame size
radiotap: fix vendor namespace parsing
John W. Linville (4):
Merge branch 'wireless-next' of git://git.kernel.org/.../luca/wl12xx
Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
Merge branch 'master' of git://git.kernel.org/.../padovan/bluetooth-next-2.6 into for-davem
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6 into for-davem
Jouni Malinen (1):
ath9k: Set RX filter for Probe Request based on filter flag
Julia Lawall (1):
drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure
Kalle Valo (3):
wl1251: create a copy of wl12xx_80211.h for wl1251
wl1251: move to it's own directory
wl1251: update the new location to the maintainers file
Karl Beldan (1):
Bluetooth: hci_uart: Fix typo in stats for sco tx
Luis R. Rodriguez (1):
ath9k_hw: remove AR9003 2.0 support
Mat Martineau (4):
Bluetooth: Validate PSM values in calls to connect() and bind()
Bluetooth: Add common code for stream-oriented recvmsg()
Bluetooth: Use common SOCK_STREAM receive code in RFCOMM
Bluetooth: Use a stream-oriented recvmsg with SOCK_STREAM L2CAP sockets.
Mohammed Shafi Shajakhan (1):
ath9k: Fix documentation in rate control
Nobuhiro Iwamatsu (2):
Bluetooth: Add support Bluetooth controller of MacbookPro 6,2
Bluetooth: Add support Bluetooth controller of MacbookPro 7,1
Ohad Ben-Cohen (2):
wl1271: sdio: enable runtime PM
wl1271: sdio: add suspend/resume support
Paul Fox (1):
libertas: Communicate USB transfer errors
Rafał Miłecki (8):
b43: N-PHY: grab more info about new channel
b43: N-PHY: store info about current channel's type
b43: N-PHY: fix logic in band switching
b43: N-PHY: prepare for rev3+ channel tables
b43: N-PHY: replace N-specific radio_chanspec with common code
b43: N-PHY: fix typo: read table when caching IQ LO calibration (do not write)
b43: N-PHY: put radio-specific code in separated file
b43: N-PHY: put 2056-radio's specific code in separated file
Rajkumar Manoharan (1):
ath9k_htc: set probe request rx filter
Shanyu Zhao (2):
iwlagn: fix default calibration table size
iwlagn: add temperature offset calib for 6000g2
Steve deRosier (1):
mac80211: Update mesh constants to approved IEEE ANA values
Wey-Yi Guy (6):
iwlagn: no version check for experimental uCode
iiwlagn: always download priority table
iwlagn: prio_tbl need to download before calibration
iwlgn: need longer tx queue stuck timer for coex devices
iwlagn: 6050 ops should be used;
iwlwifi: move agn only eeprom functions to separate file
Yuri Kululin (1):
Bluetooth: Fix RFCOMM RPN negotiation
MAINTAINERS | 8 +-
drivers/bluetooth/btmrvl_main.c | 4 +-
drivers/bluetooth/btsdio.c | 8 +
drivers/bluetooth/btusb.c | 6 +
drivers/bluetooth/hci_ldisc.c | 2 +-
drivers/net/wireless/Kconfig | 1 +
drivers/net/wireless/Makefile | 1 +
drivers/net/wireless/at76c50x-usb.c | 3 +-
drivers/net/wireless/ath/ath.h | 16 +
drivers/net/wireless/ath/ath5k/ani.c | 41 +-
drivers/net/wireless/ath/ath5k/ani.h | 5 +-
drivers/net/wireless/ath/ath5k/ath5k.h | 2 +-
drivers/net/wireless/ath/ath5k/base.c | 71 +-
drivers/net/wireless/ath/ath5k/debug.c | 49 +-
drivers/net/wireless/ath/ath5k/debug.h | 12 -
drivers/net/wireless/ath/ath5k/pcu.c | 13 +-
drivers/net/wireless/ath/ath5k/phy.c | 1 +
drivers/net/wireless/ath/ath9k/ani.c | 101 +-
drivers/net/wireless/ath/ath9k/ani.h | 8 -
.../net/wireless/ath/ath9k/ar9003_2p0_initvals.h | 1784 --------------------
drivers/net/wireless/ath/ath9k/ar9003_hw.c | 162 +--
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 7 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 7 +-
drivers/net/wireless/ath/ath9k/beacon.c | 21 +-
drivers/net/wireless/ath/ath9k/debug.c | 93 -
drivers/net/wireless/ath/ath9k/debug.h | 21 -
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 12 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 1 +
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 3 +-
drivers/net/wireless/ath/ath9k/hw.c | 66 +-
drivers/net/wireless/ath/ath9k/hw.h | 21 +-
drivers/net/wireless/ath/ath9k/init.c | 16 +-
drivers/net/wireless/ath/ath9k/main.c | 179 ++-
drivers/net/wireless/ath/ath9k/rc.c | 184 ++-
drivers/net/wireless/ath/ath9k/rc.h | 26 +-
drivers/net/wireless/ath/ath9k/recv.c | 10 +-
drivers/net/wireless/ath/ath9k/reg.h | 14 -
drivers/net/wireless/ath/ath9k/xmit.c | 38 +-
drivers/net/wireless/ath/carl9170/rx.c | 89 +-
drivers/net/wireless/ath/carl9170/wlan.h | 14 +-
drivers/net/wireless/ath/debug.c | 29 +
drivers/net/wireless/ath/debug.h | 10 +
drivers/net/wireless/ath/hw.c | 59 +
drivers/net/wireless/ath/reg.h | 11 +
drivers/net/wireless/b43/Makefile | 2 +
drivers/net/wireless/b43/phy_common.h | 5 +-
drivers/net/wireless/b43/phy_n.c | 128 +-
drivers/net/wireless/b43/phy_n.h | 218 +---
drivers/net/wireless/b43/radio_2055.c | 1332 +++++++++++++++
drivers/net/wireless/b43/radio_2055.h | 254 +++
drivers/net/wireless/b43/radio_2056.c | 43 +
drivers/net/wireless/b43/radio_2056.h | 42 +
drivers/net/wireless/b43/tables_nphy.c | 1311 +--------------
drivers/net/wireless/b43/tables_nphy.h | 59 +-
drivers/net/wireless/iwlwifi/Makefile | 2 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 7 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 76 +-
drivers/net/wireless/iwlwifi/iwl-3945.h | 9 +-
drivers/net/wireless/iwlwifi/iwl-4965.c | 27 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 14 +-
drivers/net/wireless/iwlwifi/iwl-6000.c | 62 +-
drivers/net/wireless/iwlwifi/iwl-agn-calib.c | 2 +-
.../iwlwifi/{iwl-calib.h => iwl-agn-calib.h} | 4 +
drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c | 454 +++++
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 9 +-
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 372 ++++-
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 69 +
drivers/net/wireless/iwlwifi/iwl-agn-rs.h | 10 -
drivers/net/wireless/iwlwifi/iwl-agn-rx.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 716 ++++++++
drivers/net/wireless/iwlwifi/iwl-agn-tt.c | 5 -
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 40 +
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 28 +
drivers/net/wireless/iwlwifi/iwl-agn.c | 106 +-
drivers/net/wireless/iwlwifi/iwl-agn.h | 71 +
drivers/net/wireless/iwlwifi/iwl-commands.h | 13 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 531 +-----
drivers/net/wireless/iwlwifi/iwl-core.h | 49 +-
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 1 -
drivers/net/wireless/iwlwifi/iwl-dev.h | 16 +-
drivers/net/wireless/iwlwifi/iwl-eeprom.c | 381 +----
drivers/net/wireless/iwlwifi/iwl-eeprom.h | 8 +-
drivers/net/wireless/iwlwifi/iwl-helpers.h | 5 -
drivers/net/wireless/iwlwifi/iwl-rx.c | 1 -
drivers/net/wireless/iwlwifi/iwl-scan.c | 12 +-
drivers/net/wireless/iwlwifi/iwl-sta.c | 725 +--------
drivers/net/wireless/iwlwifi/iwl-sta.h | 35 +-
drivers/net/wireless/iwlwifi/iwl-tx.c | 38 -
drivers/net/wireless/iwlwifi/iwl3945-base.c | 97 +-
drivers/net/wireless/libertas/if_usb.c | 4 +-
drivers/net/wireless/p54/eeprom.c | 4 +-
drivers/net/wireless/rt2x00/rt2400pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2500pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2800lib.c | 2 +-
drivers/net/wireless/rt2x00/rt2800pci.c | 4 +-
drivers/net/wireless/rt2x00/rt2x00.h | 18 +-
drivers/net/wireless/rt2x00/rt2x00dev.c | 87 +-
drivers/net/wireless/rt2x00/rt2x00lib.h | 11 +-
drivers/net/wireless/rt2x00/rt2x00link.c | 12 +-
drivers/net/wireless/rt2x00/rt2x00pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2x00queue.c | 56 +-
drivers/net/wireless/rt2x00/rt2x00usb.c | 54 +-
drivers/net/wireless/wl1251/Kconfig | 33 +
drivers/net/wireless/wl1251/Makefile | 6 +
.../wireless/{wl12xx/wl1251_acx.c => wl1251/acx.c} | 8 +-
.../wireless/{wl12xx/wl1251_acx.h => wl1251/acx.h} | 2 +-
.../{wl12xx/wl1251_boot.c => wl1251/boot.c} | 12 +-
.../{wl12xx/wl1251_boot.h => wl1251/boot.h} | 0
.../wireless/{wl12xx/wl1251_cmd.c => wl1251/cmd.c} | 10 +-
.../wireless/{wl12xx/wl1251_cmd.h => wl1251/cmd.h} | 0
.../{wl12xx/wl1251_debugfs.c => wl1251/debugfs.c} | 6 +-
.../{wl12xx/wl1251_debugfs.h => wl1251/debugfs.h} | 0
.../{wl12xx/wl1251_event.c => wl1251/event.c} | 8 +-
.../{wl12xx/wl1251_event.h => wl1251/event.h} | 0
.../{wl12xx/wl1251_init.c => wl1251/init.c} | 8 +-
.../{wl12xx/wl1251_init.h => wl1251/init.h} | 0
.../wireless/{wl12xx/wl1251_io.c => wl1251/io.c} | 4 +-
.../wireless/{wl12xx/wl1251_io.h => wl1251/io.h} | 0
.../{wl12xx/wl1251_main.c => wl1251/main.c} | 20 +-
.../wireless/{wl12xx/wl1251_ps.c => wl1251/ps.c} | 8 +-
.../wireless/{wl12xx/wl1251_ps.h => wl1251/ps.h} | 2 +-
.../wireless/{wl12xx/wl1251_reg.h => wl1251/reg.h} | 0
.../wireless/{wl12xx/wl1251_rx.c => wl1251/rx.c} | 10 +-
.../wireless/{wl12xx/wl1251_rx.h => wl1251/rx.h} | 0
.../{wl12xx/wl1251_sdio.c => wl1251/sdio.c} | 0
.../wireless/{wl12xx/wl1251_spi.c => wl1251/spi.c} | 4 +-
.../wireless/{wl12xx/wl1251_spi.h => wl1251/spi.h} | 6 +-
.../wireless/{wl12xx/wl1251_tx.c => wl1251/tx.c} | 8 +-
.../wireless/{wl12xx/wl1251_tx.h => wl1251/tx.h} | 2 +-
drivers/net/wireless/{wl12xx => wl1251}/wl1251.h | 0
drivers/net/wireless/wl1251/wl12xx_80211.h | 156 ++
drivers/net/wireless/wl12xx/Kconfig | 34 -
drivers/net/wireless/wl12xx/Makefile | 9 -
drivers/net/wireless/wl12xx/wl1271_sdio.c | 43 +-
include/linux/ieee80211.h | 71 +-
include/linux/mmc/sdio_ids.h | 1 +
include/linux/nl80211.h | 15 +
include/linux/wireless.h | 2 +-
include/net/bluetooth/bluetooth.h | 2 +
include/net/bluetooth/hci.h | 2 +-
include/net/bluetooth/rfcomm.h | 5 -
include/net/cfg80211.h | 31 +
include/net/mac80211.h | 9 +-
net/bluetooth/af_bluetooth.c | 109 ++
net/bluetooth/cmtp/core.c | 6 +-
net/bluetooth/hci_core.c | 1 -
net/bluetooth/hci_sysfs.c | 21 +-
net/bluetooth/hidp/core.c | 8 +-
net/bluetooth/l2cap.c | 56 +-
net/bluetooth/lib.c | 4 +-
net/bluetooth/rfcomm/core.c | 39 +-
net/bluetooth/rfcomm/sock.c | 104 +--
net/bluetooth/rfcomm/tty.c | 4 +-
net/mac80211/cfg.c | 22 +-
net/mac80211/ht.c | 2 +
net/mac80211/ieee80211_i.h | 4 +-
net/mac80211/iface.c | 9 +-
net/mac80211/main.c | 3 +
net/mac80211/mesh_plink.c | 17 +-
net/mac80211/mlme.c | 18 +-
net/mac80211/rc80211_minstrel_ht.c | 7 +-
net/mac80211/rx.c | 24 +
net/mac80211/wep.c | 8 +-
net/wireless/core.c | 54 +-
net/wireless/mlme.c | 23 +-
net/wireless/nl80211.c | 15 +
net/wireless/radiotap.c | 58 +-
net/wireless/sysfs.c | 9 +
net/wireless/wext-compat.c | 4 +
169 files changed, 5491 insertions(+), 6553 deletions(-)
delete mode 100644 drivers/net/wireless/ath/ath9k/ar9003_2p0_initvals.h
create mode 100644 drivers/net/wireless/b43/radio_2055.c
create mode 100644 drivers/net/wireless/b43/radio_2055.h
create mode 100644 drivers/net/wireless/b43/radio_2056.c
create mode 100644 drivers/net/wireless/b43/radio_2056.h
rename drivers/net/wireless/iwlwifi/{iwl-calib.h => iwl-agn-calib.h} (95%)
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-sta.c
create mode 100644 drivers/net/wireless/wl1251/Kconfig
create mode 100644 drivers/net/wireless/wl1251/Makefile
rename drivers/net/wireless/{wl12xx/wl1251_acx.c => wl1251/acx.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_acx.h => wl1251/acx.h} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_boot.c => wl1251/boot.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_boot.h => wl1251/boot.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_cmd.c => wl1251/cmd.c} (98%)
rename drivers/net/wireless/{wl12xx/wl1251_cmd.h => wl1251/cmd.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_debugfs.c => wl1251/debugfs.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_debugfs.h => wl1251/debugfs.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_event.c => wl1251/event.c} (97%)
rename drivers/net/wireless/{wl12xx/wl1251_event.h => wl1251/event.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_init.c => wl1251/init.c} (98%)
rename drivers/net/wireless/{wl12xx/wl1251_init.h => wl1251/init.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_io.c => wl1251/io.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_io.h => wl1251/io.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_main.c => wl1251/main.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_ps.c => wl1251/ps.c} (97%)
rename drivers/net/wireless/{wl12xx/wl1251_ps.h => wl1251/ps.h} (97%)
rename drivers/net/wireless/{wl12xx/wl1251_reg.h => wl1251/reg.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_rx.c => wl1251/rx.c} (97%)
rename drivers/net/wireless/{wl12xx/wl1251_rx.h => wl1251/rx.h} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_sdio.c => wl1251/sdio.c} (100%)
rename drivers/net/wireless/{wl12xx/wl1251_spi.c => wl1251/spi.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_spi.h => wl1251/spi.h} (96%)
rename drivers/net/wireless/{wl12xx/wl1251_tx.c => wl1251/tx.c} (99%)
rename drivers/net/wireless/{wl12xx/wl1251_tx.h => wl1251/tx.h} (99%)
rename drivers/net/wireless/{wl12xx => wl1251}/wl1251.h (100%)
create mode 100644 drivers/net/wireless/wl1251/wl12xx_80211.h
Omnibus patch is available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-10-15.patch.bz2
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] PCI: MSI: Remove unsafe and unnecessary hardware access
From: Jesse Barnes @ 2010-10-15 20:06 UTC (permalink / raw)
To: Emil S Tantilov
Cc: Ben Hutchings, Michael Chan, Matthew Wilcox, linux-pci, NetDev,
Tantilov, Emil S, Jesse Brandeburg, Kirsher, Jeffrey T
In-Reply-To: <AANLkTi=F19SdRNfhQe_R9sqwqCbFtAUCFu+09KFgzdAK@mail.gmail.com>
On Fri, 15 Oct 2010 11:26:08 -0700
Emil S Tantilov <emils.tantilov@gmail.com> wrote:
> On Thu, Jun 17, 2010 at 12:16 PM, Ben Hutchings
> <bhutchings@solarflare.com> wrote:
> > During suspend on an SMP system, {read,write}_msi_msg_desc() may be
> > called to mask and unmask interrupts on a device that is already in a
> > reduced power state. At this point memory-mapped registers including
> > MSI-X tables are not accessible, and config space may not be fully
> > functional either.
> >
> > While a device is in a reduced power state its interrupts are
> > effectively masked and its MSI(-X) state will be restored when it is
> > brought back to D0. Therefore these functions can simply read and
> > write msi_desc::msg for devices not in D0.
> >
> > Further, read_msi_msg_desc() should only ever be used to update a
> > previously written message, so it can always read msi_desc::msg
> > and never needs to touch the hardware.
> >
> > Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> > ---
> > On Mon, 2010-06-14 at 18:13 -0700, Michael Chan wrote:
> >> I'm debugging the bnx2 driver which doesn't work after suspend/resume if
> >> it is running in MSI-X mode. The problem is that during suspend, the
> >> MSI-X vectors are disabled by the following sequence on x86:
> >>
> >> take_cpu_down() -> cpu_disable_common() -> fixup_irqs()
> >>
> >> The MSI-X address/data used to disable the vectors are remembered in the
> >> above sequence. During resume, these address/data are then programmed
> >> back to the device during pci_restore_state(), causing all the vectors
> >> to remain disabled.
> >
> > That's not quite what I see. What I see is that the message is read
> > back from the table *after* the driver's suspend method has been called.
> > At this point the device is already in D3 and memory-mapped registers
> > are not accessible, so we get random bits as the message. At least,
> > that's what I see happening with the sfc driver.
> >
> >> Some drivers call free_irq() during suspend and request_irq() during
> >> resume, and that should avoid the problem. bnx2 and some other drivers
> >> do not do that. These drivers rely on pci_restore_state() to restore
> >> the MSI-X vectors to the same working state before suspend.
> >>
> >> What's the right way to fix this? Thanks.
> >
> > This is my attempt, which works for sfc. See if it works for bnx2.
> >
> > Ben.
> >
> > drivers/pci/msi.c | 34 +++++++++++-----------------------
> > 1 files changed, 11 insertions(+), 23 deletions(-)
> >
> > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> > index 77b68ea..03f04dc 100644
> > --- a/drivers/pci/msi.c
> > +++ b/drivers/pci/msi.c
> > @@ -196,30 +196,15 @@ void unmask_msi_irq(unsigned int irq)
> > void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg)
> > {
> > struct msi_desc *entry = get_irq_desc_msi(desc);
> > - if (entry->msi_attrib.is_msix) {
> > - void __iomem *base = entry->mask_base +
> > - entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE;
> >
> > - msg->address_lo = readl(base + PCI_MSIX_ENTRY_LOWER_ADDR);
> > - msg->address_hi = readl(base + PCI_MSIX_ENTRY_UPPER_ADDR);
> > - msg->data = readl(base + PCI_MSIX_ENTRY_DATA);
> > - } else {
> > - struct pci_dev *dev = entry->dev;
> > - int pos = entry->msi_attrib.pos;
> > - u16 data;
> > + /* We do not touch the hardware (which may not even be
> > + * accessible at the moment) but return the last message
> > + * written. Assert that this is valid, assuming that
> > + * valid messages are not all-zeroes. */
> > + BUG_ON(!(entry->msg.address_hi | entry->msg.address_lo |
> > + entry->msg.data));
> >
> > - pci_read_config_dword(dev, msi_lower_address_reg(pos),
> > - &msg->address_lo);
> > - if (entry->msi_attrib.is_64) {
> > - pci_read_config_dword(dev, msi_upper_address_reg(pos),
> > - &msg->address_hi);
> > - pci_read_config_word(dev, msi_data_reg(pos, 1), &data);
> > - } else {
> > - msg->address_hi = 0;
> > - pci_read_config_word(dev, msi_data_reg(pos, 0), &data);
> > - }
> > - msg->data = data;
> > - }
> > + *msg = entry->msg;
> > }
> >
> > void read_msi_msg(unsigned int irq, struct msi_msg *msg)
> > @@ -232,7 +217,10 @@ void read_msi_msg(unsigned int irq, struct msi_msg *msg)
> > void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg)
> > {
> > struct msi_desc *entry = get_irq_desc_msi(desc);
> > - if (entry->msi_attrib.is_msix) {
> > +
> > + if (entry->dev->current_state != PCI_D0) {
>
> This check exposed a problem in ixgb (patch is on the way) where
> pci_disable_device() was not being called in ixgb_remove(). As a
> result the current_state was set to PCI_UNKNOWN and the interface
> failed to work on subsequent load of the driver.
>
> Even though the problem was in ixgb, it made me wonder about this
> check as the presumption here (low power state) may not always be
> true. Like in the case of unloading a driver, which sets
> dev->current_state to PCI_UNKNOWN which is not a representation of the
> _real_ state of the device (actual state could be D0).
>
> BTW - quick search shows other drivers that could potentially suffer
> the faith of ixgb due to lack of pci_disable_device() call on removal.
Yeah we just ran into this in the DRM layer as well; which does a
pci_enable_device but never calls _disable, so we're stuck with
potentially stale state.
I came up with the below to address that, but really I don't like the
idea of nested pci_enable_device() calls at all. But I haven't looked
at the latest Wireless USB stuff to see if those drivers still rely on
it.
--
Jesse Barnes, Intel Open Source Technology Center
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 7fa3cbd..37facc1 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -994,6 +994,18 @@ static int __pci_enable_device_flags(struct pci_dev *dev,
int err;
int i, bars = 0;
+ /*
+ * Power state could be unknown at this point, either due to a fresh
+ * boot or a device removal call. So get the current power state
+ * so that things like MSI message writing will behave as expected
+ * (e.g. if the device really is in D0 at enable time).
+ */
+ if (dev->pm_cap) {
+ u16 pmcsr;
+ pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
+ dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK);
+ }
+
if (atomic_add_return(1, &dev->enable_cnt) > 1)
return 0; /* already enabled */
^ permalink raw reply related
* Re: large divisor for flow classifier
From: Eric Dumazet @ 2010-10-15 20:01 UTC (permalink / raw)
To: Jonathan Thibault; +Cc: Patrick McHardy, netdev
In-Reply-To: <4CB899F7.0@navigue.com>
Le vendredi 15 octobre 2010 à 14:14 -0400, Jonathan Thibault a écrit :
> It appears that when setting a fairly large divisor on the flow classifier for sfq, traffic stops altogether.
>
> On my machine, anything above divisor 2200 seems to stop all traffic. If I want to be fair between hosts (but not flows) for a large network (say 6000 hosts), I run into problems. Obviously the rates here are quite low but this is just an example.
>
> I also tested on a real interface with the same results.
>
> Example that works:
>
> tc qdisc add dev ifb0 root handle 3: htb default 10
> tc class add dev ifb0 parent 3: classid 3:1 htb rate 80kbit
> tc class add dev ifb0 parent 3:1 classid 3:10 htb rate 80kbit
> tc qdisc add dev ifb0 parent 3:10 handle 310: sfq perturb 10
> tc filter add dev ifb0 parent 3: protocol all prio 1 u32 match mark 0x000 0xf00 flowid 3:10
> tc filter add dev ifb0 parent 310: protocol all handle 0x310 flow hash keys dst divisor 1024
>
> Example that doesn't work:
>
> tc qdisc add dev ifb0 root handle 3: htb default 10
> tc class add dev ifb0 parent 3: classid 3:1 htb rate 80kbit
> tc class add dev ifb0 parent 3:1 classid 3:10 htb rate 80kbit
> tc qdisc add dev ifb0 parent 3:10 handle 310: sfq perturb 10
> tc filter add dev ifb0 parent 3: protocol all prio 1 u32 match mark 0x000 0xf00 flowid 3:10
> tc filter add dev ifb0 parent 310: protocol all handle 0x310 flow hash keys dst divisor 6144
>
SFQ is limited to a 1024 divisor
You might try following patch :
(8192 is the smallest power of two greater than 6144)
sizeof(struct sfq_sched_data) becomes 0x2ccc instead of 0x10cc
keep in mind hash distribution is not perfect.
What would be the real rate ?
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 3cf478d..c4a53d6 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -77,7 +77,7 @@
It is easy to increase these values, but not in flight. */
#define SFQ_DEPTH 128
-#define SFQ_HASH_DIVISOR 1024
+#define SFQ_HASH_DIVISOR 8192
/* This type should contain at least SFQ_DEPTH*2 values */
typedef unsigned char sfq_index;
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox