* [PATCH 09/11] mwifiex: Remove extern from function prototypes
From: Joe Perches @ 2013-09-25 19:37 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Bing Zhao, John W. Linville, linux-wireless,
linux-kernel
In-Reply-To: <cover.1380137609.git.joe@perches.com>
There are a mix of function prototypes with and without extern
in the kernel sources. Standardize on not using extern for
function prototypes.
Function prototypes don't need to be written with extern.
extern is assumed by the compiler. Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/mwifiex/wmm.h | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/wmm.h b/drivers/net/wireless/mwifiex/wmm.h
index 644d6e0..0f129d4 100644
--- a/drivers/net/wireless/mwifiex/wmm.h
+++ b/drivers/net/wireless/mwifiex/wmm.h
@@ -83,11 +83,10 @@ mwifiex_wmm_is_ra_list_empty(struct list_head *ra_list_hhead)
}
void mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv,
- struct sk_buff *skb);
+ struct sk_buff *skb);
void mwifiex_ralist_add(struct mwifiex_private *priv, u8 *ra);
void mwifiex_rotate_priolists(struct mwifiex_private *priv,
- struct mwifiex_ra_list_tbl *ra,
- int tid);
+ struct mwifiex_ra_list_tbl *ra, int tid);
int mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter);
void mwifiex_wmm_process_tx(struct mwifiex_adapter *adapter);
@@ -95,21 +94,18 @@ int mwifiex_is_ralist_valid(struct mwifiex_private *priv,
struct mwifiex_ra_list_tbl *ra_list, int tid);
u8 mwifiex_wmm_compute_drv_pkt_delay(struct mwifiex_private *priv,
- const struct sk_buff *skb);
+ const struct sk_buff *skb);
void mwifiex_wmm_init(struct mwifiex_adapter *adapter);
-extern u32 mwifiex_wmm_process_association_req(struct mwifiex_private *priv,
- u8 **assoc_buf,
- struct ieee_types_wmm_parameter
- *wmmie,
- struct ieee80211_ht_cap
- *htcap);
+u32 mwifiex_wmm_process_association_req(struct mwifiex_private *priv,
+ u8 **assoc_buf,
+ struct ieee_types_wmm_parameter *wmmie,
+ struct ieee80211_ht_cap *htcap);
void mwifiex_wmm_setup_queue_priorities(struct mwifiex_private *priv,
- struct ieee_types_wmm_parameter
- *wmm_ie);
+ struct ieee_types_wmm_parameter *wmm_ie);
void mwifiex_wmm_setup_ac_downgrade(struct mwifiex_private *priv);
-extern int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv,
- const struct host_cmd_ds_command *resp);
+int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv,
+ const struct host_cmd_ds_command *resp);
#endif /* !_MWIFIEX_WMM_H_ */
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related
* [PATCH 10/11] orinoco: Remove extern from function prototypes
From: Joe Perches @ 2013-09-25 19:37 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, John W. Linville, linux-wireless, linux-kernel
In-Reply-To: <cover.1380137609.git.joe@perches.com>
There are a mix of function prototypes with and without extern
in the kernel sources. Standardize on not using extern for
function prototypes.
Function prototypes don't need to be written with extern.
extern is assumed by the compiler. Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/orinoco/orinoco.h | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/orinoco/orinoco.h b/drivers/net/wireless/orinoco/orinoco.h
index 3bb936b..eebd2be 100644
--- a/drivers/net/wireless/orinoco/orinoco.h
+++ b/drivers/net/wireless/orinoco/orinoco.h
@@ -182,23 +182,20 @@ extern int orinoco_debug;
/* Exported prototypes */
/********************************************************************/
-extern struct orinoco_private *alloc_orinocodev(
- int sizeof_card, struct device *device,
- int (*hard_reset)(struct orinoco_private *),
- int (*stop_fw)(struct orinoco_private *, int));
-extern void free_orinocodev(struct orinoco_private *priv);
-extern int orinoco_init(struct orinoco_private *priv);
-extern int orinoco_if_add(struct orinoco_private *priv,
- unsigned long base_addr,
- unsigned int irq,
- const struct net_device_ops *ops);
-extern void orinoco_if_del(struct orinoco_private *priv);
-extern int orinoco_up(struct orinoco_private *priv);
-extern void orinoco_down(struct orinoco_private *priv);
-extern irqreturn_t orinoco_interrupt(int irq, void *dev_id);
-
-extern void __orinoco_ev_info(struct net_device *dev, struct hermes *hw);
-extern void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw);
+struct orinoco_private *alloc_orinocodev(int sizeof_card, struct device *device,
+ int (*hard_reset)(struct orinoco_private *),
+ int (*stop_fw)(struct orinoco_private *, int));
+void free_orinocodev(struct orinoco_private *priv);
+int orinoco_init(struct orinoco_private *priv);
+int orinoco_if_add(struct orinoco_private *priv, unsigned long base_addr,
+ unsigned int irq, const struct net_device_ops *ops);
+void orinoco_if_del(struct orinoco_private *priv);
+int orinoco_up(struct orinoco_private *priv);
+void orinoco_down(struct orinoco_private *priv);
+irqreturn_t orinoco_interrupt(int irq, void *dev_id);
+
+void __orinoco_ev_info(struct net_device *dev, struct hermes *hw);
+void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw);
int orinoco_process_xmit_skb(struct sk_buff *skb,
struct net_device *dev,
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related
* [PATCH 11/11] rtlwifi: Remove extern from function prototypes
From: Joe Perches @ 2013-09-25 19:37 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Larry Finger, Chaoming Li, John W. Linville,
linux-wireless, linux-kernel
In-Reply-To: <cover.1380137609.git.joe@perches.com>
There are a mix of function prototypes with and without extern
in the kernel sources. Standardize on not using extern for
function prototypes.
Function prototypes don't need to be written with extern.
extern is assumed by the compiler. Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/rtlwifi/cam.h | 10 ++---
drivers/net/wireless/rtlwifi/efuse.h | 29 +++++++------
drivers/net/wireless/rtlwifi/rtl8188ee/phy.h | 49 ++++++++++------------
drivers/net/wireless/rtlwifi/rtl8192ce/phy.h | 54 ++++++++++--------------
drivers/net/wireless/rtlwifi/rtl8192ce/rf.h | 13 +++---
drivers/net/wireless/rtlwifi/rtl8192cu/rf.h | 13 +++---
drivers/net/wireless/rtlwifi/rtl8192de/hw.h | 7 ++--
drivers/net/wireless/rtlwifi/rtl8192de/phy.h | 44 +++++++++-----------
drivers/net/wireless/rtlwifi/rtl8192de/rf.h | 18 ++++----
drivers/net/wireless/rtlwifi/rtl8723ae/phy.h | 61 +++++++++++++---------------
drivers/net/wireless/rtlwifi/rtl8723ae/rf.h | 13 +++---
11 files changed, 141 insertions(+), 170 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/cam.h b/drivers/net/wireless/rtlwifi/cam.h
index 35e0008..0105e6c 100644
--- a/drivers/net/wireless/rtlwifi/cam.h
+++ b/drivers/net/wireless/rtlwifi/cam.h
@@ -41,12 +41,12 @@
#define CAM_CONFIG_USEDK 1
#define CAM_CONFIG_NO_USEDK 0
-extern void rtl_cam_reset_all_entry(struct ieee80211_hw *hw);
-extern u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
- u32 ul_key_id, u32 ul_entry_idx, u32 ul_enc_alg,
- u32 ul_default_key, u8 *key_content);
+void rtl_cam_reset_all_entry(struct ieee80211_hw *hw);
+u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
+ u32 ul_key_id, u32 ul_entry_idx, u32 ul_enc_alg,
+ u32 ul_default_key, u8 *key_content);
int rtl_cam_delete_one_entry(struct ieee80211_hw *hw, u8 *mac_addr,
- u32 ul_key_id);
+ u32 ul_key_id);
void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index);
void rtl_cam_empty_entry(struct ieee80211_hw *hw, u8 uc_index);
void rtl_cam_reset_sec_info(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/efuse.h b/drivers/net/wireless/rtlwifi/efuse.h
index 395a326..1663b3a 100644
--- a/drivers/net/wireless/rtlwifi/efuse.h
+++ b/drivers/net/wireless/rtlwifi/efuse.h
@@ -104,20 +104,19 @@ struct efuse_priv {
u8 tx_power_g[14];
};
-extern void read_efuse_byte(struct ieee80211_hw *hw, u16 _offset, u8 *pbuf);
-extern void efuse_initialize(struct ieee80211_hw *hw);
-extern u8 efuse_read_1byte(struct ieee80211_hw *hw, u16 address);
-extern void efuse_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value);
-extern void read_efuse(struct ieee80211_hw *hw, u16 _offset,
- u16 _size_byte, u8 *pbuf);
-extern void efuse_shadow_read(struct ieee80211_hw *hw, u8 type,
- u16 offset, u32 *value);
-extern void efuse_shadow_write(struct ieee80211_hw *hw, u8 type,
- u16 offset, u32 value);
-extern bool efuse_shadow_update(struct ieee80211_hw *hw);
-extern bool efuse_shadow_update_chk(struct ieee80211_hw *hw);
-extern void rtl_efuse_shadow_map_update(struct ieee80211_hw *hw);
-extern void efuse_force_write_vendor_Id(struct ieee80211_hw *hw);
-extern void efuse_re_pg_section(struct ieee80211_hw *hw, u8 section_idx);
+void read_efuse_byte(struct ieee80211_hw *hw, u16 _offset, u8 *pbuf);
+void efuse_initialize(struct ieee80211_hw *hw);
+u8 efuse_read_1byte(struct ieee80211_hw *hw, u16 address);
+void efuse_write_1byte(struct ieee80211_hw *hw, u16 address, u8 value);
+void read_efuse(struct ieee80211_hw *hw, u16 _offset, u16 _size_byte, u8 *pbuf);
+void efuse_shadow_read(struct ieee80211_hw *hw, u8 type, u16 offset,
+ u32 *value);
+void efuse_shadow_write(struct ieee80211_hw *hw, u8 type, u16 offset,
+ u32 value);
+bool efuse_shadow_update(struct ieee80211_hw *hw);
+bool efuse_shadow_update_chk(struct ieee80211_hw *hw);
+void rtl_efuse_shadow_map_update(struct ieee80211_hw *hw);
+void efuse_force_write_vendor_Id(struct ieee80211_hw *hw);
+void efuse_re_pg_section(struct ieee80211_hw *hw, u8 section_idx);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h b/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
index f1acd6d..71ddf4f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/phy.h
@@ -200,37 +200,32 @@ enum _ANT_DIV_TYPE {
CGCS_RX_SW_ANTDIV = 0x05,
};
-extern u32 rtl88e_phy_query_bb_reg(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask);
-extern void rtl88e_phy_set_bb_reg(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask, u32 data);
-extern u32 rtl88e_phy_query_rf_reg(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 regaddr,
- u32 bitmask);
-extern void rtl88e_phy_set_rf_reg(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 regaddr,
- u32 bitmask, u32 data);
-extern bool rtl88e_phy_mac_config(struct ieee80211_hw *hw);
-extern bool rtl88e_phy_bb_config(struct ieee80211_hw *hw);
-extern bool rtl88e_phy_rf_config(struct ieee80211_hw *hw);
-extern void rtl88e_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
-extern void rtl88e_phy_get_txpower_level(struct ieee80211_hw *hw,
- long *powerlevel);
-extern void rtl88e_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
-extern void rtl88e_phy_scan_operation_backup(struct ieee80211_hw *hw,
- u8 operation);
-extern void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
-extern void rtl88e_phy_set_bw_mode(struct ieee80211_hw *hw,
- enum nl80211_channel_type ch_type);
-extern void rtl88e_phy_sw_chnl_callback(struct ieee80211_hw *hw);
-extern u8 rtl88e_phy_sw_chnl(struct ieee80211_hw *hw);
-extern void rtl88e_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery);
+u32 rtl88e_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask);
+void rtl88e_phy_set_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask,
+ u32 data);
+u32 rtl88e_phy_query_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
+ u32 regaddr, u32 bitmask);
+void rtl88e_phy_set_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
+ u32 regaddr, u32 bitmask, u32 data);
+bool rtl88e_phy_mac_config(struct ieee80211_hw *hw);
+bool rtl88e_phy_bb_config(struct ieee80211_hw *hw);
+bool rtl88e_phy_rf_config(struct ieee80211_hw *hw);
+void rtl88e_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
+void rtl88e_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel);
+void rtl88e_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
+void rtl88e_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
+void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
+void rtl88e_phy_set_bw_mode(struct ieee80211_hw *hw,
+ enum nl80211_channel_type ch_type);
+void rtl88e_phy_sw_chnl_callback(struct ieee80211_hw *hw);
+u8 rtl88e_phy_sw_chnl(struct ieee80211_hw *hw);
+void rtl88e_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery);
void rtl88e_phy_lc_calibrate(struct ieee80211_hw *hw);
void rtl88e_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
bool rtl88e_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
enum radio_path rfpath);
bool rtl88e_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
-extern bool rtl88e_phy_set_rf_power_state(struct ieee80211_hw *hw,
- enum rf_pwrstate rfpwr_state);
+bool rtl88e_phy_set_rf_power_state(struct ieee80211_hw *hw,
+ enum rf_pwrstate rfpwr_state);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
index d5e3b70..f8973e5 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.h
@@ -188,65 +188,55 @@ struct tx_power_struct {
};
bool rtl92c_phy_bb_config(struct ieee80211_hw *hw);
-u32 rtl92c_phy_query_bb_reg(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask);
-void rtl92c_phy_set_bb_reg(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask, u32 data);
-u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 regaddr,
- u32 bitmask);
-extern void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 regaddr,
- u32 bitmask, u32 data);
+u32 rtl92c_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask);
+void rtl92c_phy_set_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask,
+ u32 data);
+u32 rtl92c_phy_query_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
+ u32 regaddr, u32 bitmask);
+void rtl92ce_phy_set_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
+ u32 regaddr, u32 bitmask, u32 data);
bool rtl92c_phy_mac_config(struct ieee80211_hw *hw);
bool rtl92ce_phy_bb_config(struct ieee80211_hw *hw);
bool rtl92c_phy_rf_config(struct ieee80211_hw *hw);
bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
- enum radio_path rfpath);
+ enum radio_path rfpath);
void rtl92c_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
-void rtl92c_phy_get_txpower_level(struct ieee80211_hw *hw,
- long *powerlevel);
+void rtl92c_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel);
void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
-bool rtl92c_phy_update_txpower_dbm(struct ieee80211_hw *hw,
- long power_indbm);
-void rtl92c_phy_scan_operation_backup(struct ieee80211_hw *hw,
- u8 operation);
+bool rtl92c_phy_update_txpower_dbm(struct ieee80211_hw *hw, long power_indbm);
+void rtl92c_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
void rtl92c_phy_set_bw_mode(struct ieee80211_hw *hw,
- enum nl80211_channel_type ch_type);
+ enum nl80211_channel_type ch_type);
void rtl92c_phy_sw_chnl_callback(struct ieee80211_hw *hw);
u8 rtl92c_phy_sw_chnl(struct ieee80211_hw *hw);
void rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery);
-void rtl92c_phy_set_beacon_hw_reg(struct ieee80211_hw *hw,
- u16 beaconinterval);
+void rtl92c_phy_set_beacon_hw_reg(struct ieee80211_hw *hw, u16 beaconinterval);
void rtl92c_phy_ap_calibrate(struct ieee80211_hw *hw, char delta);
void rtl92c_phy_lc_calibrate(struct ieee80211_hw *hw);
void _rtl92ce_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t);
void rtl92c_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
bool rtl92c_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
enum radio_path rfpath);
-bool rtl8192_phy_check_is_legal_rfpath(struct ieee80211_hw *hw,
- u32 rfpath);
+bool rtl8192_phy_check_is_legal_rfpath(struct ieee80211_hw *hw, u32 rfpath);
bool rtl92c_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
bool rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
- enum rf_pwrstate rfpwr_state);
+ enum rf_pwrstate rfpwr_state);
void rtl92ce_phy_set_rf_on(struct ieee80211_hw *hw);
bool rtl92c_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
void rtl92c_phy_set_io(struct ieee80211_hw *hw);
void rtl92c_bb_block_on(struct ieee80211_hw *hw);
-u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 offset);
+u32 _rtl92c_phy_rf_serial_read(struct ieee80211_hw *hw, enum radio_path rfpath,
+ u32 offset);
u32 _rtl92c_phy_fw_rf_serial_read(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 offset);
+ enum radio_path rfpath, u32 offset);
u32 _rtl92c_phy_calculate_bit_shift(u32 bitmask);
void _rtl92c_phy_rf_serial_write(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 offset,
- u32 data);
+ enum radio_path rfpath, u32 offset, u32 data);
void _rtl92c_phy_fw_rf_serial_write(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 offset,
- u32 data);
+ enum radio_path rfpath, u32 offset,
+ u32 data);
void _rtl92c_store_pwrIndex_diffrate_offset(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask,
- u32 data);
+ u32 regaddr, u32 bitmask, u32 data);
bool _rtl92ce_phy_config_mac_with_headerfile(struct ieee80211_hw *hw);
void _rtl92c_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw);
bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.h b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.h
index 6c8d56e..d8fe68b 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.h
@@ -34,11 +34,10 @@
#define RF6052_MAX_REG 0x3F
#define RF6052_MAX_PATH 2
-extern void rtl92ce_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw,
- u8 bandwidth);
-extern void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
- u8 *ppowerlevel);
-extern void rtl92ce_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
- u8 *ppowerlevel, u8 channel);
-extern bool rtl92ce_phy_rf6052_config(struct ieee80211_hw *hw);
+void rtl92ce_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth);
+void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
+ u8 *ppowerlevel);
+void rtl92ce_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
+ u8 *ppowerlevel, u8 channel);
+bool rtl92ce_phy_rf6052_config(struct ieee80211_hw *hw);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h
index 090fd33..11b439d 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h
@@ -34,15 +34,14 @@
#define RF6052_MAX_REG 0x3F
#define RF6052_MAX_PATH 2
-extern void rtl92cu_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw,
- u8 bandwidth);
-extern void rtl92c_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
- u8 *ppowerlevel);
-extern void rtl92c_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
- u8 *ppowerlevel, u8 channel);
+void rtl92cu_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth);
+void rtl92c_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
+ u8 *ppowerlevel);
+void rtl92c_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
+ u8 *ppowerlevel, u8 channel);
bool rtl92cu_phy_rf6052_config(struct ieee80211_hw *hw);
bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
- enum radio_path rfpath);
+ enum radio_path rfpath);
void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
u8 *ppowerlevel);
void rtl92cu_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.h b/drivers/net/wireless/rtlwifi/rtl8192de/hw.h
index 7c9f7a2..1bc7b1a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.h
@@ -55,10 +55,9 @@ void rtl92de_set_key(struct ieee80211_hw *hw, u32 key_index,
u8 *p_macaddr, bool is_group, u8 enc_algo,
bool is_wepkey, bool clear_all);
-extern void rtl92de_write_dword_dbi(struct ieee80211_hw *hw, u16 offset,
- u32 value, u8 direct);
-extern u32 rtl92de_read_dword_dbi(struct ieee80211_hw *hw, u16 offset,
- u8 direct);
+void rtl92de_write_dword_dbi(struct ieee80211_hw *hw, u16 offset, u32 value,
+ u8 direct);
+u32 rtl92de_read_dword_dbi(struct ieee80211_hw *hw, u16 offset, u8 direct);
void rtl92de_suspend(struct ieee80211_hw *hw);
void rtl92de_resume(struct ieee80211_hw *hw);
void rtl92d_linked_set_reg(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.h b/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
index f074952..0f993f4 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.h
@@ -127,34 +127,30 @@ static inline void rtl92d_release_cckandrw_pagea_ctl(struct ieee80211_hw *hw,
*flag);
}
-extern u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask);
-extern void rtl92d_phy_set_bb_reg(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask, u32 data);
-extern u32 rtl92d_phy_query_rf_reg(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 regaddr,
- u32 bitmask);
-extern void rtl92d_phy_set_rf_reg(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 regaddr,
- u32 bitmask, u32 data);
-extern bool rtl92d_phy_mac_config(struct ieee80211_hw *hw);
-extern bool rtl92d_phy_bb_config(struct ieee80211_hw *hw);
-extern bool rtl92d_phy_rf_config(struct ieee80211_hw *hw);
-extern bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
- enum radio_path rfpath);
-extern void rtl92d_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
-extern void rtl92d_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
-extern void rtl92d_phy_scan_operation_backup(struct ieee80211_hw *hw,
- u8 operation);
-extern void rtl92d_phy_set_bw_mode(struct ieee80211_hw *hw,
- enum nl80211_channel_type ch_type);
-extern u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw);
+u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask);
+void rtl92d_phy_set_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask,
+ u32 data);
+u32 rtl92d_phy_query_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
+ u32 regaddr, u32 bitmask);
+void rtl92d_phy_set_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
+ u32 regaddr, u32 bitmask, u32 data);
+bool rtl92d_phy_mac_config(struct ieee80211_hw *hw);
+bool rtl92d_phy_bb_config(struct ieee80211_hw *hw);
+bool rtl92d_phy_rf_config(struct ieee80211_hw *hw);
+bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
+ enum radio_path rfpath);
+void rtl92d_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
+void rtl92d_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
+void rtl92d_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
+void rtl92d_phy_set_bw_mode(struct ieee80211_hw *hw,
+ enum nl80211_channel_type ch_type);
+u8 rtl92d_phy_sw_chnl(struct ieee80211_hw *hw);
bool rtl92d_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
enum rf_content content,
enum radio_path rfpath);
bool rtl92d_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
-extern bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
- enum rf_pwrstate rfpwr_state);
+bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
+ enum rf_pwrstate rfpwr_state);
void rtl92d_phy_config_macphymode(struct ieee80211_hw *hw);
void rtl92d_phy_config_macphymode_info(struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/rf.h b/drivers/net/wireless/rtlwifi/rtl8192de/rf.h
index 0fe1a48..7303d12 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/rf.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/rf.h
@@ -30,15 +30,13 @@
#ifndef __RTL92D_RF_H__
#define __RTL92D_RF_H__
-extern void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw,
- u8 bandwidth);
-extern void rtl92d_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
- u8 *ppowerlevel);
-extern void rtl92d_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
- u8 *ppowerlevel, u8 channel);
-extern bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw);
-extern bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0);
-extern void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw,
- bool bmac0);
+void rtl92d_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth);
+void rtl92d_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
+ u8 *ppowerlevel);
+void rtl92d_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
+ u8 *ppowerlevel, u8 channel);
+bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw);
+bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0);
+void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
index e7a59eb..bbb950d 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.h
@@ -183,42 +183,39 @@ struct tx_power_struct {
u32 mcs_original_offset[4][16];
};
-extern u32 rtl8723ae_phy_query_bb_reg(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask);
-extern void rtl8723ae_phy_set_bb_reg(struct ieee80211_hw *hw,
- u32 regaddr, u32 bitmask, u32 data);
-extern u32 rtl8723ae_phy_query_rf_reg(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 regaddr,
- u32 bitmask);
-extern void rtl8723ae_phy_set_rf_reg(struct ieee80211_hw *hw,
- enum radio_path rfpath, u32 regaddr,
- u32 bitmask, u32 data);
-extern bool rtl8723ae_phy_mac_config(struct ieee80211_hw *hw);
-extern bool rtl8723ae_phy_bb_config(struct ieee80211_hw *hw);
-extern bool rtl8723ae_phy_rf_config(struct ieee80211_hw *hw);
-extern bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
- enum radio_path rfpath);
-extern void rtl8723ae_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
-extern void rtl8723ae_phy_get_txpower_level(struct ieee80211_hw *hw,
- long *powerlevel);
-extern void rtl8723ae_phy_set_txpower_level(struct ieee80211_hw *hw,
- u8 channel);
-extern bool rtl8723ae_phy_update_txpower_dbm(struct ieee80211_hw *hw,
- long power_indbm);
-extern void rtl8723ae_phy_scan_operation_backup(struct ieee80211_hw *hw,
- u8 operation);
-extern void rtl8723ae_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
-extern void rtl8723ae_phy_set_bw_mode(struct ieee80211_hw *hw,
- enum nl80211_channel_type ch_type);
-extern void rtl8723ae_phy_sw_chnl_callback(struct ieee80211_hw *hw);
-extern u8 rtl8723ae_phy_sw_chnl(struct ieee80211_hw *hw);
-extern void rtl8723ae_phy_iq_calibrate(struct ieee80211_hw *hw, bool recovery);
+u32 rtl8723ae_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr,
+ u32 bitmask);
+void rtl8723ae_phy_set_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask,
+ u32 data);
+u32 rtl8723ae_phy_query_rf_reg(struct ieee80211_hw *hw,
+ enum radio_path rfpath, u32 regaddr,
+ u32 bitmask);
+void rtl8723ae_phy_set_rf_reg(struct ieee80211_hw *hw,
+ enum radio_path rfpath, u32 regaddr, u32 bitmask,
+ u32 data);
+bool rtl8723ae_phy_mac_config(struct ieee80211_hw *hw);
+bool rtl8723ae_phy_bb_config(struct ieee80211_hw *hw);
+bool rtl8723ae_phy_rf_config(struct ieee80211_hw *hw);
+bool rtl92c_phy_config_rf_with_feaderfile(struct ieee80211_hw *hw,
+ enum radio_path rfpath);
+void rtl8723ae_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
+void rtl8723ae_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel);
+void rtl8723ae_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel);
+bool rtl8723ae_phy_update_txpower_dbm(struct ieee80211_hw *hw,
+ long power_indbm);
+void rtl8723ae_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation);
+void rtl8723ae_phy_set_bw_mode_callback(struct ieee80211_hw *hw);
+void rtl8723ae_phy_set_bw_mode(struct ieee80211_hw *hw,
+ enum nl80211_channel_type ch_type);
+void rtl8723ae_phy_sw_chnl_callback(struct ieee80211_hw *hw);
+u8 rtl8723ae_phy_sw_chnl(struct ieee80211_hw *hw);
+void rtl8723ae_phy_iq_calibrate(struct ieee80211_hw *hw, bool recovery);
void rtl8723ae_phy_lc_calibrate(struct ieee80211_hw *hw);
void rtl8723ae_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain);
bool rtl8723ae_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
enum radio_path rfpath);
bool rtl8723ae_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype);
-extern bool rtl8723ae_phy_set_rf_power_state(struct ieee80211_hw *hw,
- enum rf_pwrstate rfpwr_state);
+bool rtl8723ae_phy_set_rf_power_state(struct ieee80211_hw *hw,
+ enum rf_pwrstate rfpwr_state);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/rf.h b/drivers/net/wireless/rtlwifi/rtl8723ae/rf.h
index d0f9dd7..57f1933 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/rf.h
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/rf.h
@@ -32,12 +32,11 @@
#define RF6052_MAX_TX_PWR 0x3F
-extern void rtl8723ae_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw,
- u8 bandwidth);
-extern void rtl8723ae_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
- u8 *ppowerlevel);
-extern void rtl8723ae_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
- u8 *ppowerlevel, u8 channel);
-extern bool rtl8723ae_phy_rf6052_config(struct ieee80211_hw *hw);
+void rtl8723ae_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth);
+void rtl8723ae_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
+ u8 *ppowerlevel);
+void rtl8723ae_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw,
+ u8 *ppowerlevel, u8 channel);
+bool rtl8723ae_phy_rf6052_config(struct ieee80211_hw *hw);
#endif
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related
* Re: [PATCH v2] powerpc/83xx: gianfar_ptp: select 1588 clock source through dts file
From: Kumar Gala @ 2013-09-25 19:38 UTC (permalink / raw)
To: Aida Mynzhasova; +Cc: linuxppc-dev, devicetree, netdev, richardcochran
In-Reply-To: <1380093863-5388-1-git-send-email-aida.mynzhasova@skitlab.ru>
On Sep 25, 2013, at 2:24 AM, Aida Mynzhasova wrote:
> Currently IEEE 1588 timer reference clock source is determined through
> hard-coded value in gianfar_ptp driver. This patch allows to select ptp
> clock source by means of device tree file node.
>
> For instance:
>
> fsl,cksel = <0>;
>
> for using external (TSEC_TMR_CLK input) high precision timer
> reference clock.
>
> Other acceptable values:
>
> <1> : eTSEC system clock
> <2> : eTSEC1 transmit clock
> <3> : RTC clock input
Do these value match some register field to select which clk? If so please add that to the document.
- k
>
> When this attribute isn't used, eTSEC system clock will serve as
> IEEE 1588 timer reference clock.
>
> Signed-off-by: Aida Mynzhasova <aida.mynzhasova@skitlab.ru>
> ---
> Documentation/devicetree/bindings/net/fsl-tsec-phy.txt | 16 +++++++++++++++-
> drivers/net/ethernet/freescale/gianfar_ptp.c | 4 +++-
> 2 files changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
> index 2c6be03..eb06059 100644
> --- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
> +++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
> @@ -86,6 +86,7 @@ General Properties:
>
> Clock Properties:
>
> + - fsl,cksel Timer reference clock source.
> - fsl,tclk-period Timer reference clock period in nanoseconds.
> - fsl,tmr-prsc Prescaler, divides the output clock.
> - fsl,tmr-add Frequency compensation value.
> @@ -97,7 +98,7 @@ Clock Properties:
> clock. You must choose these carefully for the clock to work right.
> Here is how to figure good values:
>
> - TimerOsc = system clock MHz
> + TimerOsc = selected reference clock MHz
> tclk_period = desired clock period nanoseconds
> NominalFreq = 1000 / tclk_period MHz
> FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0)
> @@ -114,6 +115,18 @@ Clock Properties:
> Pulse Per Second (PPS) signal, since this will be offered to the PPS
> subsystem to synchronize the Linux clock.
>
> + "fsl,cksel" property allows to select different reference clock
> + sources:
> +
> + <0> - external high precision timer reference clock (TSEC_TMR_CLK
> + input is used for this purpose);
> + <1> - eTSEC system clock;
> + <2> - eTSEC1 transmit clock;
> + <3> - RTC clock input.
> +
> + When this attribute is not used, eTSEC system clock will serve as
> + IEEE 1588 timer reference clock.
> +
> Example:
>
> ptp_clock@24E00 {
> @@ -121,6 +134,7 @@ Example:
> reg = <0x24E00 0xB0>;
> interrupts = <12 0x8 13 0x8>;
> interrupt-parent = < &ipic >;
> + fsl,cksel = <1>;
> fsl,tclk-period = <10>;
> fsl,tmr-prsc = <100>;
> fsl,tmr-add = <0x999999A4>;
> diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c
> index 098f133..e006a09 100644
> --- a/drivers/net/ethernet/freescale/gianfar_ptp.c
> +++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
> @@ -452,7 +452,9 @@ static int gianfar_ptp_probe(struct platform_device *dev)
> err = -ENODEV;
>
> etsects->caps = ptp_gianfar_caps;
> - etsects->cksel = DEFAULT_CKSEL;
> +
> + if (get_of_u32(node, "fsl,cksel", &etsects->cksel))
> + etsects->cksel = DEFAULT_CKSEL;
>
> if (get_of_u32(node, "fsl,tclk-period", &etsects->tclk_period) ||
> get_of_u32(node, "fsl,tmr-prsc", &etsects->tmr_prsc) ||
> --
> 1.8.1.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply
* [RFC PATCH 0/2] net: alternate proposal for using macvlans with forwarding acceleration
From: Neil Horman @ 2013-09-25 20:16 UTC (permalink / raw)
To: netdev
In-Reply-To: <20130911184441.26914.10336.stgit@nitbit.x32>
John, et al. -
As promised, heres my (very rough) first pass at an alternate propsal for
what you're trying to do with virtual station interfaces here. Its completely
untested, but it builds, and I'll be trying to run it over the next few days
(though I'm sure I got part of the hardware manipulation wrong). I wanted to
post it early though so you could get a look at it to see what you did and
didn't like about it. Some notes:
1) As discussed, the major effort here is to tie in macvlans with l2 forwarding
acceleration, rather than creating a new vsi link type. That should make
management easier for admins (be it via ovs or some other mechanism). It
basically exposes a bit less to the user, which I think is good.
2) I've separated out the l2 forwarding acceleration operations from the
net_device_operations structure. I'm not sure I like that yet, but I'm kind on
leaning that way. Since a limited set of hardare supports forwarding
acceleration, it makes for a nice easy way to group functionality without
polluting the net_device_operations structure. It also lets us group simmilar
functions together nicely (I can see a future l3_accel_ops structure if we can
do l3 flows in hardware). Anywho, its a divergence from what we've been doing
so I thought I would call attention to it.
3) I've included a l2_accel_xmit method in the accel_ops structure for fast path
forwarding, but I'm not sure I like that. It seems we should be able to use
ndo_start_xmit and key off some data to recognize that we should be doing
hardware forwarding. I'm not quite sure how to do that yet though. Something
to think about.
4) I've borrowed heavily from your vsi work of course just to get this building.
I think theres probbaly alot of consolidation that can be done in the code that
I added to ixgbe_main.c to make it smaller. Again, I just wanted to post this
so you could speak up if you though this was all crap before I wen't too far
down the rabbit hole.
Regards
Neil
^ permalink raw reply
* [RFC PATCH 1/2] net: Add layer 2 hardware acceleration operations for macvlan devices
From: Neil Horman @ 2013-09-25 20:16 UTC (permalink / raw)
To: netdev; +Cc: Neil Horman, john.fastabend, David S. Miller
In-Reply-To: <1380140209-24587-1-git-send-email-nhorman@tuxdriver.com>
Add a operations structure that allows a network interface to export the fact
that it supports package forwarding in hardware between physical interfaces and
other mac layer devices assigned to it (such as macvlans). this operaions
structure can be used by virtual mac devices to bypass software switching so
that forwarding can be done in hardware more efficiently.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: john.fastabend@intel.com
CC: "David S. Miller" <davem@davemloft.net>
---
drivers/net/macvlan.c | 37 +++++++++++++++++++++++++++++++++++++
include/linux/if_macvlan.h | 1 +
include/linux/netdevice.h | 10 ++++++++++
net/core/dev.c | 3 +++
4 files changed, 51 insertions(+)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 9bf46bd..0c37b30 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -296,8 +296,16 @@ netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,
unsigned int len = skb->len;
int ret;
const struct macvlan_dev *vlan = netdev_priv(dev);
+ const struct l2_forwarding_accel_ops *l2a_ops = vlan->lowerdev->l2a_ops;
+
+ if (l2a_ops->l2_accel_xmit) {
+ ret = l2a_ops->l2_accel_xmit(skb, vlan->l2a_priv);
+ if (likely(ret == NETDEV_TX_OK))
+ goto update_stats;
+ }
ret = macvlan_queue_xmit(skb, dev);
+update_stats:
if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) {
struct macvlan_pcpu_stats *pcpu_stats;
@@ -336,6 +344,7 @@ static int macvlan_open(struct net_device *dev)
{
struct macvlan_dev *vlan = netdev_priv(dev);
struct net_device *lowerdev = vlan->lowerdev;
+ const struct l2_forwarding_accel_ops *l2a_ops = lowerdev->l2a_ops;
int err;
if (vlan->port->passthru) {
@@ -347,6 +356,19 @@ static int macvlan_open(struct net_device *dev)
goto hash_add;
}
+ if (l2a_ops->l2_accel_add_dev) {
+ /* The lowerdev supports l2 switching
+ * try to add this macvlan to it
+ */
+ vlan->l2a_priv = kzalloc(l2a_ops->priv_size, GFP_KERNEL);
+ if (!vlan->l2a_priv)
+ return -ENOMEM;
+ err = l2a_ops->l2_accel_add_dev(vlan->lowerdev,
+ dev, vlan->l2a_priv);
+ if (err < 0)
+ return err;
+ }
+
err = -EBUSY;
if (macvlan_addr_busy(vlan->port, dev->dev_addr))
goto out;
@@ -367,6 +389,13 @@ hash_add:
del_unicast:
dev_uc_del(lowerdev, dev->dev_addr);
out:
+ if (vlan->l2a_priv) {
+ if (l2a_ops->l2_accel_del_dev)
+ l2a_ops->l2_accel_del_dev(vlan->lowerdev,
+ vlan->l2a_priv);
+ kfree(vlan->l2a_priv);
+ vlan->l2a_priv = NULL;
+ }
return err;
}
@@ -374,6 +403,7 @@ static int macvlan_stop(struct net_device *dev)
{
struct macvlan_dev *vlan = netdev_priv(dev);
struct net_device *lowerdev = vlan->lowerdev;
+ const struct l2_forwarding_accel_ops *l2a_ops = lowerdev->l2a_ops;
dev_uc_unsync(lowerdev, dev);
dev_mc_unsync(lowerdev, dev);
@@ -391,6 +421,12 @@ static int macvlan_stop(struct net_device *dev)
hash_del:
macvlan_hash_del(vlan, !dev->dismantle);
+ if (vlan->l2a_priv) {
+ l2a_ops->l2_accel_del_dev(vlan->lowerdev, vlan->l2a_priv);
+ kfree(vlan->l2a_priv);
+ vlan->l2a_priv = NULL;
+ }
+
return 0;
}
@@ -801,6 +837,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
if (err < 0)
return err;
}
+
port = macvlan_port_get_rtnl(lowerdev);
/* Only 1 macvlan device can be created in passthru mode */
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
index ddd33fd..9b16af9 100644
--- a/include/linux/if_macvlan.h
+++ b/include/linux/if_macvlan.h
@@ -61,6 +61,7 @@ struct macvlan_dev {
struct hlist_node hlist;
struct macvlan_port *port;
struct net_device *lowerdev;
+ void *l2a_priv;
struct macvlan_pcpu_stats __percpu *pcpu_stats;
DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3de49ac..4cbc535 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1099,6 +1099,15 @@ struct net_device_ops {
__be16 port);
};
+struct l2_forwarding_accel_ops {
+ size_t priv_size;
+ int (*l2_accel_add_dev)(struct net_device *pdev,
+ struct net_device *vdev, void *priv);
+ void (*l2_accel_del_dev)(struct net_device *pdev, void *priv);
+ netdev_tx_t (*l2_accel_xmit)(struct sk_buff *skb,
+ void *priv);
+};
+
/*
* The DEVICE structure.
* Actually, this whole structure is a big mistake. It mixes I/O
@@ -1183,6 +1192,7 @@ struct net_device {
/* Management operations */
const struct net_device_ops *netdev_ops;
const struct ethtool_ops *ethtool_ops;
+ const struct l2_forwarding_accel_ops *l2a_ops;
/* Hardware header description */
const struct header_ops *header_ops;
diff --git a/net/core/dev.c b/net/core/dev.c
index 5c713f2..5c5eec2 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5992,6 +5992,7 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev)
}
static const struct ethtool_ops default_ethtool_ops;
+static const struct l2_forwarding_accel_ops default_l2a_ops;
void netdev_set_default_ethtool_ops(struct net_device *dev,
const struct ethtool_ops *ops)
@@ -6090,6 +6091,8 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
dev->group = INIT_NETDEV_GROUP;
if (!dev->ethtool_ops)
dev->ethtool_ops = &default_ethtool_ops;
+ if (!dev->l2a_ops)
+ dev->l2a_ops = &default_l2a_ops;
return dev;
free_all:
--
1.8.3.1
^ permalink raw reply related
* [RFC PATCH 2/2] ixgbe: enable l2 forwarding acceleration for macvlans
From: Neil Horman @ 2013-09-25 20:16 UTC (permalink / raw)
To: netdev; +Cc: Neil Horman, john.fastabend, David S. Miller
In-Reply-To: <1380140209-24587-1-git-send-email-nhorman@tuxdriver.com>
Now that l2 acceleration ops are in place from the prior patch, enable ixgbe to
take advantage of these operations. Allow it to allocate queues for a macvlan
so that when we transmit a frame, we can do the switching in hardware inside the
ixgbe card, rather than in software.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: john.fastabend@intel.com
CC: "David S. Miller" <davem@davemloft.net>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 32 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_l2a.h | 54 ++++
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 15 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 360 +++++++++++++++++------
5 files changed, 374 insertions(+), 91 deletions(-)
create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_l2a.h
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 0ac6b11..cfa6a8b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -244,6 +244,7 @@ struct ixgbe_ring {
unsigned long last_rx_timestamp;
unsigned long state;
u8 __iomem *tail;
+ struct net_device *vmdq_netdev;
dma_addr_t dma; /* phys. address of descriptor ring */
unsigned int size; /* length in bytes */
@@ -288,11 +289,15 @@ enum ixgbe_ring_f_enum {
};
#define IXGBE_MAX_RSS_INDICES 16
-#define IXGBE_MAX_VMDQ_INDICES 64
+#define IXGBE_MAX_VMDQ_INDICES 32
#define IXGBE_MAX_FDIR_INDICES 63 /* based on q_vector limit */
#define IXGBE_MAX_FCOE_INDICES 8
#define MAX_RX_QUEUES (IXGBE_MAX_FDIR_INDICES + 1)
#define MAX_TX_QUEUES (IXGBE_MAX_FDIR_INDICES + 1)
+#define IXGBE_MAX_L2A_QUEUES 4
+#define IXGBE_MAX_L2A_QUEUES 4
+#define IXGBE_BAD_L2A_QUEUE 3
+
struct ixgbe_ring_feature {
u16 limit; /* upper limit on feature indices */
u16 indices; /* current value of indices */
@@ -738,6 +743,7 @@ struct ixgbe_adapter {
#endif /*CONFIG_DEBUG_FS*/
u8 default_up;
+ unsigned long l2a_bitmask; /* Bitmask indicating in use pools */
};
struct ixgbe_fdir_filter {
@@ -747,6 +753,17 @@ struct ixgbe_fdir_filter {
u16 action;
};
+struct ixgbe_l2a_adapter {
+ unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
+ struct net_device *netdev;
+ struct ixgbe_adapter *real_adapter;
+ unsigned int tx_base_queue;
+ unsigned int rx_base_queue;
+ struct net_device_stats net_stats;
+ int pool;
+ bool online;
+};
+
enum ixgbe_state_t {
__IXGBE_TESTING,
__IXGBE_RESETTING,
@@ -879,9 +896,14 @@ static inline void ixgbe_dbg_adapter_exit(struct ixgbe_adapter *adapter) {}
static inline void ixgbe_dbg_init(void) {}
static inline void ixgbe_dbg_exit(void) {}
#endif /* CONFIG_DEBUG_FS */
+static inline struct net_device *netdev_ring(const struct ixgbe_ring *ring)
+{
+ return ring->vmdq_netdev ? ring->vmdq_netdev : ring->netdev;
+}
+
static inline struct netdev_queue *txring_txq(const struct ixgbe_ring *ring)
{
- return netdev_get_tx_queue(ring->netdev, ring->queue_index);
+ return netdev_get_tx_queue(netdev_ring(ring), ring->queue_index);
}
extern void ixgbe_ptp_init(struct ixgbe_adapter *adapter);
@@ -915,4 +937,10 @@ extern void ixgbe_ptp_check_pps_event(struct ixgbe_adapter *adapter, u32 eicr);
void ixgbe_sriov_reinit(struct ixgbe_adapter *adapter);
#endif
+int ixgbe_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd);
+int ixgbe_write_uc_addr_list(struct net_device *netdev);
+netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
+ struct ixgbe_adapter *adapter,
+ struct ixgbe_ring *tx_ring);
+void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring);
#endif /* _IXGBE_H_ */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index e8649ab..277af14 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -150,8 +150,8 @@ static const char ixgbe_gstrings_test[][ETH_GSTRING_LEN] = {
};
#define IXGBE_TEST_LEN sizeof(ixgbe_gstrings_test) / ETH_GSTRING_LEN
-static int ixgbe_get_settings(struct net_device *netdev,
- struct ethtool_cmd *ecmd)
+int ixgbe_get_settings(struct net_device *netdev,
+ struct ethtool_cmd *ecmd)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_l2a.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_l2a.h
new file mode 100644
index 0000000..2f36584
--- /dev/null
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_l2a.h
@@ -0,0 +1,54 @@
+/*******************************************************************************
+
+ Intel 10 Gigabit PCI Express Linux driver
+ Copyright(c) 1999 - 2013 Intel Corporation.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms and conditions of the GNU General Public License,
+ version 2, as published by the Free Software Foundation.
+
+ This program is distributed in the hope it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+
+ The full GNU General Public License is included in this distribution in
+ the file called "COPYING".
+
+ Contact Information:
+ e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
+ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
+
+*******************************************************************************/
+#include "ixgbe.h"
+
+
+static inline void ixgbe_irq_enable_queues(struct ixgbe_adapter *adapter,
+ u64 qmask)
+{
+ u32 mask;
+ struct ixgbe_hw *hw = &adapter->hw;
+
+ switch (hw->mac.type) {
+ case ixgbe_mac_82598EB:
+ mask = (IXGBE_EIMS_RTX_QUEUE & qmask);
+ IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask);
+ break;
+ case ixgbe_mac_82599EB:
+ case ixgbe_mac_X540:
+ mask = (qmask & 0xFFFFFFFF);
+ if (mask)
+ IXGBE_WRITE_REG(hw, IXGBE_EIMS_EX(0), mask);
+ mask = (qmask >> 32);
+ if (mask)
+ IXGBE_WRITE_REG(hw, IXGBE_EIMS_EX(1), mask);
+ break;
+ default:
+ break;
+ }
+ /* skip the flush */
+}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
index 90b4e10..e2dd635 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -500,7 +500,8 @@ static bool ixgbe_set_sriov_queues(struct ixgbe_adapter *adapter)
#endif
/* only proceed if SR-IOV is enabled */
- if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
+ if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) &&
+ !(adapter->flags & IXGBE_FLAG_VMDQ_ENABLED))
return false;
/* Add starting offset to total pool count */
@@ -852,7 +853,11 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter,
/* apply Tx specific ring traits */
ring->count = adapter->tx_ring_count;
- ring->queue_index = txr_idx;
+ if (adapter->num_rx_pools > 1)
+ ring->queue_index =
+ txr_idx % adapter->num_rx_queues_per_pool;
+ else
+ ring->queue_index = txr_idx;
/* assign ring to adapter */
adapter->tx_ring[txr_idx] = ring;
@@ -895,7 +900,11 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter,
#endif /* IXGBE_FCOE */
/* apply Rx specific ring traits */
ring->count = adapter->rx_ring_count;
- ring->queue_index = rxr_idx;
+ if (adapter->num_rx_pools > 1)
+ ring->queue_index =
+ rxr_idx % adapter->num_rx_queues_per_pool;
+ else
+ ring->queue_index = rxr_idx;
/* assign ring to adapter */
adapter->rx_ring[rxr_idx] = ring;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 0ade0cd..dccec86 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -52,6 +52,7 @@
#include "ixgbe_common.h"
#include "ixgbe_dcb_82599.h"
#include "ixgbe_sriov.h"
+#include "ixgbe_l2a.h"
char ixgbe_driver_name[] = "ixgbe";
static const char ixgbe_driver_string[] =
@@ -872,7 +873,8 @@ static u64 ixgbe_get_tx_completed(struct ixgbe_ring *ring)
static u64 ixgbe_get_tx_pending(struct ixgbe_ring *ring)
{
- struct ixgbe_adapter *adapter = netdev_priv(ring->netdev);
+ struct net_device *dev = ring->netdev;
+ struct ixgbe_adapter *adapter = netdev_priv(dev);
struct ixgbe_hw *hw = &adapter->hw;
u32 head = IXGBE_READ_REG(hw, IXGBE_TDH(ring->reg_idx));
@@ -1055,7 +1057,7 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
tx_ring->next_to_use, i,
tx_ring->tx_buffer_info[i].time_stamp, jiffies);
- netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
+ netif_stop_subqueue(netdev_ring(tx_ring), tx_ring->queue_index);
e_info(probe,
"tx hang %d detected on queue %d, resetting adapter\n",
@@ -1072,16 +1074,16 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
total_packets, total_bytes);
#define TX_WAKE_THRESHOLD (DESC_NEEDED * 2)
- if (unlikely(total_packets && netif_carrier_ok(tx_ring->netdev) &&
+ if (unlikely(total_packets && netif_carrier_ok(netdev_ring(tx_ring)) &&
(ixgbe_desc_unused(tx_ring) >= TX_WAKE_THRESHOLD))) {
/* Make sure that anybody stopping the queue after this
* sees the new next_to_clean.
*/
smp_mb();
- if (__netif_subqueue_stopped(tx_ring->netdev,
+ if (__netif_subqueue_stopped(netdev_ring(tx_ring),
tx_ring->queue_index)
&& !test_bit(__IXGBE_DOWN, &adapter->state)) {
- netif_wake_subqueue(tx_ring->netdev,
+ netif_wake_subqueue(netdev_ring(tx_ring),
tx_ring->queue_index);
++tx_ring->tx_stats.restart_queue;
}
@@ -1226,7 +1228,7 @@ static inline void ixgbe_rx_hash(struct ixgbe_ring *ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{
- if (ring->netdev->features & NETIF_F_RXHASH)
+ if (netdev_ring(ring)->features & NETIF_F_RXHASH)
skb->rxhash = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss);
}
@@ -1260,10 +1262,12 @@ static inline void ixgbe_rx_checksum(struct ixgbe_ring *ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{
+ struct net_device *dev = netdev_ring(ring);
+
skb_checksum_none_assert(skb);
/* Rx csum disabled */
- if (!(ring->netdev->features & NETIF_F_RXCSUM))
+ if (!(dev->features & NETIF_F_RXCSUM))
return;
/* if IP and error */
@@ -1559,7 +1563,7 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{
- struct net_device *dev = rx_ring->netdev;
+ struct net_device *dev = netdev_ring(rx_ring);
ixgbe_update_rsc_stats(rx_ring, skb);
@@ -1739,7 +1743,7 @@ static bool ixgbe_cleanup_headers(struct ixgbe_ring *rx_ring,
union ixgbe_adv_rx_desc *rx_desc,
struct sk_buff *skb)
{
- struct net_device *netdev = rx_ring->netdev;
+ struct net_device *netdev = netdev_ring(rx_ring);
/* verify that the packet does not have any known errors */
if (unlikely(ixgbe_test_staterr(rx_desc,
@@ -1905,7 +1909,7 @@ static struct sk_buff *ixgbe_fetch_rx_buffer(struct ixgbe_ring *rx_ring,
#endif
/* allocate a skb to store the frags */
- skb = netdev_alloc_skb_ip_align(rx_ring->netdev,
+ skb = netdev_alloc_skb_ip_align(netdev_ring(rx_ring),
IXGBE_RX_HDR_SIZE);
if (unlikely(!skb)) {
rx_ring->rx_stats.alloc_rx_buff_failed++;
@@ -1986,6 +1990,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
struct ixgbe_adapter *adapter = q_vector->adapter;
int ddp_bytes;
unsigned int mss = 0;
+ struct net_device *netdev = netdev_ring(rx_ring);
#endif /* IXGBE_FCOE */
u16 cleaned_count = ixgbe_desc_unused(rx_ring);
@@ -2041,7 +2046,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
/* include DDPed FCoE data */
if (ddp_bytes > 0) {
if (!mss) {
- mss = rx_ring->netdev->mtu -
+ mss = netdev->mtu -
sizeof(struct fcoe_hdr) -
sizeof(struct fc_frame_header) -
sizeof(struct fcoe_crc_eof);
@@ -2455,58 +2460,6 @@ static void ixgbe_check_lsc(struct ixgbe_adapter *adapter)
}
}
-static inline void ixgbe_irq_enable_queues(struct ixgbe_adapter *adapter,
- u64 qmask)
-{
- u32 mask;
- struct ixgbe_hw *hw = &adapter->hw;
-
- switch (hw->mac.type) {
- case ixgbe_mac_82598EB:
- mask = (IXGBE_EIMS_RTX_QUEUE & qmask);
- IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask);
- break;
- case ixgbe_mac_82599EB:
- case ixgbe_mac_X540:
- mask = (qmask & 0xFFFFFFFF);
- if (mask)
- IXGBE_WRITE_REG(hw, IXGBE_EIMS_EX(0), mask);
- mask = (qmask >> 32);
- if (mask)
- IXGBE_WRITE_REG(hw, IXGBE_EIMS_EX(1), mask);
- break;
- default:
- break;
- }
- /* skip the flush */
-}
-
-static inline void ixgbe_irq_disable_queues(struct ixgbe_adapter *adapter,
- u64 qmask)
-{
- u32 mask;
- struct ixgbe_hw *hw = &adapter->hw;
-
- switch (hw->mac.type) {
- case ixgbe_mac_82598EB:
- mask = (IXGBE_EIMS_RTX_QUEUE & qmask);
- IXGBE_WRITE_REG(hw, IXGBE_EIMC, mask);
- break;
- case ixgbe_mac_82599EB:
- case ixgbe_mac_X540:
- mask = (qmask & 0xFFFFFFFF);
- if (mask)
- IXGBE_WRITE_REG(hw, IXGBE_EIMC_EX(0), mask);
- mask = (qmask >> 32);
- if (mask)
- IXGBE_WRITE_REG(hw, IXGBE_EIMC_EX(1), mask);
- break;
- default:
- break;
- }
- /* skip the flush */
-}
-
/**
* ixgbe_irq_enable - Enable default interrupt generation settings
* @adapter: board private structure
@@ -2946,6 +2899,7 @@ static void ixgbe_configure_msi_and_legacy(struct ixgbe_adapter *adapter)
void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
struct ixgbe_ring *ring)
{
+ struct net_device *netdev = netdev_ring(ring);
struct ixgbe_hw *hw = &adapter->hw;
u64 tdba = ring->dma;
int wait_loop = 10;
@@ -3005,7 +2959,7 @@ void ixgbe_configure_tx_ring(struct ixgbe_adapter *adapter,
struct ixgbe_q_vector *q_vector = ring->q_vector;
if (q_vector)
- netif_set_xps_queue(adapter->netdev,
+ netif_set_xps_queue(netdev,
&q_vector->affinity_mask,
ring->queue_index);
}
@@ -3395,7 +3349,7 @@ static void ixgbe_setup_psrtype(struct ixgbe_adapter *adapter)
{
struct ixgbe_hw *hw = &adapter->hw;
int rss_i = adapter->ring_feature[RING_F_RSS].indices;
- int p;
+ u16 pool;
/* PSRTYPE must be initialized in non 82598 adapters */
u32 psrtype = IXGBE_PSRTYPE_TCPHDR |
@@ -3412,9 +3366,8 @@ static void ixgbe_setup_psrtype(struct ixgbe_adapter *adapter)
else if (rss_i > 1)
psrtype |= 1 << 29;
- for (p = 0; p < adapter->num_rx_pools; p++)
- IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(VMDQ_P(p)),
- psrtype);
+ for_each_set_bit(pool, &adapter->l2a_bitmask, 32)
+ IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(VMDQ_P(pool)), psrtype);
}
static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
@@ -3683,6 +3636,8 @@ static void ixgbe_vlan_strip_disable(struct ixgbe_adapter *adapter)
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
for (i = 0; i < adapter->num_rx_queues; i++) {
+ if (adapter->rx_ring[i]->vmdq_netdev)
+ continue;
j = adapter->rx_ring[i]->reg_idx;
vlnctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(j));
vlnctrl &= ~IXGBE_RXDCTL_VME;
@@ -3713,6 +3668,8 @@ static void ixgbe_vlan_strip_enable(struct ixgbe_adapter *adapter)
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
for (i = 0; i < adapter->num_rx_queues; i++) {
+ if (adapter->rx_ring[i]->vmdq_netdev)
+ continue;
j = adapter->rx_ring[i]->reg_idx;
vlnctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(j));
vlnctrl |= IXGBE_RXDCTL_VME;
@@ -3743,15 +3700,16 @@ static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter)
* 0 on no addresses written
* X on writing X addresses to the RAR table
**/
-static int ixgbe_write_uc_addr_list(struct net_device *netdev)
+int ixgbe_write_uc_addr_list(struct net_device *netdev)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
unsigned int rar_entries = hw->mac.num_rar_entries - 1;
int count = 0;
- /* In SR-IOV mode significantly less RAR entries are available */
- if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
+ /* In SR-IOV/VMDQ modes significantly less RAR entries are available */
+ if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED ||
+ adapter->flags & IXGBE_FLAG_VMDQ_ENABLED)
rar_entries = IXGBE_MAX_PF_MACVLANS - 1;
/* return ENOMEM indicating insufficient memory for addresses */
@@ -3772,6 +3730,7 @@ static int ixgbe_write_uc_addr_list(struct net_device *netdev)
count++;
}
}
+
/* write the addresses in reverse order to avoid write combining */
for (; rar_entries > 0 ; rar_entries--)
hw->mac.ops.clear_rar(hw, rar_entries);
@@ -4133,6 +4092,7 @@ static void ixgbe_configure(struct ixgbe_adapter *adapter)
ixgbe_configure_virtualization(adapter);
ixgbe_set_rx_mode(adapter->netdev);
+
ixgbe_restore_vlan(adapter);
switch (hw->mac.type) {
@@ -4459,7 +4419,7 @@ void ixgbe_reset(struct ixgbe_adapter *adapter)
* ixgbe_clean_rx_ring - Free Rx Buffers per Queue
* @rx_ring: ring to free buffers from
**/
-static void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring)
+void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring)
{
struct device *dev = rx_ring->dev;
unsigned long size;
@@ -4838,6 +4798,8 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)
return -EIO;
}
+ /* PF holds first pool slot */
+ set_bit(0, &adapter->l2a_bitmask);
set_bit(__IXGBE_DOWN, &adapter->state);
return 0;
@@ -5143,7 +5105,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
static int ixgbe_open(struct net_device *netdev)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
- int err;
+ int err, queues;
/* disallow open during test */
if (test_bit(__IXGBE_TESTING, &adapter->state))
@@ -5168,16 +5130,22 @@ static int ixgbe_open(struct net_device *netdev)
goto err_req_irq;
/* Notify the stack of the actual queue counts. */
- err = netif_set_real_num_tx_queues(netdev,
- adapter->num_rx_pools > 1 ? 1 :
- adapter->num_tx_queues);
+ if (adapter->num_rx_pools > 1 &&
+ adapter->num_tx_queues > IXGBE_MAX_L2A_QUEUES)
+ queues = IXGBE_MAX_L2A_QUEUES;
+ else
+ queues = adapter->num_tx_queues;
+
+ err = netif_set_real_num_tx_queues(netdev, queues);
if (err)
goto err_set_queues;
-
- err = netif_set_real_num_rx_queues(netdev,
- adapter->num_rx_pools > 1 ? 1 :
- adapter->num_rx_queues);
+ if (adapter->num_rx_pools > 1 &&
+ adapter->num_rx_queues > IXGBE_MAX_L2A_QUEUES)
+ queues = IXGBE_MAX_L2A_QUEUES;
+ else
+ queues = adapter->num_rx_queues;
+ err = netif_set_real_num_rx_queues(netdev, queues);
if (err)
goto err_set_queues;
@@ -5215,7 +5183,6 @@ static int ixgbe_close(struct net_device *netdev)
struct ixgbe_adapter *adapter = netdev_priv(netdev);
ixgbe_ptp_stop(adapter);
-
ixgbe_down(adapter);
ixgbe_free_irq(adapter);
@@ -6576,7 +6543,7 @@ static void ixgbe_atr(struct ixgbe_ring *ring,
static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size)
{
- netif_stop_subqueue(tx_ring->netdev, tx_ring->queue_index);
+ netif_stop_subqueue(netdev_ring(tx_ring), tx_ring->queue_index);
/* Herbert's original patch had:
* smp_mb__after_netif_stop_queue();
* but since that doesn't exist yet, just open code it. */
@@ -6588,7 +6555,7 @@ static int __ixgbe_maybe_stop_tx(struct ixgbe_ring *tx_ring, u16 size)
return -EBUSY;
/* A reprieve! - use start_queue because it doesn't call schedule */
- netif_start_subqueue(tx_ring->netdev, tx_ring->queue_index);
+ netif_start_subqueue(netdev_ring(tx_ring), tx_ring->queue_index);
++tx_ring->tx_stats.restart_queue;
return 0;
}
@@ -6639,6 +6606,9 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
struct ixgbe_ring *tx_ring)
{
struct ixgbe_tx_buffer *first;
+#ifdef IXGBE_FCOE
+ struct net_device *dev;
+#endif
int tso;
u32 tx_flags = 0;
unsigned short f;
@@ -6730,9 +6700,10 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
first->protocol = protocol;
#ifdef IXGBE_FCOE
+ dev = netdev_ring(tx_ring);
/* setup tx offload for FCoE */
if ((protocol == __constant_htons(ETH_P_FCOE)) &&
- (tx_ring->netdev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) {
+ (dev->features & (NETIF_F_FSO | NETIF_F_FCOE_CRC))) {
tso = ixgbe_fso(tx_ring, first, &hdr_len);
if (tso < 0)
goto out_drop;
@@ -7057,6 +7028,7 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc)
*/
if (netif_running(dev))
ixgbe_close(dev);
+
ixgbe_clear_interrupt_scheme(adapter);
#ifdef CONFIG_IXGBE_DCB
@@ -7305,6 +7277,219 @@ static int ixgbe_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
}
+static void ixgbe_irq_disable_queues(struct ixgbe_adapter *adapter, u64 qmask)
+{
+ u32 mask;
+ struct ixgbe_hw *hw = &adapter->hw;
+
+ switch (hw->mac.type) {
+ case ixgbe_mac_82598EB:
+ mask = (IXGBE_EIMS_RTX_QUEUE & qmask);
+ IXGBE_WRITE_REG(hw, IXGBE_EIMC, mask);
+ break;
+ case ixgbe_mac_82599EB:
+ case ixgbe_mac_X540:
+ mask = (qmask & 0xFFFFFFFF);
+ if (mask)
+ IXGBE_WRITE_REG(hw, IXGBE_EIMC_EX(0), mask);
+ mask = (qmask >> 32);
+ if (mask)
+ IXGBE_WRITE_REG(hw, IXGBE_EIMC_EX(1), mask);
+ break;
+ default:
+ break;
+ }
+}
+
+static void ixgbe_add_mac_filter(struct ixgbe_adapter *adapter,
+ u8 *addr, u16 pool)
+{
+ struct ixgbe_hw *hw = &adapter->hw;
+ unsigned int entry;
+
+ entry = hw->mac.num_rar_entries - pool;
+ hw->mac.ops.set_rar(hw, entry, addr, VMDQ_P(pool), IXGBE_RAH_AV);
+}
+
+static void ixgbe_l2a_psrtype(struct ixgbe_l2a_adapter *vadapter)
+{
+ struct ixgbe_adapter *adapter = vadapter->real_adapter;
+ int rss_i = vadapter->netdev->real_num_rx_queues;
+ struct ixgbe_hw *hw = &adapter->hw;
+ u16 pool = vadapter->pool;
+ u32 psrtype = IXGBE_PSRTYPE_TCPHDR |
+ IXGBE_PSRTYPE_UDPHDR |
+ IXGBE_PSRTYPE_IPV4HDR |
+ IXGBE_PSRTYPE_L2HDR |
+ IXGBE_PSRTYPE_IPV6HDR;
+
+ if (hw->mac.type == ixgbe_mac_82598EB)
+ return;
+
+ if (rss_i > 3)
+ psrtype |= 2 << 29;
+ else if (rss_i > 1)
+ psrtype |= 1 << 29;
+
+ IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(VMDQ_P(pool)), psrtype);
+}
+
+static void ixgbe_enable_l2a_ring(struct ixgbe_adapter *adapter,
+ struct ixgbe_ring *rx_ring)
+{
+ ixgbe_configure_rx_ring(adapter, rx_ring);
+}
+
+
+static void ixgbe_disable_l2a_ring(struct ixgbe_l2a_adapter *vadapter,
+ struct ixgbe_ring *rx_ring)
+{
+ struct ixgbe_adapter *adapter = vadapter->real_adapter;
+ int index = rx_ring->queue_index + vadapter->rx_base_queue;
+
+ /* shutdown specific queue receive and wait for dma to settle */
+ ixgbe_disable_rx_queue(adapter, rx_ring);
+ usleep_range(10000, 20000);
+ ixgbe_irq_disable_queues(adapter, ((u64)1 << index));
+ ixgbe_clean_rx_ring(rx_ring);
+}
+
+int ixgbe_l2a_ring_up(struct net_device *vdev, struct ixgbe_l2a_adapter *accel)
+{
+ struct ixgbe_adapter *adapter = accel->real_adapter;
+ unsigned int rxbase = accel->pool * adapter->num_rx_queues_per_pool;
+ unsigned int txbase = accel->pool * adapter->num_rx_queues_per_pool;
+ int err, i;
+
+
+ accel->rx_base_queue = rxbase;
+ accel->tx_base_queue = txbase;
+
+ for (i = 0; i < vdev->num_rx_queues; i++)
+ ixgbe_disable_l2a_ring(accel, adapter->rx_ring[rxbase + i]);
+
+ for (i = 0; i < vdev->num_rx_queues; i++) {
+ adapter->rx_ring[rxbase + i]->vmdq_netdev = vdev;
+ ixgbe_enable_l2a_ring(adapter, adapter->rx_ring[rxbase + i]);
+ }
+
+ for (i = 0; i < vdev->num_tx_queues; i++)
+ adapter->tx_ring[txbase + i]->vmdq_netdev = vdev;
+
+ if (is_valid_ether_addr(vdev->dev_addr))
+ ixgbe_add_mac_filter(adapter, vdev->dev_addr, accel->pool);
+
+ err = netif_set_real_num_tx_queues(vdev, vdev->num_tx_queues);
+ if (err)
+ goto err_set_queues;
+ err = netif_set_real_num_rx_queues(vdev, vdev->num_rx_queues);
+ if (err)
+ goto err_set_queues;
+
+ ixgbe_l2a_psrtype(accel);
+ netif_tx_start_all_queues(vdev);
+ return 0;
+err_set_queues:
+ for (i = 0; i < vdev->num_rx_queues; i++)
+ ixgbe_disable_l2a_ring(accel, adapter->rx_ring[rxbase + i]);
+ return err;
+}
+
+int ixgbe_l2a_ring_down(struct net_device *vdev, struct ixgbe_l2a_adapter *accel)
+{
+ struct ixgbe_adapter *adapter = accel->real_adapter;
+ unsigned int rxbase = accel->rx_base_queue;
+ int i;
+
+ netif_tx_stop_all_queues(vdev);
+
+ for (i = 0; i < vdev->num_rx_queues; i++)
+ ixgbe_disable_l2a_ring(accel, adapter->rx_ring[rxbase + i]);
+
+ return 0;
+}
+
+static int ixgbe_l2a_add(struct net_device *pdev, struct net_device *vdev,
+ void *priv)
+{
+ struct ixgbe_l2a_adapter *l2a_adapter = priv;
+ struct ixgbe_adapter *adapter = netdev_priv(pdev);
+ int pool, vmdq_pool, base_queue;
+ int err;
+
+ /* Check for hardware restriction on number of rx/tx queues */
+ if (vdev->num_rx_queues != vdev->num_tx_queues ||
+ vdev->num_tx_queues > IXGBE_MAX_L2A_QUEUES ||
+ vdev->num_tx_queues == IXGBE_BAD_L2A_QUEUE) {
+ netdev_info(pdev, "%s: Supports RX/TX Queue counts 1,2, and 4\n",
+ pdev->name);
+ return -EINVAL;
+ }
+
+ if (adapter->num_rx_pools > IXGBE_MAX_VMDQ_INDICES)
+ return -EBUSY;
+
+ pool = find_first_zero_bit(&adapter->l2a_bitmask, 32);
+ adapter->num_rx_pools++;
+ set_bit(pool, &adapter->l2a_bitmask);
+
+ /* Enable VMDq flag so device will be set in VM mode */
+ adapter->flags |= IXGBE_FLAG_VMDQ_ENABLED | IXGBE_FLAG_SRIOV_ENABLED;
+ adapter->ring_feature[RING_F_VMDQ].limit = adapter->num_rx_pools;
+ adapter->ring_feature[RING_F_VMDQ].offset = 0;
+ adapter->ring_feature[RING_F_RSS].limit = IXGBE_MAX_L2A_QUEUES;
+
+ /* Force reinit of ring allocation with VMDQ enabled */
+ ixgbe_setup_tc(pdev, netdev_get_num_tc(pdev));
+
+ /* Configure VSI adapter structure */
+ vmdq_pool = VMDQ_P(pool);
+ base_queue = vmdq_pool * adapter->num_rx_queues_per_pool;
+
+ netdev_dbg(pdev, "pool %i:%i queues %i:%i VSI bitmask %lx\n",
+ pool, adapter->num_rx_pools,
+ base_queue, base_queue + adapter->num_rx_queues_per_pool,
+ adapter->l2a_bitmask);
+
+ l2a_adapter->pool = pool;
+ l2a_adapter->netdev = vdev;
+ l2a_adapter->real_adapter = adapter;
+ l2a_adapter->rx_base_queue = base_queue;
+ l2a_adapter->tx_base_queue = base_queue;
+
+ err = ixgbe_l2a_ring_up(vdev, l2a_adapter);
+ return err;
+}
+
+static void ixgbe_l2a_del(struct net_device *pdev, void *priv)
+{
+ struct ixgbe_l2a_adapter *l2a_adapter = priv;
+ struct ixgbe_adapter *adapter = l2a_adapter->real_adapter;
+
+ clear_bit(l2a_adapter->pool, &adapter->l2a_bitmask);
+ adapter->num_rx_pools--;
+
+ ixgbe_l2a_ring_down(l2a_adapter->netdev, l2a_adapter);
+
+ netdev_dbg(pdev, "pool %i:%i queues %i:%i VSI bitmask %lx\n",
+ l2a_adapter->pool, adapter->num_rx_pools,
+ l2a_adapter->rx_base_queue,
+ l2a_adapter->rx_base_queue + adapter->num_rx_queues_per_pool,
+ adapter->l2a_bitmask);
+}
+
+netdev_tx_t ixgbe_l2a_xmit_frame(struct sk_buff *skb, void *priv)
+{
+ struct ixgbe_l2a_adapter *l2a_adapter = priv;
+ struct ixgbe_ring *tx_ring;
+ unsigned int queue;
+
+ queue = skb->queue_mapping + l2a_adapter->tx_base_queue;
+ tx_ring = l2a_adapter->real_adapter->tx_ring[queue];
+
+ return ixgbe_xmit_frame_ring(skb, l2a_adapter->real_adapter, tx_ring);
+}
+
static const struct net_device_ops ixgbe_netdev_ops = {
.ndo_open = ixgbe_open,
.ndo_stop = ixgbe_close,
@@ -7351,6 +7536,13 @@ static const struct net_device_ops ixgbe_netdev_ops = {
.ndo_bridge_getlink = ixgbe_ndo_bridge_getlink,
};
+const struct l2_forwarding_accel_ops ixgbe_l2a_ops = {
+ .priv_size = sizeof(struct ixgbe_l2a_adapter),
+ .l2_accel_add_dev = ixgbe_l2a_add,
+ .l2_accel_del_dev = ixgbe_l2a_del,
+ .l2_accel_xmit = ixgbe_l2a_xmit_frame,
+};
+
/**
* ixgbe_enumerate_functions - Get the number of ports this device has
* @adapter: adapter structure
--
1.8.3.1
^ permalink raw reply related
* Re: Kernel Panic Sending Frames Using dev_queue_xmit()
From: Merlin Davis @ 2013-09-25 21:29 UTC (permalink / raw)
To: Ben Hutchings, netdev
In-Reply-To: <1380133174.2222.13.camel@bwh-desktop.uk.level5networks.com>
> You are more likely to get help if you include the code in your email
> rather than linking to it.
Understood. Thank you for the protocol tip. Here is the code
(test_send.c) of the module causing the kernel panic when I send SKBs
through dev_queue_xmit(). Below it are my notes (NOTES.txt) on the
behavior, testing, etc.
test_send.c
========
#include <linux/err.h>
#include <linux/if_ether.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/rcupdate.h>
#include <linux/sched.h>
#include <linux/skbuff.h>
#include <linux/string.h>
#include <net/net_namespace.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Merlin Davis <me.the.wizard@gmail.com>");
static char* iface = "eth0";
module_param(iface, charp, 0);
MODULE_PARM_DESC(iface, "Name of output interface");
static unsigned long n = 0;
module_param(n, ulong, 0);
MODULE_PARM_DESC(
n, "Number of packets to send (zero for continuous)");
static const unsigned int MAX_PENDING = 10u;
static struct net_device* sendDev = NULL;
static struct task_struct* sendThread = NULL;
static unsigned long nSent = 0uL;
static atomic_t nPending;
static wait_queue_head_t sendWq;
// Real ICMP echo response frame captured from eth0
static char FRAME_DATA[] =
{
0x0a, 0x00, 0x27, 0x00, 0x00, 0x00, // dest MAC addr
0x08, 0x00, 0x27, 0x98, 0xa0, 0xea, // src MAC addr
0x08, 0x00, // IPv4
0x45, // v4, header length 20
0x00, // DCSP, ECN
0x00, 0x54, // total IPv4 length 84
0xdc, 0x5a, // ID
0x00, 0x00, // flags, fragment offset
0x40, // TTL 64
0x01, // protocol ICMP
0xac, 0xf2, // IPv4 header checksum
0xc0, 0xa8, 0x38, 0x0a, // src IP addr
0xc0, 0xa8, 0x38, 0x01, // dest IP addr
0x00, // echo reply
0x00, // code 0
0xf8, 0x17, // ICMP header checksum
0x07, 0x80, // echo ID
0x00, 0x0a, // echo sequence number
// echo data
0x94, 0x89, 0x16, 0x52, 0x00, 0x00, 0x00, 0x00,
0x8d, 0xaf, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37
};
static void testSend_exit(void);
static int testSendThreadfn(void* data);
static void testSend_skb_destruct(struct sk_buff* skb);
static int __init testSend_init(void)
{
struct net* netNs = NULL;
int err = 0;
atomic_set(&nPending, 0);
init_waitqueue_head(&sendWq);
if (!iface)
{
printk(KERN_ERR
"test_send: Non-null device name must be "
"specified via iface=<name>\n");
err = -EINVAL;
goto err;
}
rcu_read_lock();
for_each_net_rcu(netNs)
{
sendDev = dev_get_by_name(netNs, iface);
if (sendDev)
{
break;
}
}
netNs = NULL;
rcu_read_unlock();
if (!sendDev)
{
printk(KERN_ERR "Invalid device name '%s'\n", iface);
err = -EINVAL;
goto err;
}
sendThread = kthread_run(testSendThreadfn, 0, "test_send");
if (IS_ERR(sendThread))
{
err = PTR_ERR(sendThread);
sendThread = NULL;
goto err;
}
// keep reference so we can kthread_stop() even after
// thread returns
get_task_struct(sendThread);
return 0;
err:
testSend_exit();
return err;
}
module_init(testSend_init);
static void testSend_exit(void)
{
if (sendThread)
{
kthread_stop(sendThread);
// cleanup extra reference kept for the kthread_stop()
put_task_struct(sendThread);
sendThread = NULL;
}
while (atomic_read(&nPending) > 0)
{
wait_event_interruptible(sendWq,
atomic_read(&nPending) <= 0);
}
if (sendDev)
{
dev_put(sendDev);
sendDev = NULL;
}
}
static void __exit _testSend_exit(void)
{
testSend_exit();
printk(KERN_INFO "test_send: Sent %lu frames\n", nSent);
}
module_exit(_testSend_exit);
static int testSendThreadfn(void* data)
{
int reservedSpace = max((int)LL_RESERVED_SPACE(sendDev),
(int)sizeof(struct ethhdr));
int buffLen = reservedSpace - sizeof(struct ethhdr) +
sizeof(FRAME_DATA) +
sendDev->needed_tailroom;
while (!kthread_should_stop() && (n == 0 || nSent < n))
{
struct sk_buff* skb = NULL;
int err = 0;
while (atomic_read(&nPending) >= MAX_PENDING)
{
wait_event_interruptible(
sendWq, atomic_read(&nPending) < MAX_PENDING);
if (kthread_should_stop())
{
goto out;
}
}
skb = alloc_skb(buffLen, GFP_KERNEL);
if (!skb)
{
printk(KERN_ERR "test_send: Couldn't allocate SKB\n");
schedule();
continue;
}
skb_reserve(skb, reservedSpace);
skb_reset_network_header(skb);
skb_put(skb, sizeof(FRAME_DATA) - sizeof(struct ethhdr));
skb_push(skb, sizeof(struct ethhdr));
skb_reset_mac_header(skb);
skb_reset_mac_len(skb);
err = skb_store_bits(skb,
0,
FRAME_DATA,
sizeof(FRAME_DATA));
if (err)
{
printk(KERN_ERR
"test_send: Error %d storing to SKB\n", err);
schedule();
continue;
}
skb->dev = sendDev;
skb->protocol = htons(ETH_P_IP);
skb->destructor = testSend_skb_destruct;
skb_shinfo(skb)->destructor_arg = NULL;
// NOTE: Without this, the destructor is called twice and
// there is an almost immediate kernel panic. With it,
// a kernel panic still occurs but takes a while to
// manifest.
skb_get(skb);
atomic_inc(&nPending);
err = net_xmit_eval(dev_queue_xmit(skb));
if (err)
{
printk(KERN_ERR
"test_send: Error %d sending frame\n", err);
schedule();
continue;
}
++nSent;
//printk(KERN_ERR "test_send: SENT SKB\n");
}
out:
return 0;
}
static void testSend_skb_destruct(struct sk_buff* skb)
{
//printk(KERN_ERR "test_send: DESTRUCTING SKB\n");
atomic_dec(&nPending);
wake_up_all(&sendWq);
}
NOTES.txt
========
* Running on a VirtualBox VM with 64-bit Ubuntu 12.10 and the
3.5.0-40-generic kernel (and matching kernel headers for
module compilation). The VM has been allocated 4 CPU cores
and 2GB of memory (it has no swap partition). The module had
been tested on a previous kernel version (also 3.5.0-x) and
exhibited the same symptoms. The network adapter set in
VirtualBox is the default "Intel PRO/1000 MT Desktop
(82540EM)", and uses the e1000 driver
(drivers/net/ethernet/intel/e1000). However, other adapters
in VirtuaBox's list of choices that use different drivers have
also been tested with the same results.
* I have also tested this code on bare metal with a network card
using Intel's igb driver and on a VM with a compiled 2.6.39
kernel using all default configuration parameters, with the
same results.
* The idea of the module is to resend/replay frames previously
captured on the same network interface. The frames are
byte-for-byte identical to one originally captured. The
captured frame was an ICMP echo reply captured during ping
execution between the host machine and the VM, on the same
interface being tested (eth0 set to static 192.168.56.10/24 on
a VirtualBox host-only network); the packet was manually
inspected to verify it is a valid Ethernet/IPv4/ICMP/echo
reply message with correct checksums. This small module is a
stripped down test case created after running into the problem
in a larger project (one which DOES send packets associated
with a socket).
* The frames are sent without a socket, in a manner similar to
the way they are created and sent for IPv4 ARP. In fact, the
frames are constructed and sent in a way that is almost
identical to the way net/ipv4/arp.c does it. The exception is
that this module uses complete frame data including the
Ethernet header, unlike ARP which adds the hardware header
using dev_hard_header(). This module has been tested by
changing the code to use dev_hard_header() in an attempt to
diagnose the problem, but this does not change the behavior.
* A kernel panic occurs after sending one or more frames using
this module. The number of frames sent before the panic
occurs seems to vary, but it is inevitable that one occurs.
The panic does not always occur in the same place in kernel
code, but usually happens somewhere in __kfree_skb()—perhaps
in skb_release_head_state() as "? skb_release_head_state+..."
is the last line of the kernel stack trace. Sometimes,
though, it happens in the qdisk code for transmission or the
e1000 driver itself instead. It is ALMOST always a "BUG:
unable to handle kernel NULL pointer dereference", but rarely
I have seen a general protection fault instead.
* The first implementation sent SKBs endlessly and without
pause. This caused a panic much quicker. The code was then
changed to limit the number of outstanding SKBs pending in the
transmit code, similar to the way a socket's limited amount of
buffer space would (but done using a simple counter). This
results in the same sort of panic, but after a longer period
of time since the sned rate is naturally lower. Counting the
number of outstanding SKBs also resulted in the discovery of
an SKB reference counting problem.
* Calling dev_queue_xmit() with an SKB is supposed to turn
ownership of the SKB over to the transmit code, according to
the API documentation in net/core/dev.c. This would seem to
imply the reference count should be 1, and that reference is
turned over to the callee. However, when the reference count
is only 1, the transmit code destructs each SKB twice, meaning
somewhere it must be decrementing the reference count and
assuming it is still positive, then later incrementing and
decrementing it again. This causes an immediate kernel panic
in either the code to free the SKB or in a later memory
allocation operation.
* When an SKB's reference count is incremented to 2 just before
calling dev_queue_xmit(), the destructor seems to be called
just once (this can be tested by uncommenting a couple of
printk's in the code and loading the module with parameter
"n=x" to send x frames before terminating the send thread,
then checking the messages using dmesg, grep, wc, etc.). With
this reference count fix the kernel panic still occurs, but
only after the relatively long and varying period of execution
mentioned above (generally after hundreds of thousands of
frames). On the VM I am testing on, the panic usually happens
after somewhere between 15 seconds and 2 minutes.
* My best guess is that SOMETHING is overwriting memory with
null bytes or random data or soemthing. Is there something
wrong with the way the SKBs are being allocated, prepared,
turned over to the kernel for transmission, cleaned up, etc.?
If so, how is it different from the ARP implementation in a
way that causes a panic? Or is this a defect in the kernel
code itself, in which case how can Linux machines stay stable
and running with significant uptimes? Or is it just that this
is a very infrequent race condition of some sort and ARP
transmission is slow/infrequent enough that the mean time
before failure is very, very long?
* I have attempted both kernel debugging and panic message
capture, but despite following all the instructions I can find
online for doing this with a VirtualBox VM, I cannot seem to
get the debugger to resume execution properly when debugging,
the emulated serial console to work, or a crash dump to appear
in the VM after restart. So I seem to be stuck with code
inspection and good ol' printk-style debugging, unfortunately.
^ permalink raw reply
* [PATCH RFC] net: introduce support for lazy initialization of secret keys
From: Hannes Frederic Sowa @ 2013-09-25 21:34 UTC (permalink / raw)
To: netdev; +Cc: fw, edumazet, davem, ycheng
net_get_random_once is a new macro which handles the initialization of
secret keys at use-site. It is possible to call it in the fast path. Only
the initialization depends on the spinlock and is rather slow. Otherwise
it should get used just before the key is used to delay the entropy
extration as late as possible to get better randomness. It returns true
if the key got initialized.
This patch splits the secret key for syncookies between ipv4 and ipv6
and initializes them with net_get_random_once. This change was the reason
I did this patch. I think the initialization of the syncookie_secret is
way to early.
Changed key initialization of tcp_fastopen cookies to net_get_random_once.
Also initialize the secret keys for tcp connection hashing via
net_get_random_once.
Cc: Florian Westphal <fw@strlen.de>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
Please review carefully, especially the concurrency bits
(I also did not test the fastopen changes, yet).
I left net_get_random_once non-irq-safe because I hope I can spice up
__net_get_random_once with get_random_bytes_busy_wait_initialized later on as
soon as I get more feedback on that patch.
This patch depends on Eric Dumazet's patch: "net: net_secret should not depend on TCP"
(currently in patchwork)
Also, would it make sense to switch to static_keys in the net_get_random_once
macro?
include/linux/net.h | 17 +++++++++++++++++
include/net/tcp.h | 3 +--
net/core/secure_seq.c | 14 ++------------
net/core/utils.c | 16 ++++++++++++++++
net/ipv4/af_inet.c | 10 ++--------
net/ipv4/syncookies.c | 16 ++++++----------
net/ipv4/sysctl_net_ipv4.c | 5 +++++
net/ipv4/tcp_fastopen.c | 21 ++++++++++-----------
net/ipv6/syncookies.c | 10 ++++++++--
9 files changed, 67 insertions(+), 45 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index 4f27575..2bfb8ca 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -243,6 +243,23 @@ do { \
#define net_random() prandom_u32()
#define net_srandom(seed) prandom_seed((__force u32)(seed))
+bool __net_get_random_once(void *buf, int nbytes, bool *done,
+ spinlock_t *lock);
+
+/* BE CAREFUL: this function is not interrupt safe */
+#define net_get_random_once(buf, nbytes) \
+ ({ \
+ static DEFINE_SPINLOCK(__lock); \
+ static bool __done = false; \
+ bool __ret = false; \
+ if (unlikely(!__done)) \
+ __ret = __net_get_random_once(buf, \
+ nbytes, \
+ &__done, \
+ &__lock); \
+ __ret; \
+ })
+
extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
struct kvec *vec, size_t num, size_t len);
extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg,
diff --git a/include/net/tcp.h b/include/net/tcp.h
index de870ee..2a26100 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -475,7 +475,6 @@ int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size);
void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb);
/* From syncookies.c */
-extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th,
u32 cookie);
struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
@@ -1323,7 +1322,7 @@ extern struct tcp_fastopen_context __rcu *tcp_fastopen_ctx;
int tcp_fastopen_reset_cipher(void *key, unsigned int len);
void tcp_fastopen_cookie_gen(__be32 src, __be32 dst,
struct tcp_fastopen_cookie *foc);
-
+void tcp_fastopen_init_key_once(bool publish);
#define TCP_FASTOPEN_KEY_LENGTH 16
/* Fastopen key context */
diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c
index 3f1ec15..b02fd16 100644
--- a/net/core/secure_seq.c
+++ b/net/core/secure_seq.c
@@ -7,6 +7,7 @@
#include <linux/hrtimer.h>
#include <linux/ktime.h>
#include <linux/string.h>
+#include <linux/net.h>
#include <net/secure_seq.h>
@@ -16,18 +17,7 @@ static u32 net_secret[NET_SECRET_SIZE] ____cacheline_aligned;
static void net_secret_init(void)
{
- u32 tmp;
- int i;
-
- if (likely(net_secret[0]))
- return;
-
- for (i = NET_SECRET_SIZE; i > 0;) {
- do {
- get_random_bytes(&tmp, sizeof(tmp));
- } while (!tmp);
- cmpxchg(&net_secret[--i], 0, tmp);
- }
+ net_get_random_once(net_secret, sizeof(net_secret));
}
#ifdef CONFIG_INET
diff --git a/net/core/utils.c b/net/core/utils.c
index aa88e23..f2fa223 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -338,3 +338,19 @@ void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb,
csum_unfold(*sum)));
}
EXPORT_SYMBOL(inet_proto_csum_replace16);
+
+bool __net_get_random_once(void *buf, int nbytes, bool *done,
+ spinlock_t *lock)
+{
+ spin_lock_bh(lock);
+ if (*done) {
+ spin_unlock_bh(lock);
+ return false;
+ }
+
+ get_random_bytes(buf, nbytes);
+ *done = true;
+ spin_unlock_bh(lock);
+ return true;
+}
+EXPORT_SYMBOL(__net_get_random_once);
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index cfeb85c..1abd8c8 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -257,14 +257,8 @@ EXPORT_SYMBOL(ipv6_hash_secret);
*/
void build_ehash_secret(void)
{
- u32 rnd;
-
- do {
- get_random_bytes(&rnd, sizeof(rnd));
- } while (rnd == 0);
-
- if (cmpxchg(&inet_ehash_secret, 0, rnd) == 0)
- get_random_bytes(&ipv6_hash_secret, sizeof(ipv6_hash_secret));
+ net_get_random_once(&inet_ehash_secret, sizeof(inet_ehash_secret));
+ net_get_random_once(&ipv6_hash_secret, sizeof(ipv6_hash_secret));
}
EXPORT_SYMBOL(build_ehash_secret);
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 15e0241..af79b84 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -25,15 +25,7 @@
extern int sysctl_tcp_syncookies;
-__u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
-EXPORT_SYMBOL(syncookie_secret);
-
-static __init int init_syncookies(void)
-{
- get_random_bytes(syncookie_secret, sizeof(syncookie_secret));
- return 0;
-}
-__initcall(init_syncookies);
+static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
#define COOKIEBITS 24 /* Upper bits store count */
#define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
@@ -44,7 +36,11 @@ static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS],
static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport,
u32 count, int c)
{
- __u32 *tmp = __get_cpu_var(ipv4_cookie_scratch);
+ __u32 *tmp;
+
+ net_get_random_once(syncookie_secret, sizeof(syncookie_secret));
+
+ tmp = __get_cpu_var(ipv4_cookie_scratch);
memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c]));
tmp[0] = (__force u32)saddr;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 540279f..d2b5140 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -267,6 +267,11 @@ static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write,
ret = -EINVAL;
goto bad_key;
}
+ /* Generate a dummy secret but don't publish it. This
+ * is needed so we don't regenerate a new key on the
+ * first invocation of tcp_fastopen_cookie_gen
+ */
+ tcp_fastopen_init_key_once(false);
tcp_fastopen_reset_cipher(user_key, TCP_FASTOPEN_KEY_LENGTH);
}
diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c
index ab7bd35..2240103 100644
--- a/net/ipv4/tcp_fastopen.c
+++ b/net/ipv4/tcp_fastopen.c
@@ -14,6 +14,14 @@ struct tcp_fastopen_context __rcu *tcp_fastopen_ctx;
static DEFINE_SPINLOCK(tcp_fastopen_ctx_lock);
+void tcp_fastopen_init_key_once(bool publish)
+{
+ static __u8 key[TCP_FASTOPEN_KEY_LENGTH];
+
+ if (net_get_random_once(key, sizeof(key)) && publish)
+ tcp_fastopen_reset_cipher(key, sizeof(key));
+}
+
static void tcp_fastopen_ctx_free(struct rcu_head *head)
{
struct tcp_fastopen_context *ctx =
@@ -70,6 +78,8 @@ void tcp_fastopen_cookie_gen(__be32 src, __be32 dst,
__be32 path[4] = { src, dst, 0, 0 };
struct tcp_fastopen_context *ctx;
+ tcp_fastopen_init_key_once(true);
+
rcu_read_lock();
ctx = rcu_dereference(tcp_fastopen_ctx);
if (ctx) {
@@ -78,14 +88,3 @@ void tcp_fastopen_cookie_gen(__be32 src, __be32 dst,
}
rcu_read_unlock();
}
-
-static int __init tcp_fastopen_init(void)
-{
- __u8 key[TCP_FASTOPEN_KEY_LENGTH];
-
- get_random_bytes(key, sizeof(key));
- tcp_fastopen_reset_cipher(key, sizeof(key));
- return 0;
-}
-
-late_initcall(tcp_fastopen_init);
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index d703218..a454cef 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -21,6 +21,8 @@
#include <net/ipv6.h>
#include <net/tcp.h>
+static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS];
+
#define COOKIEBITS 24 /* Upper bits store count */
#define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
@@ -61,14 +63,18 @@ static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS],
static u32 cookie_hash(const struct in6_addr *saddr, const struct in6_addr *daddr,
__be16 sport, __be16 dport, u32 count, int c)
{
- __u32 *tmp = __get_cpu_var(ipv6_cookie_scratch);
+ __u32 *tmp;
+
+ net_get_random_once(syncookie6_secret, sizeof(syncookie6_secret));
+
+ tmp = __get_cpu_var(ipv6_cookie_scratch);
/*
* we have 320 bits of information to hash, copy in the remaining
* 192 bits required for sha_transform, from the syncookie_secret
* and overwrite the digest with the secret
*/
- memcpy(tmp + 10, syncookie_secret[c], 44);
+ memcpy(tmp + 10, syncookie6_secret[c], 44);
memcpy(tmp, saddr, 16);
memcpy(tmp + 4, daddr, 16);
tmp[8] = ((__force u32)sport << 16) + (__force u32)dport;
--
1.8.3.1
^ permalink raw reply related
* Re: Result Notification
From: Marie Siggelin @ 2013-09-25 21:48 UTC (permalink / raw)
To: info
Reply back to uk.larrywilliams@gmail.com as soon as you receive this notification massage for your claims. Ticket Number: 3134231835667
^ permalink raw reply
* Re: Kernel Panic Sending Frames Using dev_queue_xmit()
From: Francois Romieu @ 2013-09-25 22:03 UTC (permalink / raw)
To: Merlin Davis; +Cc: Ben Hutchings, netdev
In-Reply-To: <CAFu7c2XDYR-SMiuqMxtqGhfM00nw8-h0Tr2uewN8+D1BptsayA@mail.gmail.com>
Merlin Davis <me.the.wizard@gmail.com> :
[...]
> err = net_xmit_eval(dev_queue_xmit(skb));
Macro expansion bug.
--
Ueimor
^ permalink raw reply
* [PATCH] ipv6: Fix preferred_lft not updating in some cases
From: Paul Marks @ 2013-09-25 22:12 UTC (permalink / raw)
To: netdev; +Cc: davem, yoshfuji, lorenzo, Paul Marks
Consider the scenario where an IPv6 router is advertising a fixed
preferred_lft of 1800 seconds, while the valid_lft begins at 3600
seconds and counts down in realtime.
A client should reset its preferred_lft to 1800 every time the RA is
received, but a bug is causing Linux to ignore the update.
The core problem is here:
if (prefered_lft != ifp->prefered_lft) {
Note that ifp->prefered_lft is an offset, so it doesn't decrease over
time. Thus, the comparison is always (1800 != 1800), which fails to
trigger an update.
The most direct solution would be to compute a "stored_prefered_lft",
and use that value in the comparison. But I think that trying to filter
out unnecessary updates here is a premature optimization. In order for
the filter to apply, both of these would need to hold:
- The advertised valid_lft and preferred_lft are both declining in
real time.
- No clock skew exists between the router & client.
So in this patch, I've set "update_lft = 1" unconditionally, which
allows the surrounding code to be greatly simplified.
Signed-off-by: Paul Marks <pmarks@google.com>
---
net/ipv6/addrconf.c | 52 +++++++++++++++-------------------------------------
1 file changed, 15 insertions(+), 37 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d6ff126..9a5052c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2193,43 +2193,21 @@ ok:
else
stored_lft = 0;
if (!update_lft && !create && stored_lft) {
- if (valid_lft > MIN_VALID_LIFETIME ||
- valid_lft > stored_lft)
- update_lft = 1;
- else if (stored_lft <= MIN_VALID_LIFETIME) {
- /* valid_lft <= stored_lft is always true */
- /*
- * RFC 4862 Section 5.5.3e:
- * "Note that the preferred lifetime of
- * the corresponding address is always
- * reset to the Preferred Lifetime in
- * the received Prefix Information
- * option, regardless of whether the
- * valid lifetime is also reset or
- * ignored."
- *
- * So if the preferred lifetime in
- * this advertisement is different
- * than what we have stored, but the
- * valid lifetime is invalid, just
- * reset prefered_lft.
- *
- * We must set the valid lifetime
- * to the stored lifetime since we'll
- * be updating the timestamp below,
- * else we'll set it back to the
- * minimum.
- */
- if (prefered_lft != ifp->prefered_lft) {
- valid_lft = stored_lft;
- update_lft = 1;
- }
- } else {
- valid_lft = MIN_VALID_LIFETIME;
- if (valid_lft < prefered_lft)
- prefered_lft = valid_lft;
- update_lft = 1;
- }
+ const u32 minimum_lft = min(
+ stored_lft, (u32)MIN_VALID_LIFETIME);
+ valid_lft = max(valid_lft, minimum_lft);
+
+ /* RFC4862 Section 5.5.3e:
+ * "Note that the preferred lifetime of the
+ * corresponding address is always reset to
+ * the Preferred Lifetime in the received
+ * Prefix Information option, regardless of
+ * whether the valid lifetime is also reset or
+ * ignored."
+ *
+ * So we should always update prefered_lft here.
+ */
+ update_lft = 1;
}
if (update_lft) {
--
1.8.4
^ permalink raw reply related
* Re: [PATCH RFC] net: introduce support for lazy initialization of secret keys
From: Florian Westphal @ 2013-09-25 22:14 UTC (permalink / raw)
To: netdev
In-Reply-To: <20130925213403.GF4904@order.stressinduktion.org>
Hannes Frederic Sowa <hannes@stressinduktion.org> wrote:
> This patch splits the secret key for syncookies between ipv4 and ipv6
> and initializes them with net_get_random_once. This change was the reason
> I did this patch. I think the initialization of the syncookie_secret is
> way to early.
Agreed, thanks for working on this.
^ permalink raw reply
* Re: [PATCH 06/11] ipw2x00: Remove extern from function prototypes
From: Stanislav Yakovlev @ 2013-09-25 22:24 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, David S. Miller, John W. Linville, wireless, linux-kernel
In-Reply-To: <89eb744f1a77b32d6ec718618f356df3188403e7.1380137609.git.joe@perches.com>
Hi Joe,
On 25 September 2013 23:37, Joe Perches <joe@perches.com> wrote:
> There are a mix of function prototypes with and without extern
> in the kernel sources. Standardize on not using extern for
> function prototypes.
>
> Function prototypes don't need to be written with extern.
> extern is assumed by the compiler. Its use is as unnecessary as
> using auto to declare automatic/local variables in a block.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
Looks fine, thanks.
Stanislav.
^ permalink raw reply
* Re: [PATCH RFC] net: introduce support for lazy initialization of secret keys
From: Eric Dumazet @ 2013-09-25 22:42 UTC (permalink / raw)
To: Hannes Frederic Sowa; +Cc: netdev, fw, edumazet, davem, ycheng
In-Reply-To: <20130925213403.GF4904@order.stressinduktion.org>
On Wed, 2013-09-25 at 23:34 +0200, Hannes Frederic Sowa wrote:
> net_get_random_once is a new macro which handles the initialization of
> secret keys at use-site. It is possible to call it in the fast path. Only
> the initialization depends on the spinlock and is rather slow. Otherwise
> it should get used just before the key is used to delay the entropy
> extration as late as possible to get better randomness. It returns true
> if the key got initialized.
So you don't like cmpxchg() ;)
> +/* BE CAREFUL: this function is not interrupt safe */
> +#define net_get_random_once(buf, nbytes) \
> + ({ \
> + static DEFINE_SPINLOCK(__lock); \
> + static bool __done = false; \
> + bool __ret = false; \
> + if (unlikely(!__done)) \
> + __ret = __net_get_random_once(buf, \
> + nbytes, \
> + &__done, \
> + &__lock); \
> + __ret; \
> + })
> +
>
No idea why its needed to have one spinlock per call point.
A single lock should be more than enough.
The spinlock could be private to __net_get_random_once()
+bool __net_get_random_once(void *buf, int nbytes, bool *done,
+ spinlock_t *lock)
+{
+ spin_lock_bh(lock);
+ if (*done) {
+ spin_unlock_bh(lock);
+ return false;
+ }
+
+ get_random_bytes(buf, nbytes);
I think you might need a memory barrier here.
(smp_wmb();)
+ *done = true;
+ spin_unlock_bh(lock);
BTW, build_ehash_secret() is called like that :
if (unlikely(!inet_ehash_secret))
if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM)
build_ehash_secret();
So it would be better to make sure inet_ehash_secret is not 0 by
accident.
^ permalink raw reply
* Re: [PATCH RFC] net: introduce support for lazy initialization of secret keys
From: Hannes Frederic Sowa @ 2013-09-25 22:58 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, fw, edumazet, davem, ycheng
In-Reply-To: <1380148946.3165.166.camel@edumazet-glaptop>
On Wed, Sep 25, 2013 at 03:42:26PM -0700, Eric Dumazet wrote:
> On Wed, 2013-09-25 at 23:34 +0200, Hannes Frederic Sowa wrote:
> > net_get_random_once is a new macro which handles the initialization of
> > secret keys at use-site. It is possible to call it in the fast path. Only
> > the initialization depends on the spinlock and is rather slow. Otherwise
> > it should get used just before the key is used to delay the entropy
> > extration as late as possible to get better randomness. It returns true
> > if the key got initialized.
>
> So you don't like cmpxchg() ;)
Actually, my first thought was to swap in a pointer via cmpxchg. But I didn't
know what to do when kmalloc returns NULL. After that I went with the spinlock
approach.
Also, I don't know with what size I get called. Consider this code:
| u8 byte;
| net_get_random_once(&byte, sizeof(byte));
Not allowing 0 in here would actually reduce the amount of randomness
considerable.
>
> > +/* BE CAREFUL: this function is not interrupt safe */
> > +#define net_get_random_once(buf, nbytes) \
> > + ({ \
> > + static DEFINE_SPINLOCK(__lock); \
> > + static bool __done = false; \
> > + bool __ret = false; \
> > + if (unlikely(!__done)) \
> > + __ret = __net_get_random_once(buf, \
> > + nbytes, \
> > + &__done, \
> > + &__lock); \
> > + __ret; \
> > + })
> > +
> >
>
> No idea why its needed to have one spinlock per call point.
>
> A single lock should be more than enough.
>
> The spinlock could be private to __net_get_random_once()
Ack! Very good. Don't know why I build this so complex.
> +bool __net_get_random_once(void *buf, int nbytes, bool *done,
> + spinlock_t *lock)
> +{
> + spin_lock_bh(lock);
> + if (*done) {
> + spin_unlock_bh(lock);
> + return false;
> + }
> +
> + get_random_bytes(buf, nbytes);
>
> I think you might need a memory barrier here.
>
> (smp_wmb();)
I actually did some research on this and came to the conclusion that the
call to a function in another compilation unit should be barrier enough
(I really forgot to consider other architectures).
But a barrier should not hurt and it will be executed very infrequently,
so I'll add one.
>
> + *done = true;
> + spin_unlock_bh(lock);
>
>
> BTW, build_ehash_secret() is called like that :
>
> if (unlikely(!inet_ehash_secret))
> if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM)
> build_ehash_secret();
>
> So it would be better to make sure inet_ehash_secret is not 0 by
> accident.
Urks. I'll think about that.
Thanks a lot for the review, Eric!
^ permalink raw reply
* Re: [PATCH 11/11] rtlwifi: Remove extern from function prototypes
From: Larry Finger @ 2013-09-25 23:01 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, David S. Miller, Chaoming Li, John W. Linville,
linux-wireless, linux-kernel
In-Reply-To: <a958df5dc3065ce517726dc54087639e13ffee8f.1380137610.git.joe@perches.com>
On 09/25/2013 02:37 PM, Joe Perches wrote:
> There are a mix of function prototypes with and without extern
> in the kernel sources. Standardize on not using extern for
> function prototypes.
>
> Function prototypes don't need to be written with extern.
> extern is assumed by the compiler. Its use is as unnecessary as
> using auto to declare automatic/local variables in a block.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Larry
^ permalink raw reply
* RE: [PATCH 09/11] mwifiex: Remove extern from function prototypes
From: Bing Zhao @ 2013-09-25 23:13 UTC (permalink / raw)
To: Joe Perches, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: David S. Miller, John W. Linville,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <b3a7cd194857b3dc099e8f8bb0ed97bb4a1b5fde.1380137610.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Hi Joe,
Thanks for your patch.
> There are a mix of function prototypes with and without extern
> in the kernel sources. Standardize on not using extern for
> function prototypes.
>
> Function prototypes don't need to be written with extern.
> extern is assumed by the compiler. Its use is as unnecessary as
> using auto to declare automatic/local variables in a block.
>
> Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Acked-by: Bing Zhao <bzhao-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Thanks,
Bing
> ---
> drivers/net/wireless/mwifiex/wmm.h | 24 ++++++++++--------------
> 1 file changed, 10 insertions(+), 14 deletions(-)
--
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 net-next v2 1/3] flow_dissector: factor out the ports extraction in skb_flow_get_ports
From: Nikolay Aleksandrov @ 2013-09-25 23:40 UTC (permalink / raw)
To: netdev; +Cc: davem, andy, fubar, eric.dumazet, vfalico
In-Reply-To: <1380133912-1240-2-git-send-email-nikolay@redhat.com>
On 09/25/2013 08:31 PM, Nikolay Aleksandrov wrote:
> Factor out the code that extracts the ports from skb_flow_dissect and
> add a new function skb_flow_get_ports which can be re-used.
>
> Suggested-by: Veaceslav Falico <vfalico@redhat.com>
> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
> ---
> v2: new patch
> This seems like a good idea because there're other users that can re-use
> it later as well.
>
> include/net/flow_keys.h | 1 +
> net/core/flow_dissector.c | 38 +++++++++++++++++++++++++++-----------
> 2 files changed, 28 insertions(+), 11 deletions(-)
>
> diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h
> index ac2439d..621bf11 100644
> --- a/include/net/flow_keys.h
> +++ b/include/net/flow_keys.h
> @@ -14,4 +14,5 @@ struct flow_keys {
> };
>
> bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow);
> +__be32 skb_flow_get_ports(const struct sk_buff *skb, int nhoff, u8 ip_proto);
> #endif
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 1929af8..c609faf 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -25,9 +25,34 @@ static void iph_to_flow_copy_addrs(struct flow_keys *flow, const struct iphdr *i
> memcpy(&flow->src, &iph->saddr, sizeof(flow->src) + sizeof(flow->dst));
> }
>
> +/**
> + * skb_flow_get_ports - extract the upper layer ports and return them
> + * @skb: buffer to extract the ports from
> + * @nhoff: network header offset
I hurried too much, this should've said "offset to the end of the network
header" i.e. nhoff + sizeof(network header), I'll wait until tomorrow to
see if there aren't any other comments and will edit this and re-post a v3.
Nik
^ permalink raw reply
* Re: [PATCH net-next v2 1/3] flow_dissector: factor out the ports extraction in skb_flow_get_ports
From: Nikolay Aleksandrov @ 2013-09-25 23:50 UTC (permalink / raw)
To: netdev; +Cc: davem, andy, fubar, eric.dumazet, vfalico
In-Reply-To: <52437454.6020407@redhat.com>
On 09/26/2013 01:40 AM, Nikolay Aleksandrov wrote:
> On 09/25/2013 08:31 PM, Nikolay Aleksandrov wrote:
>> Factor out the code that extracts the ports from skb_flow_dissect and
>> add a new function skb_flow_get_ports which can be re-used.
>>
>> Suggested-by: Veaceslav Falico <vfalico@redhat.com>
>> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
>> ---
>> v2: new patch
>> This seems like a good idea because there're other users that can re-use
>> it later as well.
>>
>> include/net/flow_keys.h | 1 +
>> net/core/flow_dissector.c | 38 +++++++++++++++++++++++++++-----------
>> 2 files changed, 28 insertions(+), 11 deletions(-)
>>
>> diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h
>> index ac2439d..621bf11 100644
>> --- a/include/net/flow_keys.h
>> +++ b/include/net/flow_keys.h
>> @@ -14,4 +14,5 @@ struct flow_keys {
>> };
>>
>> bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow);
>> +__be32 skb_flow_get_ports(const struct sk_buff *skb, int nhoff, u8 ip_proto);
>> #endif
>> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
>> index 1929af8..c609faf 100644
>> --- a/net/core/flow_dissector.c
>> +++ b/net/core/flow_dissector.c
>> @@ -25,9 +25,34 @@ static void iph_to_flow_copy_addrs(struct flow_keys *flow, const struct iphdr *i
>> memcpy(&flow->src, &iph->saddr, sizeof(flow->src) + sizeof(flow->dst));
>> }
>>
>> +/**
>> + * skb_flow_get_ports - extract the upper layer ports and return them
>> + * @skb: buffer to extract the ports from
>> + * @nhoff: network header offset
> I hurried too much, this should've said "offset to the end of the network
> header" i.e. nhoff + sizeof(network header), I'll wait until tomorrow to
> see if there aren't any other comments and will edit this and re-post a v3.
>
> Nik
>
Ugh, nevermind this email, I'm going crazy about semantics today :-)
Everything is fine.
^ permalink raw reply
* Re: [PATCH net-next v2 0/3] bonding: modify the current and add new hash functions
From: Nikolay Aleksandrov @ 2013-09-25 23:56 UTC (permalink / raw)
To: netdev; +Cc: davem, andy, fubar, eric.dumazet, vfalico
In-Reply-To: <1380133912-1240-1-git-send-email-nikolay@redhat.com>
Self-nack on this patchset as the flow_dissector patch will make nhoff
different from before, that is the port offset will not be added to it, and
thus will make flow_keys' th_off different in skb_flow_dissect.
Again, I will wait until tomorrow to see if there're any other comments and
will re-post a v3 with this bug fixed.
Nik
^ permalink raw reply
* Re: [PATCH] moxa: drop free_irq of devm_request_irq allocated irq
From: Jingoo Han @ 2013-09-26 0:47 UTC (permalink / raw)
To: 'Wei Yongjun', 'Jonas Jensen'
Cc: davem, grant.likely, rob.herring, yongjun_wei, netdev,
'Jingoo Han', 'Sachin Kamat'
In-Reply-To: <CAPgLHd8YRP7kL_jNHi3J9jFn86f=Fv-AWWUY_aRGZQOgVTNPgg@mail.gmail.com>
On Wednesday, September 25, 2013 4:33 PM, Wei Yongjun wrote:
>
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> irq allocated with devm_request_irq should not be freed using
> free_irq, because doing so causes a dangling pointer, and a
> subsequent double free.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/ethernet/moxa/moxart_ether.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
> index 83c2091..9a7fcb5 100644
> --- a/drivers/net/ethernet/moxa/moxart_ether.c
> +++ b/drivers/net/ethernet/moxa/moxart_ether.c
> @@ -531,7 +531,6 @@ static int moxart_remove(struct platform_device *pdev)
> struct net_device *ndev = platform_get_drvdata(pdev);
>
> unregister_netdev(ndev);
> - free_irq(ndev->irq, ndev);
> moxart_mac_free_memory(ndev);
> free_netdev(ndev);
CC'ed Sachin Kamat,
In this case, the free_irq() will be called, after calling
free_netdev(). 'ndev' is freed by free_netdev(). Then, 'ndev->irq'
is used by free_irq(). Is it right?
In my humble opinion, it seems to make the problem.
Best regards,
Jingoo Han
^ permalink raw reply
* +157.8% netperf throughput by "ipv4: raise IP_MAX_MTU to theoretical limit"
From: Fengguang Wu @ 2013-09-26 1:21 UTC (permalink / raw)
To: Eric Dumazet
Cc: Alexey Kuznetsov, Willem de Bruijn, lkp, netdev@vger.kernel.org,
LKML
Hi Eric,
We are glad to find that your below commit brings large increase in
lo netperf throughput:
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
761.80 +534.6% 4834.60 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
168.10 +1317.4% 2382.70 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
169.60 +979.4% 1830.70 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
2154.20 +135.7% 5077.50 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
3559.00 -3.5% 3435.20 lkp-t410/micro/netperf/120s-200%-TCP_STREAM
6812.70 +157.8% 17560.70 TOTAL netperf.Throughput_Mbps
The side effects are some increased/decreased lock contentions:
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
7695.93 +16534.7% 1280196.60 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
1917.74 +159631.5% 3063227.91 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
2293.73 +118436.8% 2718918.57 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
50823.71 +1881.3% 1006978.18 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
62731.11 +12763.3% 8069321.26 TOTAL lock_stat.slock-AF_INET.waittime-total
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
7007.20 +17377.5% 1224681.80 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
960.80 +74382.1% 715623.90 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
951.40 +55033.2% 524536.90 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
49582.00 +2141.1% 1111185.60 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
58501.40 +6012.7% 3576028.20 TOTAL lock_stat.slock-AF_INET.contentions
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
7289.40 +16702.1% 1224771.60 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
922.40 +77764.1% 718218.60 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
910.10 +58394.1% 532355.20 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
51325.70 +2062.2% 1109739.10 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
60447.60 +5830.9% 3585084.50 TOTAL lock_stat.slock-AF_INET.contentions.udp_queue_rcv_skb
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
4266.20 +13915.1% 597912.60 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
560.50 +57667.0% 323783.90 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
518.80 +46369.9% 241086.00 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
23391.50 +1891.7% 465887.80 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
28737.00 +5567.5% 1628670.30 TOTAL lock_stat.&(&list->lock)->rlock#2.contentions.__skb_recv_datagram
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
4245.80 +13836.7% 591726.20 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
563.30 +57100.8% 322211.90 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
520.40 +45650.2% 238084.00 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
23157.10 +1898.6% 462812.40 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
28486.60 +5568.8% 1614834.50 TOTAL lock_stat.&(&list->lock)->rlock#2.contentions.sock_queue_rcv_skb
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
466.24 +20666.8% 96823.64 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
227.96 +39775.4% 90899.22 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
165.76 +63787.9% 105903.10 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
3031.79 +2325.1% 73523.25 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
3891.75 +9334.0% 367149.20 TOTAL lock_stat.&wq->wait.waittime-total
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
891.80 +21266.3% 190545.00 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
213.30 +50036.7% 106941.50 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
152.60 +58410.9% 89287.60 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
6143.00 +2623.3% 167291.40 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
7400.70 +7386.7% 554065.50 TOTAL lock_stat.&wq->wait.contentions.__wake_up_sync_key
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
4174266.80 +3137.3% 135134002.00 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
1541864.80 +3808.9% 60270231.50 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
1754844.30 +3034.9% 55013405.80 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
22053438.30 +263.9% 80244072.30 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
29524414.20 +1020.0% 330661711.60 TOTAL lock_stat.&(&zone->lock)->rlock.contentions.__free_pages_ok
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
4303082.60 +2809.1% 125179298.60 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
1638845.10 +3613.5% 60859041.30 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
1883848.20 +3012.7% 58638288.40 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
22293114.60 +216.3% 70505512.80 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
30118890.50 +946.5% 315182141.10 TOTAL lock_stat.&(&zone->lock)->rlock.contentions.get_page_from_freelist
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
291821.83 -96.6% 9957.12 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
400941.64 -94.0% 24083.56 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
692763.47 -95.1% 34040.68 TOTAL lock_stat.&mm->mmap_sem/1.holdtime-max
35596b2796713c6a9dc0 734d2725db879f3f6fcd
------------------------ ------------------------
38718739.60 -95.8% 1637024.20 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
13064940.40 -84.5% 2031181.40 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
64201496.70 -98.2% 1166711.50 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
2302513.00 -97.9% 48685.00 lkp-t410/micro/netperf/120s-200%-UDP_STREAM
118287689.70 -95.9% 4883602.10 TOTAL lock_stat.&(&base->lock)->rlock.acquisitions
......
commit 734d2725db879f3f6fcdc2b1d2a5deae105f5e95
Author: Eric Dumazet <edumazet@google.com>
Date: Sun Aug 18 19:08:07 2013 -0700
ipv4: raise IP_MAX_MTU to theoretical limit
As discussed last year [1], there is no compelling reason
to limit IPv4 MTU to 0xFFF0, while real limit is 0xFFFF
[1] : http://marc.info/?l=linux-netdev&m=135607247609434&w=2
:040000 040000 f2085347b7781a6a42020dc1bc5ca090f7077361 fcb2c411b5073c8ac5009a41f7a1908a352c23d5 M net
bisect run success
# bad: [272b98c6455f00884f0350f775c5342358ebb73f] Linux 3.12-rc1
# good: [6e4664525b1db28f8c4e1130957f70a94c19213e] Linux 3.11
git bisect start '272b98c6455f00884f0350f775c5342358ebb73f' '6e4664525b1db28f8c4e1130957f70a94c19213e' '--'
# good: [57d730924d5cc2c3e280af16a9306587c3a511db] Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 57d730924d5cc2c3e280af16a9306587c3a511db
# bad: [27c7651a6a5f143eccd66db38c7a3035e1f8bcfb] Merge tag 'gpio-v3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
git bisect bad 27c7651a6a5f143eccd66db38c7a3035e1f8bcfb
# bad: [06c54055bebf919249aa1eb68312887c3cfe77b4] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
git bisect bad 06c54055bebf919249aa1eb68312887c3cfe77b4
# bad: [d75ea942b360690a380da8012a51eaf6a6ebb1b1] can: flexcan: use platform_set_drvdata()
git bisect bad d75ea942b360690a380da8012a51eaf6a6ebb1b1
# good: [926489be1d2b030c17d38fa10b5921bf3409d91d] drivers: net: cpsw: Add support for new CPSW IP version present in AM43xx SoC
git bisect good 926489be1d2b030c17d38fa10b5921bf3409d91d
# good: [a5354ccaaf54ac61c6d1b350e8d3e4234dd28849] ath9k: Enable WLAN/BT Ant Diversity for WB225/WB195
git bisect good a5354ccaaf54ac61c6d1b350e8d3e4234dd28849
# good: [84ce1ddfefc3d5a8af5ede6fe16546c143117616] 6lowpan: init ipv6hdr buffer to zero
git bisect good 84ce1ddfefc3d5a8af5ede6fe16546c143117616
# bad: [a0e186003be7892fd75613a23aaafaf09f3611e6] net: fsl_pq_mdio: use platform_{get,set}_drvdata()
git bisect bad a0e186003be7892fd75613a23aaafaf09f3611e6
# good: [89d5e23210f53ab53b7ff64843bce62a106d454f] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
git bisect good 89d5e23210f53ab53b7ff64843bce62a106d454f
# good: [0aa857f83fe2674f973ad89ec7c0202f5c5d9554] moxa: fix missing unlock on error in moxart_mac_start_xmit()
git bisect good 0aa857f83fe2674f973ad89ec7c0202f5c5d9554
# bad: [0dde80268ee0a5a1511935bdb9c547191d616aa9] myri10ge: Add support for ndo_busy_poll
git bisect bad 0dde80268ee0a5a1511935bdb9c547191d616aa9
# good: [397b41746333ad386d91d23ea0f79481320dcdcc] tcp: trivial: Remove nocache argument from tcp_v4_send_synack
git bisect good 397b41746333ad386d91d23ea0f79481320dcdcc
# bad: [734d2725db879f3f6fcdc2b1d2a5deae105f5e95] ipv4: raise IP_MAX_MTU to theoretical limit
git bisect bad 734d2725db879f3f6fcdc2b1d2a5deae105f5e95
# good: [35596b2796713c6a9dc05759837fa9f0e156a200] vhost: Include linux/uio.h instead of linux/socket.h
git bisect good 35596b2796713c6a9dc05759837fa9f0e156a200
# first bad commit: [734d2725db879f3f6fcdc2b1d2a5deae105f5e95] ipv4: raise IP_MAX_MTU to theoretical limit
Compare of all good/bad commits during the bisect.
iostat.cpu.user
2.2 ++-------------------------------------------------------------------+
2 ++ O O O |
| O O O O OO O O O O OO O O OO OO O O O |
1.8 ++ O |
1.6 ++ |
| |
1.4 O+OO O O OO O O O |
1.2 ++ |
1 ++ |
| |
0.8 ++ |
0.6 ++ |
| |
0.4 ++ *.*. .*.**. .*. .*
0.2 *+**-*-*-**-*-*-*----**-*-*-**-*------*-**---*-**-*-**-*-*-**-*-*-**-+
netperf.Throughput_Mbps
2000 ++------------------------------------------------------------------+
1800 ++ O OO O O OO O OO O OO O O OO O OO O OO O O |
| |
1600 ++ |
1400 ++ |
O OO O O OO O OO |
1200 ++ |
1000 ++ |
800 ++ |
| |
600 ++ |
400 ++ |
| |
200 *+**.*.*.**.*.**.*.**.*.*.**.*.**.*.**.*.*.**.*.**.*.**.*.*.**.*.**.*
0 ++------------------------------------------------------------------+
vmstat.system.in
34000 ++---------------------O-----------O-------------------------------+
| O O OO O O O O O O O OO O OO O |
32000 ++ OO O |
30000 ++ |
| |
28000 ++ |
26000 O+ O OO O O O |
| OO O |
24000 ++ |
22000 ++ |
| |
20000 ++ O |
18000 ++ .* |
*.**.*.**.*.**.*. .*.**.*.**.*.*.**.* *.*.**.*.**.*.**.*.**.*.**.*
16000 ++---------------**------------------------------------------------+
vmstat.system.cs
900000 ++---------------O------------------------------------------------+
| O |
800000 ++ O O O O OO O OO O OO O OO OO OO O |
700000 ++ O O O |
| |
600000 ++ |
500000 O+OO O OO O OO O |
| |
400000 ++ |
300000 ++ |
| |
200000 ++ |
100000 ++ |
*.**.*.**.*.**.*.**.**.*.**.*.**.*.**.*.**.*.**.*.**.**.*.**.*.**.*
0 ++----------------------------------------------------------------+
lock_stat.&(&zone->lock)->rlock.contentions
7e+07 ++---------------O-------------------------------------------------+
| O O |
6e+07 ++ OO O O O O OO O OO O OO O OO O |
| OO O O |
5e+07 O+OO O OO O OO O |
| |
4e+07 ++ |
| |
3e+07 ++ |
| |
2e+07 ++ |
| |
1e+07 ++ |
| .**.*. |
0 *+**-*-**-*-**-*------**-*-**-*-*-**-*-**-*-**-*-**-*-**-*-**-*-**-*
lock_stat.&(&zone->lock)->rlock.contentions.__free_pages_ok
7e+07 ++-----------------------------------------------------------------+
| O O |
6e+07 ++ O OO O O OO O O O O O O O |
| OO O O OO O O |
5e+07 O+OO O OO O OO O |
| |
4e+07 ++ |
| |
3e+07 ++ O |
| |
2e+07 ++ |
| |
1e+07 ++ |
| |
0 *+**-*-**-*-**-*-**-*-**-*-**-*-*-**-*-**-*-**-*-**-*-**-*-**-*-**-*
lock_stat.&(&zone->lock)->rlock.contentions.get_page_from_freelist
7e+07 ++---------------O-------------------------------------------------+
| O O |
6e+07 ++ OO O OO O O OO O OO O OO O OO O OO O |
| |
5e+07 O+OO O OO O OO O |
| |
4e+07 ++ |
| |
3e+07 ++ |
| |
2e+07 ++ |
| |
1e+07 ++ |
| .**.*. |
0 *+**-*-**-*-**-*------**-*-**-*-*-**-*-**-*-**-*-**-*-**-*-**-*-**-*
lock_stat.&rq->lock.contentions
300000 ++---------------------O------OO-O-O---------------O--------------+
| O OO O O O OO O OO O O OO O |
250000 ++ |
| |
| O |
200000 O+OO O OO O O O |
| |
150000 ++ |
| |
100000 ++ |
*. *. .*.* .*.* .*.* .* .*. *. .**. .*
| * *.**.*.**.* *.*.** * * *.* * **.* * *.** |
50000 ++ : : |
| : O O |
0 ++---------------**-*---------------------------------------------+
lock_stat.clockevents_lock.contentions.clockevents_notify
120000 ++----------------------------------------------------------------+
| * |
100000 ++ : |
| : |
| : : |
80000 ++ : : |
| * : : |
60000 ++ :: : : |
| *. : : .* : : |
40000 ++ : * *. .* * :: : .* *
*. *. : *.**.** + *.*. + : :*. *. .**.* .* *. .* +|
| * *.* * ** * * *.* * * * * |
20000 ++ O OO OO O O OO O O O OO O O O |
O OO O OO O O O O O OO OO O O O |
0 ++----------------------------------------------------------------+
lock_stat.&(&base->lock)->rlock.contentions.lock_timer_base
12000 ++-----------------------------------------------------------------+
| * |
10000 *+* .*.**. + : * .*. *. .*. .*. *. |
| * *.** : : * * + ** **.*.**.*. * * *.**.*
| : : *.*.*.** * |
8000 ++ **.* |
| |
6000 ++ |
| |
4000 ++ |
| |
| |
2000 ++ |
| |
0 O+OO-O-OO-O-OO-O-OO-O-OO-O-OO-O-O-OO-O-OO-O-OO-O-OO-O-OO-O---------+
lock_stat.&(&base->lock)->rlock.contentions.run_timer_softirq
7000 ++------------------------------------------------------------------+
| .* |
6000 ++* * *.* : *. .* .*. *. |
* :.*.*.* .*. : : : : *.* *.*.**. .* * *.**.*
5000 ++ * * * : : : : *.** |
| : : *.*.* : |
4000 ++ : : *.*.* |
| *.** |
3000 ++ |
| |
2000 ++ |
| |
1000 ++ |
| |
0 O+OO-O-O-OO-O-OO-O-OO-O-O-OO-O-OO-O-OO-O-O-OO-O-OO-O-OO-O-O---------+
lock_stat.rcu_node_1.contentions
120000 ++----------------------------------------------------------------+
| |
100000 ++ O OO O OO OO O |
| O OO O O O O O OO O O |
| OO O O O O O O O |
80000 O+ O O OO |
| |
60000 ++ |
| |
40000 ++ |
| |
| |
20000 ++ |
| |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.rcu_node_1.contentions.rcu_process_callbacks
200000 ++------------------O---------------------------------------------+
180000 ++ O O O OO O O O O O OO O |
| O OO O O O OO |
160000 ++OO O O O O O O |
140000 O+ O O OO |
| |
120000 ++ |
100000 ++ |
80000 ++ |
| |
60000 ++ |
40000 ++ |
| |
20000 ++ |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.rcu_node_1.contentions.force_qs_rnp
20000 ++-----------------------------------------------------------------+
18000 ++ O O |
| O |
16000 ++ |
14000 ++ |
| O |
12000 ++ OO O O O OO OO OO O OO O OO O |
10000 O+OO O OO O O O O O |
8000 ++ OO |
| |
6000 ++ |
4000 ++ |
| |
2000 ++ |
0 *+**-*-**-*-**-*-**-*-**-*-**-*-*-**-*-**-*-**-*-**-*-**-*-**-*-**-*
lock_stat.slock-AF_INET.contentions
600000 ++----------------------------------------------------------------+
| O O O O O OO O O |
500000 ++ O O O O OO O O OO O |
| O O |
| |
400000 ++ O |
| |
300000 O+OO O OO O OO O |
| |
200000 ++ |
| |
| |
100000 ++ |
| O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.slock-AF_INET.contentions.lock_sock_fast
600000 ++----------------------------------------------------------------+
| O O O |
500000 ++ OO O OO O OO OO OO OO OO O |
| O O |
| |
400000 ++ |
| |
300000 O+OO O OO O OO O O |
| |
200000 ++ |
| |
| |
100000 ++ |
| O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.slock-AF_INET.contentions.udp_queue_rcv_skb
600000 ++----------------------------------------------O-----------------+
| O O O O O O OO O |
500000 ++ O O O O O O O OO O |
| O O O |
| |
400000 ++ |
| |
300000 O+OO O OO O OO O |
| |
200000 ++ |
| |
| |
100000 ++ |
| O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.&(&list->lock)->rlock#2.contentions
300000 ++----------------------------------------------------------------+
| O O |
250000 ++ O O O OO O OO |
| O O O O O O OO OO O |
| O |
200000 ++ |
| |
150000 ++ |
O OO O OO O OO O |
100000 ++ |
| |
| O |
50000 ++ |
| O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.&(&list->lock)->rlock#2.contentions.__skb_recv_datagram
300000 ++----------------------------------------------------------------+
| O O |
250000 ++ O O O OO O OO |
| O O O O O O OO OO O |
| O |
200000 ++ |
| |
150000 ++ |
O OO O OO O OO O |
100000 ++ |
| |
| O |
50000 ++ |
| O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.&(&list->lock)->rlock#2.contentions.sock_queue_rcv_skb
300000 ++----------------------------------------------------------------+
| O O |
250000 ++ O O O OO O OO |
| O O O O O O OO OO O |
| O |
200000 ++ |
| |
150000 ++ |
O OO O OO O OO O |
100000 ++ |
| |
| O |
50000 ++ |
| O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.&wq->wait.contentions
100000 ++-------------------O--------------------------------------------+
90000 ++ O O O O O O OO O OO O O |
| O O O O OO O O |
80000 ++ |
70000 ++ |
| |
60000 ++ O |
50000 O+OO O O O OO O |
40000 ++ |
| |
30000 ++ |
20000 ++ |
| O |
10000 ++ O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.&wq->wait.contentions.finish_wait
100000 ++----------------------------------------------------------------+
90000 ++ O O O O O O OO O O |
| O OO O O O O O O O O |
80000 ++ O |
70000 ++ |
| |
60000 ++ |
50000 O+OO O OO O OO O |
40000 ++ |
| |
30000 ++ |
20000 ++ |
| |
10000 ++ O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
lock_stat.&wq->wait.contentions.__wake_up_sync_key
100000 ++----------------------------------------------------------------+
90000 ++ O O O O O OO OO O O |
| O OO O O O O OO O O |
80000 ++ |
70000 ++ |
| |
60000 ++ O |
50000 O+OO O O O OO O |
40000 ++ |
| |
30000 ++ |
20000 ++ |
| O |
10000 ++ O |
0 *+**-*-**-*-**-*-**-**-*-**-*-**-*-**-*-**-*-**-*-**-**-*-**-*-**-*
^ permalink raw reply
* Re: Device tree node for Freescale Gianfar PTP reference clock source selection
From: Scott Wood @ 2013-09-26 1:30 UTC (permalink / raw)
To: Aida Mynzhasova
Cc: netdev, Richard Cochran, linuxppc-dev, Claudiu Manoil, devicetree
In-Reply-To: <523FEFCD.70409@skitlab.ru>
On Mon, 2013-09-23 at 11:37 +0400, Aida Mynzhasova wrote:
> Hi,
>
> Currently, Freescale Gianfar PTP reference clock source is determined
> through hard-coded value in gianfar_ptp driver. I don't think that
> recompilation of the entire module (or even worse - the kernel) is a god
> idea when we want to change one clock source to another. So, I want to
> add new device tree binding, which can be used as:
Is this describing the hardware or how you're using it? If the latter,
it should be a module parameter or some sort of runtime knob instead.
> ptp_clock@24E00 {
> compatible = "fsl,etsec-ptp";
> reg = <0x24E00 0xB0>;
> interrupts = <12 0x8 13 0x8>;
> interrupt-parent = < &ipic >;
> fsl,cksel = <0>; /* <-- New entry */
> fsl,tclk-period = <10>;
> fsl,tmr-prsc = <100>;
> fsl,tmr-add = <0x999999A4>;
> fsl,tmr-fiper1 = <0x3B9AC9F6>;
> fsl,tmr-fiper2 = <0x00018696>;
> fsl,max-adj = <659999998>;
> };
>
> fsl,cksel acceptable values:
>
> <0> for external clock;
> <1> for eTSEC system clock;
> <2> for eTSEC1 transmit clock;
> <3> for RTC clock input.
>
> I am new in this mailing list, and as far as I know, I have to discuss
> all updates for device tree files here before sending patch, which uses
> new attributes.
>
> Also, should I define new bindings in some special way? I want to add
> description of cksel attribute in
> /Documentation/devicetree/bindings/net/fsl-tsec-phy.txt. Is it enough or
> not?
Assuming this is actually describing how the hardware is wired up, yes,
that's how you'd document it (making sure that device trees without that
property are interpreted the same as today).
-Scott
^ permalink raw reply
* Re: +157.8% netperf throughput by "ipv4: raise IP_MAX_MTU to theoretical limit"
From: Fengguang Wu @ 2013-09-26 1:35 UTC (permalink / raw)
To: Eric Dumazet
Cc: Alexey Kuznetsov, Willem de Bruijn, lkp, netdev@vger.kernel.org,
LKML
In-Reply-To: <20130926012144.GA9931@localhost>
On Thu, Sep 26, 2013 at 09:21:44AM +0800, Fengguang Wu wrote:
> Hi Eric,
>
> We are glad to find that your below commit brings large increase in
> lo netperf throughput:
>
> 35596b2796713c6a9dc0 734d2725db879f3f6fcd
> ------------------------ ------------------------
> 761.80 +534.6% 4834.60 lkp-ib03/micro/netperf/120s-200%-UDP_STREAM
> 168.10 +1317.4% 2382.70 lkp-nex04/micro/netperf/120s-200%-UDP_STREAM
> 169.60 +979.4% 1830.70 lkp-nex05/micro/netperf/120s-200%-UDP_STREAM
> 2154.20 +135.7% 5077.50 lkp-sb03/micro/netperf/120s-200%-UDP_STREAM
> 3559.00 -3.5% 3435.20 lkp-t410/micro/netperf/120s-200%-TCP_STREAM
> 6812.70 +157.8% 17560.70 TOTAL netperf.Throughput_Mbps
>
> The side effects are some increased/decreased lock contentions:
This direct view may be more clear. Before patch:
class name con-bounces contentions waittime-min waittime-max waittime-total acq-bounces acquis
itions holdtime-min holdtime-max holdtime-total
-------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------
&(&nf->lru_lock)->rlock: 19017744 19034681 0.15 5884.35 5772892473.69 20428335 20
475976 0.10 1109.59 77448429.38
-----------------------
&(&nf->lru_lock)->rlock 4905538 [<ffffffff819227b9>] ip_defrag+0xa4f/0xbd3
&(&nf->lru_lock)->rlock 5695105 [<ffffffff8195bd6f>] inet_frag_find+0x2c7/0x30d
&(&nf->lru_lock)->rlock 5629414 [<ffffffff8195be74>] inet_frag_kill+0xbf/0x117
&(&nf->lru_lock)->rlock 2804624 [<ffffffff8195bf29>] inet_frag_evictor+0x5d/0x103
-----------------------
&(&nf->lru_lock)->rlock 6172104 [<ffffffff8195bd6f>] inet_frag_find+0x2c7/0x30d
&(&nf->lru_lock)->rlock 5348696 [<ffffffff8195be74>] inet_frag_kill+0xbf/0x117
&(&nf->lru_lock)->rlock 4421308 [<ffffffff819227b9>] ip_defrag+0xa4f/0xbd3
&(&nf->lru_lock)->rlock 3092573 [<ffffffff8195bf29>] inet_frag_evictor+0x5d/0x103
...............................................................................................................................................................................................
&(&q->lock)->rlock: 2322575 2323896 0.22 5802.58 934469091.38 3041941 13000848 0.10 5902.91 2811690638.18
------------------
&(&q->lock)->rlock 2163449 [<ffffffff8195bf7e>] inet_frag_evictor+0xb2/0x103
&(&q->lock)->rlock 160447 [<ffffffff81921e91>] ip_defrag+0x127/0xbd3
------------------
&(&q->lock)->rlock 2165896 [<ffffffff81921e91>] ip_defrag+0x127/0xbd3
&(&q->lock)->rlock 158000 [<ffffffff8195bf7e>] inet_frag_evictor+0xb2/0x103
...............................................................................................................................................................................................
&(&zone->lock)->rlock: 1845042 1851805 0.18 4917.52 19475590.18 9003807 10134386 0.13 3747.70 8347088.06
---------------------
&(&zone->lock)->rlock 866751 [<ffffffff8116fbbc>] __free_pages_ok.part.47+0x94/0x2a1
&(&zone->lock)->rlock 984597 [<ffffffff8116f856>] get_page_from_freelist+0x4a3/0x6e8
&(&zone->lock)->rlock 112 [<ffffffff8116fe3b>] free_pcppages_bulk+0x35/0x31a
&(&zone->lock)->rlock 116 [<ffffffff8116f72c>] get_page_from_freelist+0x379/0x6e8
---------------------
&(&zone->lock)->rlock 918190 [<ffffffff8116fbbc>] __free_pages_ok.part.47+0x94/0x2a1
&(&zone->lock)->rlock 722 [<ffffffff8116f72c>] get_page_from_freelist+0x379/0x6e8
&(&zone->lock)->rlock 861 [<ffffffff8116fe3b>] free_pcppages_bulk+0x35/0x31a
&(&zone->lock)->rlock 922607 [<ffffffff8116f856>] get_page_from_freelist+0x4a3/0x6e8
After patch, top contented locks become:
&(&zone->lock)->rlock: 58469530 58470181 0.16 4838.84 238618042.87 107374530 107408478 0.13 3610.05 73617127.93
---------------------
&(&zone->lock)->rlock 29783268 [<ffffffff8116f856>] get_page_from_freelist+0x4a3/0x6e8
&(&zone->lock)->rlock 837 [<ffffffff8116f72c>] get_page_from_freelist+0x379/0x6e8
&(&zone->lock)->rlock 1105 [<ffffffff8116fe3b>] free_pcppages_bulk+0x35/0x31a
&(&zone->lock)->rlock 28684627 [<ffffffff8116fbbc>] __free_pages_ok.part.47+0x94/0x2a1
---------------------
&(&zone->lock)->rlock 11356 [<ffffffff8116fe3b>] free_pcppages_bulk+0x35/0x31a
&(&zone->lock)->rlock 6741 [<ffffffff8116f72c>] get_page_from_freelist+0x379/0x6e8
&(&zone->lock)->rlock 28880589 [<ffffffff8116f856>] get_page_from_freelist+0x4a3/0x6e8
&(&zone->lock)->rlock 29558251 [<ffffffff8116fbbc>] __free_pages_ok.part.47+0x94/0x2a1
...............................................................................................................................................................................................
slock-AF_INET: 507780 508036 0.20 1167.78 2564695.48 11115246 106594271 0.12 1196.01 989718694.82
-------------
slock-AF_INET 434691 [<ffffffff818ed738>] lock_sock_fast+0x2f/0x84
slock-AF_INET 73294 [<ffffffff819482dc>] udp_queue_rcv_skb+0x1ba/0x3aa
slock-AF_INET 51 [<ffffffff818ed6b5>] lock_sock_nested+0x34/0x88
-------------
slock-AF_INET 434615 [<ffffffff819482dc>] udp_queue_rcv_skb+0x1ba/0x3aa
slock-AF_INET 73370 [<ffffffff818ed738>] lock_sock_fast+0x2f/0x84
slock-AF_INET 51 [<ffffffff8193fae1>] tcp_v4_rcv+0x390/0x978
..............................................................................................................................................................................................
&rq->lock: 286309 286456 0.21 294.85 1768779.90 5887506 244517912 0.09 1080.71 315600465.71
---------
&rq->lock 92057 [<ffffffff81a0aa65>] __schedule+0x103/0x852
&rq->lock 18386 [<ffffffff810ecc02>] try_to_wake_up+0x95/0x26c
&rq->lock 730 [<ffffffff810f13fb>] update_blocked_averages+0x30/0x47f
&rq->lock 304 [<ffffffff81a0af43>] __schedule+0x5e1/0x852
---------
&rq->lock 107807 [<ffffffff810ecd7b>] try_to_wake_up+0x20e/0x26c
&rq->lock 144391 [<ffffffff81a0aa65>] __schedule+0x103/0x852
&rq->lock 924 [<ffffffff810ecc02>] try_to_wake_up+0x95/0x26c
&rq->lock 29 [<ffffffff810e9090>] task_rq_lock+0x4b/0x85
Thanks,
Fengguang
^ permalink raw reply
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