* Re: [PATCH] netback: Fix alert message.
From: Ian Campbell @ 2011-12-05 16:58 UTC (permalink / raw)
To: Wei Liu; +Cc: xen-devel@lists.xensource.com, netdev@vger.kernel.org
In-Reply-To: <1323104264-3601-1-git-send-email-wei.liu2@citrix.com>
On Mon, 2011-12-05 at 16:57 +0000, Wei Liu wrote:
> The original message in netback_init was 'kthread_run() fails', which should be
> 'kthread_create() fails'.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Thanks!
Ian.
> ---
> drivers/net/xen-netback/netback.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index 1ae270e..15e332d 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -1668,7 +1668,7 @@ static int __init netback_init(void)
> "netback/%u", group);
>
> if (IS_ERR(netbk->task)) {
> - printk(KERN_ALERT "kthread_run() fails at netback\n");
> + printk(KERN_ALERT "kthread_create() fails at netback\n");
> del_timer(&netbk->net_timer);
> rc = PTR_ERR(netbk->task);
> goto failed_init;
^ permalink raw reply
* [PATCH] netback: Fix alert message.
From: Wei Liu @ 2011-12-05 16:57 UTC (permalink / raw)
To: xen-devel, netdev; +Cc: ian.campbell, Wei Liu
The original message in netback_init was 'kthread_run() fails', which should be
'kthread_create() fails'.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
drivers/net/xen-netback/netback.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 1ae270e..15e332d 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1668,7 +1668,7 @@ static int __init netback_init(void)
"netback/%u", group);
if (IS_ERR(netbk->task)) {
- printk(KERN_ALERT "kthread_run() fails at netback\n");
+ printk(KERN_ALERT "kthread_create() fails at netback\n");
del_timer(&netbk->net_timer);
rc = PTR_ERR(netbk->task);
goto failed_init;
--
1.7.2.5
^ permalink raw reply related
* pull request: wireless 2011-12-05
From: John W. Linville @ 2011-12-05 16:30 UTC (permalink / raw)
To: davem; +Cc: linux-wireless, netdev, linux-kernel
commit cbec0627ef1adf7afa448e8bbae3146ce910212a
Dave,
This batch of fixes is intended for 3.2.
Included is an iwlwifi fix to correctly set some flags related to packet
encryption, a couple of cfg80211 regulatory fixes (including one that
patches a hole created by the earlier "cfg80211: fix regulatory NULL
dereference"), a mac80211 fix to avoid sending probe requests with no
supported rates included, an iwlwifi fix to prevent reconfiguring HT40
after an association (prevents an assert in the firmware), and another
iwlwifi fix that customizes the watchdog timer enablement based on the
device type.
Also included is a reversion of a patch that was causing the iwlegacy
driver to throw WARNINGs.
Please let me know if there are problems!
John
---
The following changes since commit f61759e6b831a55b89e584b198c3da325e2bc379:
ipv4: make sure RTO_ONLINK is saved in routing cache (2011-12-03 01:32:23 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git for-davem
Johannes Berg (1):
iwlagn: fix HW crypto for TX-only keys
John W. Linville (2):
Revert "mac80211: clear sta.drv_priv on reconfiguration"
Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem
Luis R. Rodriguez (2):
cfg80211: fix race on init and driver registration
cfg80211: amend regulatory NULL dereference fix
Simon Wunderlich (1):
mac80211: fill rate filter for internal scan requests
Wey-Yi Guy (2):
iwlwifi: do not re-configure HT40 after associated
iwlwifi: change the default behavior of watchdog timer
drivers/net/wireless/iwlwifi/iwl-1000.c | 1 +
drivers/net/wireless/iwlwifi/iwl-5000.c | 1 +
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 36 ++++++++++++-------
drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 5 ---
drivers/net/wireless/iwlwifi/iwl-agn.c | 34 +++++++++---------
drivers/net/wireless/iwlwifi/iwl-agn.h | 2 +
drivers/net/wireless/iwlwifi/iwl-core.c | 22 +++++++++---
drivers/net/wireless/iwlwifi/iwl-core.h | 2 +
drivers/net/wireless/iwlwifi/iwl-shared.h | 4 +-
net/mac80211/main.c | 6 +++
net/mac80211/util.c | 1 -
net/wireless/reg.c | 49 +++++++++++++++++----------
12 files changed, 102 insertions(+), 61 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index e12b48c..dd008b0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -191,6 +191,7 @@ static struct iwl_base_params iwl1000_base_params = {
.chain_noise_scale = 1000,
.wd_timeout = IWL_DEF_WD_TIMEOUT,
.max_event_log_size = 128,
+ .wd_disable = true,
};
static struct iwl_ht_params iwl1000_ht_params = {
.ht_greenfield_support = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index c511c98..f55fb2d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -364,6 +364,7 @@ static struct iwl_base_params iwl5000_base_params = {
.wd_timeout = IWL_LONG_WD_TIMEOUT,
.max_event_log_size = 512,
.no_idle_support = true,
+ .wd_disable = true,
};
static struct iwl_ht_params iwl5000_ht_params = {
.ht_greenfield_support = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 58a381c..a7a6def 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -528,6 +528,24 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
return 0;
}
+void iwlagn_config_ht40(struct ieee80211_conf *conf,
+ struct iwl_rxon_context *ctx)
+{
+ if (conf_is_ht40_minus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ ctx->ht.is_40mhz = true;
+ } else if (conf_is_ht40_plus(conf)) {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ ctx->ht.is_40mhz = true;
+ } else {
+ ctx->ht.extension_chan_offset =
+ IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ ctx->ht.is_40mhz = false;
+ }
+}
+
int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
{
struct iwl_priv *priv = hw->priv;
@@ -586,19 +604,11 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
ctx->ht.enabled = conf_is_ht(conf);
if (ctx->ht.enabled) {
- if (conf_is_ht40_minus(conf)) {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_BELOW;
- ctx->ht.is_40mhz = true;
- } else if (conf_is_ht40_plus(conf)) {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
- ctx->ht.is_40mhz = true;
- } else {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_NONE;
- ctx->ht.is_40mhz = false;
- }
+ /* if HT40 is used, it should not change
+ * after associated except channel switch */
+ if (iwl_is_associated_ctx(ctx) &&
+ !ctx->ht.is_40mhz)
+ iwlagn_config_ht40(conf, ctx);
} else
ctx->ht.is_40mhz = false;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index ed62836..4b2aa1d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -1268,9 +1268,6 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
switch (keyconf->cipher) {
case WLAN_CIPHER_SUITE_TKIP:
- keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
- keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
-
if (sta)
addr = sta->addr;
else /* station mode case only */
@@ -1283,8 +1280,6 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
seq.tkip.iv32, p1k, CMD_SYNC);
break;
case WLAN_CIPHER_SUITE_CCMP:
- keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
- /* fall through */
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
ret = iwlagn_send_sta_key(priv, keyconf, sta_id,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index ccba69b..bacc06c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2316,6 +2316,17 @@ static int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
return -EOPNOTSUPP;
}
+ switch (key->cipher) {
+ case WLAN_CIPHER_SUITE_TKIP:
+ key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
+ /* fall through */
+ case WLAN_CIPHER_SUITE_CCMP:
+ key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
+ break;
+ default:
+ break;
+ }
+
/*
* We could program these keys into the hardware as well, but we
* don't expect much multicast traffic in IBSS and having keys
@@ -2599,21 +2610,9 @@ static void iwlagn_mac_channel_switch(struct ieee80211_hw *hw,
/* Configure HT40 channels */
ctx->ht.enabled = conf_is_ht(conf);
- if (ctx->ht.enabled) {
- if (conf_is_ht40_minus(conf)) {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_BELOW;
- ctx->ht.is_40mhz = true;
- } else if (conf_is_ht40_plus(conf)) {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
- ctx->ht.is_40mhz = true;
- } else {
- ctx->ht.extension_chan_offset =
- IEEE80211_HT_PARAM_CHA_SEC_NONE;
- ctx->ht.is_40mhz = false;
- }
- } else
+ if (ctx->ht.enabled)
+ iwlagn_config_ht40(conf, ctx);
+ else
ctx->ht.is_40mhz = false;
if ((le16_to_cpu(ctx->staging.channel) != ch))
@@ -3499,9 +3498,10 @@ MODULE_PARM_DESC(plcp_check, "Check plcp health (default: 1 [enabled])");
module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO);
MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])");
-module_param_named(wd_disable, iwlagn_mod_params.wd_disable, bool, S_IRUGO);
+module_param_named(wd_disable, iwlagn_mod_params.wd_disable, int, S_IRUGO);
MODULE_PARM_DESC(wd_disable,
- "Disable stuck queue watchdog timer (default: 0 [enabled])");
+ "Disable stuck queue watchdog timer 0=system default, "
+ "1=disable, 2=enable (default: 0)");
/*
* set bt_coex_active to true, uCode will do kill/defer
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index 5b936ec..3856aba 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -86,6 +86,8 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf,
u32 changes);
+void iwlagn_config_ht40(struct ieee80211_conf *conf,
+ struct iwl_rxon_context *ctx);
/* uCode */
int iwlagn_rx_calib_result(struct iwl_priv *priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 001fdf1..fcf5416 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1810,11 +1810,23 @@ void iwl_setup_watchdog(struct iwl_priv *priv)
{
unsigned int timeout = priv->cfg->base_params->wd_timeout;
- if (timeout && !iwlagn_mod_params.wd_disable)
- mod_timer(&priv->watchdog,
- jiffies + msecs_to_jiffies(IWL_WD_TICK(timeout)));
- else
- del_timer(&priv->watchdog);
+ if (!iwlagn_mod_params.wd_disable) {
+ /* use system default */
+ if (timeout && !priv->cfg->base_params->wd_disable)
+ mod_timer(&priv->watchdog,
+ jiffies +
+ msecs_to_jiffies(IWL_WD_TICK(timeout)));
+ else
+ del_timer(&priv->watchdog);
+ } else {
+ /* module parameter overwrite default configuration */
+ if (timeout && iwlagn_mod_params.wd_disable == 2)
+ mod_timer(&priv->watchdog,
+ jiffies +
+ msecs_to_jiffies(IWL_WD_TICK(timeout)));
+ else
+ del_timer(&priv->watchdog);
+ }
}
/**
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 137da33..f2fc288 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -113,6 +113,7 @@ struct iwl_lib_ops {
* @shadow_reg_enable: HW shadhow register bit
* @no_idle_support: do not support idle mode
* @hd_v2: v2 of enhanced sensitivity value, used for 2000 series and up
+ * wd_disable: disable watchdog timer
*/
struct iwl_base_params {
int eeprom_size;
@@ -134,6 +135,7 @@ struct iwl_base_params {
const bool shadow_reg_enable;
const bool no_idle_support;
const bool hd_v2;
+ const bool wd_disable;
};
/*
* @advanced_bt_coexist: support advanced bt coexist
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index 1f7a93c..14eaf37 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -120,7 +120,7 @@ extern struct iwl_mod_params iwlagn_mod_params;
* @restart_fw: restart firmware, default = 1
* @plcp_check: enable plcp health check, default = true
* @ack_check: disable ack health check, default = false
- * @wd_disable: enable stuck queue check, default = false
+ * @wd_disable: enable stuck queue check, default = 0
* @bt_coex_active: enable bt coex, default = true
* @led_mode: system default, default = 0
* @no_sleep_autoadjust: disable autoadjust, default = true
@@ -141,7 +141,7 @@ struct iwl_mod_params {
int restart_fw;
bool plcp_check;
bool ack_check;
- bool wd_disable;
+ int wd_disable;
bool bt_coex_active;
int led_mode;
bool no_sleep_autoadjust;
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index d999bf3..cae4435 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -757,6 +757,12 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (!local->int_scan_req)
return -ENOMEM;
+ for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
+ if (!local->hw.wiphy->bands[band])
+ continue;
+ local->int_scan_req->rates[band] = (u32) -1;
+ }
+
/* if low-level driver supports AP, we also support VLAN */
if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_AP)) {
hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP_VLAN);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index eca0fad..d5230ec 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1039,7 +1039,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
struct ieee80211_sub_if_data,
u.ap);
- memset(&sta->sta.drv_priv, 0, hw->sta_data_size);
WARN_ON(drv_sta_add(local, sdata, &sta->sta));
}
}
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 77e9267..3302c56 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -57,8 +57,17 @@
#define REG_DBG_PRINT(args...)
#endif
+static struct regulatory_request core_request_world = {
+ .initiator = NL80211_REGDOM_SET_BY_CORE,
+ .alpha2[0] = '0',
+ .alpha2[1] = '0',
+ .intersect = false,
+ .processed = true,
+ .country_ie_env = ENVIRON_ANY,
+};
+
/* Receipt of information from last regulatory request */
-static struct regulatory_request *last_request;
+static struct regulatory_request *last_request = &core_request_world;
/* To trigger userspace events */
static struct platform_device *reg_pdev;
@@ -150,7 +159,7 @@ static char user_alpha2[2];
module_param(ieee80211_regdom, charp, 0444);
MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain code");
-static void reset_regdomains(void)
+static void reset_regdomains(bool full_reset)
{
/* avoid freeing static information or freeing something twice */
if (cfg80211_regdomain == cfg80211_world_regdom)
@@ -165,6 +174,13 @@ static void reset_regdomains(void)
cfg80211_world_regdom = &world_regdom;
cfg80211_regdomain = NULL;
+
+ if (!full_reset)
+ return;
+
+ if (last_request != &core_request_world)
+ kfree(last_request);
+ last_request = &core_request_world;
}
/*
@@ -175,7 +191,7 @@ static void update_world_regdomain(const struct ieee80211_regdomain *rd)
{
BUG_ON(!last_request);
- reset_regdomains();
+ reset_regdomains(false);
cfg80211_world_regdom = rd;
cfg80211_regdomain = rd;
@@ -1407,7 +1423,8 @@ static int __regulatory_hint(struct wiphy *wiphy,
}
new_request:
- kfree(last_request);
+ if (last_request != &core_request_world)
+ kfree(last_request);
last_request = pending_request;
last_request->intersect = intersect;
@@ -1577,9 +1594,6 @@ static int regulatory_hint_core(const char *alpha2)
{
struct regulatory_request *request;
- kfree(last_request);
- last_request = NULL;
-
request = kzalloc(sizeof(struct regulatory_request),
GFP_KERNEL);
if (!request)
@@ -1777,7 +1791,7 @@ static void restore_regulatory_settings(bool reset_user)
mutex_lock(&cfg80211_mutex);
mutex_lock(®_mutex);
- reset_regdomains();
+ reset_regdomains(true);
restore_alpha2(alpha2, reset_user);
/*
@@ -2037,8 +2051,10 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
}
request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
- if (!request_wiphy) {
- reg_set_request_processed();
+ if (!request_wiphy &&
+ (last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER ||
+ last_request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE)) {
+ schedule_delayed_work(®_timeout, 0);
return -ENODEV;
}
@@ -2046,7 +2062,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
int r;
if (last_request->initiator != NL80211_REGDOM_SET_BY_DRIVER) {
- reset_regdomains();
+ reset_regdomains(false);
cfg80211_regdomain = rd;
return 0;
}
@@ -2067,7 +2083,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
if (r)
return r;
- reset_regdomains();
+ reset_regdomains(false);
cfg80211_regdomain = rd;
return 0;
}
@@ -2092,7 +2108,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
rd = NULL;
- reset_regdomains();
+ reset_regdomains(false);
cfg80211_regdomain = intersected_rd;
return 0;
@@ -2112,7 +2128,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
kfree(rd);
rd = NULL;
- reset_regdomains();
+ reset_regdomains(false);
cfg80211_regdomain = intersected_rd;
return 0;
@@ -2265,11 +2281,8 @@ void /* __init_or_exit */ regulatory_exit(void)
mutex_lock(&cfg80211_mutex);
mutex_lock(®_mutex);
- reset_regdomains();
-
- kfree(last_request);
+ reset_regdomains(true);
- last_request = NULL;
dev_set_uevent_suppress(®_pdev->dev, true);
platform_device_unregister(reg_pdev);
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply related
* Re: eth0: hw csum failure
From: Stephen Hemminger @ 2011-12-05 16:18 UTC (permalink / raw)
To: Pavel Mateja; +Cc: netdev
In-Reply-To: <201112051351.26798.pavel@netsafe.cz>
I meant fixed in 3.2-rc4 and queued for 3.1 stable.
^ permalink raw reply
* Re: eth0: hw csum failure
From: Stephen Hemminger @ 2011-12-05 16:17 UTC (permalink / raw)
To: Pavel Mateja; +Cc: netdev
In-Reply-To: <201112051351.26798.pavel@netsafe.cz>
> If i did git bisect right it was caused by commit
> 4b275d7efa1c4412f0d572fcd7f78ed0919370b3
> bridge: Pseudo-header required for the checksum of ICMPv6
>
> Problem disappears when I turn off HW checksum via ethtool.
>
> Can anybody help?
Fixed in 3.1 (and queued for 3.0 stable).
commit fa2da8cdae1dd64f78fc915ca1d1a4a93c71e7cb
Author: stephen hemminger <shemminger@vyatta.com>
Date: Tue Nov 15 08:09:14 2011 +0000
bridge: correct IPv6 checksum after pull
Bridge multicast snooping of ICMPv6 would incorrectly report a checksum prob
when used with Ethernet devices like sky2 that use CHECKSUM_COMPLETE.
When bytes are removed from skb, the computed checksum needs to be adjusted.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Martin Volf <martin.volf.42@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: sky2 tx watchdog timeout with 1Gb speed
From: Stephen Hemminger @ 2011-12-05 16:16 UTC (permalink / raw)
To: Milan Kocian; +Cc: netdev
In-Reply-To: <20111205124725.GA19385@ntm.wq.cz>
On Mon, 5 Dec 2011 13:47:25 +0100
Milan Kocian <milon@wq.cz> wrote:
> On Sat, Nov 26, 2011 at 05:03:31PM -0800, Stephen Hemminger wrote:
> >
> > I think the problem might be that the board doesn't really have all the DMA pins
> > wired. You might try enabling iommu, or limiting to <4G of memory.
>
> hello stephen,
>
> you are probably right. I found that with this mb (Gigabyte GA-965GM-S2) was
> more problems with linux. So I replaced this old crap with new one :-).
> Many thanks for your time.
>
> Best regards,
There was a similar glitch with some skge users.
I have a patch to limit driver to 32bit only. If you send the DMI information,
it can be made automatic.
^ permalink raw reply
* Re: [RFC 2/3] if_ether.h: Add IEEE 802.1 Local Experimental Ethertype 1.
From: Rémi Denis-Courmont @ 2011-12-05 15:46 UTC (permalink / raw)
To: Sjur Brændeland; +Cc: netdev, Alexey Orishko, David S. Miller
In-Reply-To: <CAJK669ZhM_KSOd0MS7jTVvJ16KqNzPCj-Ns1ytN5NPg5PxgoOQ@mail.gmail.com>
Le lundi 5 décembre 2011 16:33:50 Sjur Brændeland, vous avez écrit :
> Hi Rémi,
>
> > It's even weirder then. If you have control over both ends and the NCM
> > 1.0 interface is not adequate, then you really should use your own CDC
> > class for the purpose.
>
> The reason we use NCM is performance: CDC normally gives less than 100Mbps,
> while NCM can give you up to 200Mbps.
NCM is a sub-profile of CDC, so that statement makes no sense to me.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
^ permalink raw reply
* Re: linux-next: manual merge of the net-next tree with the tree
From: wwguy @ 2011-12-05 15:42 UTC (permalink / raw)
To: John W. Linville
Cc: Stephen Rothwell, David Miller, netdev@vger.kernel.org,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Berg, Johannes
In-Reply-To: <20111205145320.GA2531@tuxdriver.com>
On Mon, 2011-12-05 at 06:53 -0800, John W. Linville wrote:
> On Mon, Dec 05, 2011 at 03:34:16PM +1100, Stephen Rothwell wrote:
> > On Mon, 5 Dec 2011 12:34:28 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > Today's linux-next merge of the net-next tree got a conflict in
> > > drivers/net/wireless/iwlwifi/iwl-agn.c between commits from the
> >
> > wireless (sorry)
> >
> > > tree and commit 7335613ae27a ("iwlwifi: move all mac80211 related
> > > functions to one place") from the net-next tree.
> > >
> > > I just used the net-next version (which may require some fixes).
>
> Yeah, I'll try to get that straightened-out over the next day or two.
>
John, anything I can help?
Thanks
Wey
^ permalink raw reply
* Re: [PATCH v3 2/2] ARM: at91/net: add macb ethernet controller in 9g45 DT
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-12-05 15:25 UTC (permalink / raw)
To: Nicolas Ferre
Cc: netdev, devicetree-discuss, linux-kernel, grant.likely, jamie,
linux-arm-kernel
In-Reply-To: <1ec7a786c94564a9b15a61239f41a2a3fba8578a.1323086095.git.nicolas.ferre@atmel.com>
On 12:59 Mon 05 Dec , Nicolas Ferre wrote:
> Add the Cadence macb ethernet controller in at91sam9g45 .dtsi and
> enable it in at91sam9m10g45ek board device tree file.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Best Regards,
J.
^ permalink raw reply
* Re: [PATCH] drivers/net/usb/asix: resync from vendor's copy
From: Ben Hutchings @ 2011-12-05 15:18 UTC (permalink / raw)
To: Mark Lord; +Cc: David Miller, netdev, linux-kernel
In-Reply-To: <4EDCD828.2090904@teksavvy.com>
On Mon, 2011-12-05 at 09:41 -0500, Mark Lord wrote:
[...]
> static int ax88772b_bind(struct usbnet *dev, struct usb_interface *intf)
> {
> ...
> /* register support for hardware checksums */
> dev->net->hw_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
>
> /* enable hardware checksums */
> dev->net->features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
> ax88772b_set_features(dev->net, dev->net->features);
> ...
> }
> -------------------------------snip-----------------------------------
>
> Does this look correct -- any improvements/fixes to suggest?
[...]
NETIF_F_HW_CSUM means the hardware implements generic IP-style
checksumming: the stack specifies the offset at which to start
checksumming and the offset at which to store the checksum, and the
hardware does not attempt to parse the headers.
If this hardware recognises specific protocols and works out the offsets
itself, then you must claim NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM instead.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: r8169 performance?
From: Chris Adams @ 2011-12-05 14:54 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, hayeswang
In-Reply-To: <20111205064403.GA3426@electric-eye.fr.zoreil.com>
Once upon a time, Francois Romieu <romieu@fr.zoreil.com> said:
> Chris Adams <cmadams@hiwaay.net> :
> [...]
> > On the "problem" computer (on Fedora 16, kernel 3.1.2):
> >
> > [ 7.101106] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
> > [ 7.102665] r8169 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> > [ 7.107308] r8169 0000:02:00.0: setting latency timer to 64
> > [ 7.107370] r8169 0000:02:00.0: irq 42 for MSI/MSI-X
> > [ 7.107703] r8169 0000:02:00.0: eth0: RTL8168d/8111d at 0xffffc900112fc000, 00:19:66:f2:dc:0b, XID 081000c0 IRQ 42
> >
> > On the "okay" computer (on Fedora 14, kernel 2.6.35.14):
> >
> > [ 9.053574] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
> > [ 9.053594] r8169 0000:06:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> > [ 9.053689] r8169 0000:06:00.0: setting latency timer to 64
> > [ 9.053740] r8169 0000:06:00.0: irq 47 for MSI/MSI-X
> > [ 9.053830] r8169 0000:06:00.0: eth0: RTL8168d/8111d at 0xffffc90012998000, 6c:f0:49:b7:67:91, XID 083000c0 IRQ 47
>
> Almost the same: RTL_GIGA_MAC_VER_25 versus RTL_GIGA_MAC_VER_26 (faster).
Ahh, my eyes didn't see that one bit difference.
> The only difference in the driver is the hw_phy_config part.
There's also a difference in the interrupt handling (looks like only in
the receive FIFO overflow case). Also, they load different firmware (so
I guess my problem could be firmware related, which I guess only RealTek
could find/fix).
I guess my question is this: is there a chance this can be solved with
driver changes, or should I just accept that the on-board NIC has poor
performance and install an add-in NIC?
--
Chris Adams <cmadams@hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
^ permalink raw reply
* [PATCH] net/fec: fix the use of pdev->id
From: Shawn Guo @ 2011-12-05 15:01 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, linux-arm-kernel, Shawn Guo
The pdev->id is used in several places for different purpose. All
these uses assume it's always the id of fec device which is >= 0.
However this is only true for non-DT case. When DT plays, pdev->id
is always -1, which will break these pdev->id users.
Instead of fixing all these users one by one, this patch introduces
a new member 'dev_id' to 'struct fec_enet_private' for holding the
correct fec device id, and replaces all the existing uses of pdev->id
with this dev_id.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/net/ethernet/freescale/fec.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 1124ce0..c136230 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -232,6 +232,7 @@ struct fec_enet_private {
struct platform_device *pdev;
int opened;
+ int dev_id;
/* Phylib and MDIO interface */
struct mii_bus *mii_bus;
@@ -837,7 +838,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
/* Adjust MAC if using macaddr */
if (iap == macaddr)
- ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->pdev->id;
+ ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->dev_id;
}
/* ------------------------------------------------------------------------- */
@@ -953,7 +954,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
char mdio_bus_id[MII_BUS_ID_SIZE];
char phy_name[MII_BUS_ID_SIZE + 3];
int phy_id;
- int dev_id = fep->pdev->id;
+ int dev_id = fep->dev_id;
fep->phy_dev = NULL;
@@ -1031,7 +1032,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
* mdio interface in board design, and need to be configured by
* fec0 mii_bus.
*/
- if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && pdev->id > 0) {
+ if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && fep->dev_id > 0) {
/* fec1 uses fec0 mii_bus */
fep->mii_bus = fec0_mii_bus;
return 0;
@@ -1063,7 +1064,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
fep->mii_bus->read = fec_enet_mdio_read;
fep->mii_bus->write = fec_enet_mdio_write;
fep->mii_bus->reset = fec_enet_mdio_reset;
- snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id + 1);
+ snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%x", fep->dev_id + 1);
fep->mii_bus->priv = fep;
fep->mii_bus->parent = &pdev->dev;
@@ -1521,6 +1522,7 @@ fec_probe(struct platform_device *pdev)
int i, irq, ret = 0;
struct resource *r;
const struct of_device_id *of_id;
+ static int dev_id;
of_id = of_match_device(fec_dt_ids, &pdev->dev);
if (of_id)
@@ -1548,6 +1550,7 @@ fec_probe(struct platform_device *pdev)
fep->hwp = ioremap(r->start, resource_size(r));
fep->pdev = pdev;
+ fep->dev_id = dev_id++;
if (!fep->hwp) {
ret = -ENOMEM;
--
1.7.4.1
^ permalink raw reply related
* Re: linux-next: manual merge of the net-next tree with the tree
From: John W. Linville @ 2011-12-05 14:53 UTC (permalink / raw)
To: Stephen Rothwell
Cc: David Miller, netdev, linux-next, linux-kernel, Wey-Yi Guy,
Johannes Berg
In-Reply-To: <20111205153416.e1dd01e5368ce7c016d99a59@canb.auug.org.au>
On Mon, Dec 05, 2011 at 03:34:16PM +1100, Stephen Rothwell wrote:
> On Mon, 5 Dec 2011 12:34:28 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Today's linux-next merge of the net-next tree got a conflict in
> > drivers/net/wireless/iwlwifi/iwl-agn.c between commits from the
>
> wireless (sorry)
>
> > tree and commit 7335613ae27a ("iwlwifi: move all mac80211 related
> > functions to one place") from the net-next tree.
> >
> > I just used the net-next version (which may require some fixes).
Yeah, I'll try to get that straightened-out over the next day or two.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH] drivers/net/usb/asix: resync from vendor's copy
From: Mark Lord @ 2011-12-05 14:41 UTC (permalink / raw)
To: Ben Hutchings, David Miller; +Cc: netdev, linux-kernel
In-Reply-To: <1320860895.2781.6.camel@bwh-desktop>
David / Ben / anyone..
I'm trying to puzzle out the rx/tx checksum feature flags,
and there does seem to be a lot of variance among drivers
as to how these are used.
The ASIX chips have hardware support for IP and TCP checksumming
for both IPv4 and IPv6. So I'm thinking this code (below) is the
most appropriate method for use in asix.c:
------------------------------- asix.h -----------------------------------
...
#define AX_RXCOE_IPCE 0x0001
#define AX_RXCOE_IPVE 0x0002
#define AX_RXCOE_V6VE 0x0004
#define AX_RXCOE_TCPE 0x0008
#define AX_RXCOE_UDPE 0x0010
#define AX_RXCOE_ICMP 0x0020
#define AX_RXCOE_IGMP 0x0040
#define AX_RXCOE_ICV6 0x0080
#define AX_RXCOE_TCPV6 0x0100
#define AX_RXCOE_UDPV6 0x0200
#define AX_RXCOE_ICMV6 0x0400
#define AX_RXCOE_IGMV6 0x0800
#define AX_RXCOE_ICV6V6 0x1000
#define AX_RXCOE_FOPC 0x8000
#define AX_RXCOE_DEF_CSUM (AX_RXCOE_IPCE | AX_RXCOE_IPVE | \
AX_RXCOE_V6VE | AX_RXCOE_TCPE | \
AX_RXCOE_UDPE | AX_RXCOE_ICV6 | \
AX_RXCOE_TCPV6 | AX_RXCOE_UDPV6)
#define AX_RXCOE_64TE 0x0100
#define AX_RXCOE_PPPOE 0x0200
#define AX_RXCOE_RPCE 0x8000
#define AX_TXCOE_IP 0x0001
#define AX_TXCOE_TCP 0x0002
#define AX_TXCOE_UDP 0x0004
#define AX_TXCOE_ICMP 0x0008
#define AX_TXCOE_IGMP 0x0010
#define AX_TXCOE_ICV6 0x0020
#define AX_TXCOE_TCPV6 0x0100
#define AX_TXCOE_UDPV6 0x0200
#define AX_TXCOE_ICMV6 0x0400
#define AX_TXCOE_IGMV6 0x0800
#define AX_TXCOE_ICV6V6 0x1000
#define AX_TXCOE_DEF_CSUM (AX_TXCOE_TCP | AX_TXCOE_UDP | \
AX_TXCOE_TCPV6 | AX_TXCOE_UDPV6)
...
------------------------------- asix.c -----------------------------------
static int ax88772b_set_features(struct net_device *netdev, u32 features)
{
struct usbnet *dev = netdev_priv(netdev);
u16 tx_csum = (features & NETIF_F_HW_CSUM) ? AX_TXCOE_DEF_CSUM : 0;
u16 rx_csum = (features & NETIF_F_RXCSUM ) ? AX_RXCOE_DEF_CSUM : 0;
ax8817x_write_cmd(dev, AX_CMD_WRITE_TXCOE_CTL, tx_csum, 0, 0, NULL);
ax8817x_write_cmd(dev, AX_CMD_WRITE_RXCOE_CTL, rx_csum, 0, 0, NULL);
return 0;
}
...
static int ax88772b_bind(struct usbnet *dev, struct usb_interface *intf)
{
...
/* register support for hardware checksums */
dev->net->hw_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
/* enable hardware checksums */
dev->net->features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
ax88772b_set_features(dev->net, dev->net->features);
...
}
-------------------------------snip-----------------------------------
Does this look correct -- any improvements/fixes to suggest?
I am still trying to find out about all of the other possible hardware bits,
but the AX_TXCOE_DEF_CSUM and AX_RXCOE_DEF_CSUM patterns are the ones
that Asix themselves were using in the vendor driver.
Thanks.
^ permalink raw reply
* Re: [RFC 2/3] if_ether.h: Add IEEE 802.1 Local Experimental Ethertype 1.
From: Sjur Brændeland @ 2011-12-05 14:33 UTC (permalink / raw)
To: Rémi Denis-Courmont; +Cc: netdev, Alexey Orishko, David S. Miller
In-Reply-To: <ff290c739be323dec89d19ed905feb94@chewa.net>
Hi Rémi,
> It's even weirder then. If you have control over both ends and the NCM 1.0
> interface is not adequate, then you really should use your own CDC class
> for the purpose.
The reason we use NCM is performance: CDC normally gives less than 100Mbps,
while NCM can give you up to 200Mbps.
Regards,
Sjur
^ permalink raw reply
* Re: [RFC 2/3] if_ether.h: Add IEEE 802.1 Local Experimental Ethertype 1.
From: Rémi Denis-Courmont @ 2011-12-05 14:03 UTC (permalink / raw)
To: Sjur Brændeland; +Cc: netdev, Alexey Orishko, David S. Miller
In-Reply-To: <CAJK669bK8kBXfc=j1q5NWEDCgSZwO0O=LsZ8z5GzB0S07gwBEQ@mail.gmail.com>
On Mon, 5 Dec 2011 14:14:30 +0100, Sjur Brændeland <sjurbren@gmail.com>
wrote:
>> I don't think you can just go and steal a reserved EtherType. What if
>> some user-space (using packet sockets) or out-of-tree kernel driver
>> does actual "experiment" with this type?
>
> I don't think defining this type in if_ether.h would harm anyone ;-)
>
> I think your comments are applicable for the patch:
> "caif: Add support for CAIF over CDC NCM USB interface".
That patch makes no sense without this patch. I comment on the first patch
in the series that exhibits the problem.
> Currently CAIF over CDC NCM USB is only deployed for the Ethernet link
> between Host and Modem internally in a Smart Phone, and not out of the
> Smart Phone (Tethering). The modem's Ethernet interface is connected to
> the CAIF stack and not to the modem's IP stack.On the Linux Host,
> CAIF takes this EthType into use *only* for a Ethernet interface with
> the VID/PID of a ST-E CAIF modem.
It's even weirder then. If you have control over both ends and the NCM 1.0
interface is not adequate, then you really should use your own CDC class
for the purpose.
--
Rémi Denis-Courmont
http://www.remlab.net/
^ permalink raw reply
* Re: [net-next 1/6] e1000e: Avoid wrong check on TX hang
From: Flavio Leitner @ 2011-12-05 13:49 UTC (permalink / raw)
To: Michael Wang; +Cc: Jeff Kirsher, davem, netdev, gospo, sassmann
In-Reply-To: <4EDC82AE.40806@linux.vnet.ibm.com>
On Mon, 05 Dec 2011 16:37:02 +0800
Michael Wang <wangyun@linux.vnet.ibm.com> wrote:
> Hi, Jeff
>
> Please reserve "From: Michael Wang <wangyun@linux.vnet.ibm.com>" in
> content. And because Flavio not respond these days, I add his name
> for him.
>
> Thanks,
> Michael Wang
>
> On 12/05/2011 04:20 PM, Jeff Kirsher wrote:
>
> > Based on the original patch submitted my Michael Wang
> > <wangyun@linux.vnet.ibm.com>.
>
> From: Michael Wang <wangyun@linux.vnet.ibm.com>
>
> > Descriptors may not be write-back while checking TX hang with flag
> > FLAG2_DMA_BURST on.
> > So when we detect hang, we just flush the descriptor and detect
> > again for once.
> >
> > -v2 change 1 to true and 0 to false and remove extra ()
> >
> > CC: Michael Wang <wangyun@linux.vnet.ibm.com>
> > CC: Flavio Leitner <fbl@redhat.com>
>
> Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
Agree with the fixes. thanks,
Signed-off-by: Flavio Leitner <fbl@redhat.com>
^ permalink raw reply
* Re: Integration of Open vSwitch
From: Jamal Hadi Salim @ 2011-12-05 13:49 UTC (permalink / raw)
To: Jesse Gross
Cc: dev-yBygre7rU0TnMu66kgdUjQ, Chris Wright, Herbert Xu,
Eric Dumazet, netdev, John Fastabend, Stephen Hemminger,
David Miller
In-Reply-To: <CAEP_g=8UM17Jbv2Y7ag7kO7BuXENDiitKydXMjiNtB+-uyxvKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Jesse,
I empathize with effort youve put in, i really do; youve
already created the messaging from user space to kernel
and dammit it works; however, i dont agree with your reasoning.
The classifier action code is _exactly_ the same infrastructure.
The user space API/messaging already exists. If there are actions
or a classifier missing - add it.
I wish i had the time to re-write the pieces i think need
changing. If the plan is to migrate to the current tc action
code, I will be fine with it - but you are not even suggesting
that.
I think i will punt this to DaveM to make the call.
cheers,
jamal
On Fri, 2011-12-02 at 15:30 -0800, Jesse Gross wrote:
>
> I completely agree with the desire to share code where there's overlap
> and it makes sense (I was actually just working on some refactoring to
> increase code reuse before this).
>
> I think one of the key things to focus on is the userspace/kernel
> interface since we'll have much less opportunity to significantly
> change that over time. Getting both compatibility and performance is
> something that we've worked on a fair amount and have arrived at a
> solution that meets the needs of OVS (and probably only OVS) pretty
> well. I think it's a nice model but keeping that while refactoring on
> top of the tc layer seems challenging to do cleanly because the flow
> information is needed by both the flow lookup and userspace
> communication. Stringing that through generic code seems fairly
> unappealing.
>
> So I agree with you in principle and if you are right that things tend
> to converge there should be more room for code reuse over time. Right
> now though I would just focus on the high level bits.
^ permalink raw reply
* Re: ipv4: Perform peer validation on cached route lookup.
From: Dan Carpenter @ 2011-12-05 13:31 UTC (permalink / raw)
To: davem; +Cc: netdev
In-Reply-To: <20111205132714.GA27452@elgon.mountain>
[-- Attachment #1: Type: text/plain, Size: 92 bytes --]
The continue in __ip_route_output_key() has the same issue as well.
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* re: ipv4: Perform peer validation on cached route lookup.
From: Dan Carpenter @ 2011-12-05 13:27 UTC (permalink / raw)
To: davem; +Cc: netdev
Hello David S. Miller,
This is a semi-automatic email about new static checker warnings.
The patch efbc368dcc64: "ipv4: Perform peer validation on cached
route lookup." from Dec 1, 2011, leads to the following Smatch
complaint:
net/ipv4/route.c +2369 ip_route_input_common()
error: we previously assumed 'rth' could be null (see line 2378)
net/ipv4/route.c
2368 for (rth = rcu_dereference(rt_hash_table[hash].chain); rth;
2369 rth = rcu_dereference(rth->dst.rt_next)) {
^^^^^^^^^^^^^^^^
The dereference here will oops
2370 if ((((__force u32)rth->rt_key_dst ^ (__force u32)daddr) |
2371 ((__force u32)rth->rt_key_src ^ (__force u32)saddr) |
2372 (rth->rt_route_iif ^ iif) |
2373 (rth->rt_key_tos ^ tos)) == 0 &&
2374 rth->rt_mark == skb->mark &&
2375 net_eq(dev_net(rth->dst.dev), net) &&
2376 !rt_is_expired(rth)) {
2377 rth = ipv4_validate_peer(rth);
2378 if (!rth)
2379 continue;
if we hit this new continue statement.
2380 if (noref) {
regards,
dan carpenter
^ permalink raw reply
* Re: [RFC 2/3] if_ether.h: Add IEEE 802.1 Local Experimental Ethertype 1.
From: Sjur Brændeland @ 2011-12-05 13:14 UTC (permalink / raw)
To: Rémi Denis-Courmont; +Cc: netdev, Alexey Orishko, David S. Miller
In-Reply-To: <5636a5efd90c56b538569ab019d7be4c@chewa.net>
Hi Rémi,
>> Add EthType 0x88b5.
>> This Ethertype value is available for public use for prototype and
>> vendor-specific protocol development,as defined in Amendment 802a
>> to IEEE Std 802.
>
> I don't think you can just go and steal a reserved EtherType. What if some
> user-space (using packet sockets) or out-of-tree kernel driver does actual
> "experiment" with this type?
I don't think defining this type in if_ether.h would harm anyone ;-)
I think your comments are applicable for the patch:
"caif: Add support for CAIF over CDC NCM USB interface".
Currently CAIF over CDC NCM USB is only deployed for the Ethernet link
between Host and Modem internally in a Smart Phone, and not out of the
Smart Phone (Tethering). The modem's Ethernet interface is connected to
the CAIF stack and not to the modem's IP stack.On the Linux Host,
CAIF takes this EthType into use *only* for a Ethernet interface with
the VID/PID of a ST-E CAIF modem.
With this setup I have a hard time seeing the big risk of interference with
others using this Ethernet Type.
We use Ethernet for this point-to-point link because NCM 1.0 only
defines Ethernet as the only bearer. The long term solution for CAIF over
NCM should be based on MBIM 1.0 specification, where vendor specific
services can be define. We could then transmit CAIF frames directly
in a vendor specific service without the use of a Ethernet header.
> Why don't you define your own link-layer, e.g. with a vendor-specific CDC
> profile?
I look into this...
BTW: Could you please do "reply-all" next time, so I get your mail in my inbox.
Regards,
Sjur
^ permalink raw reply
* [BUG] net: WARNING: at fs/sysfs/dir.c:481 sysfs_add_one+0xb7/0xe0()
From: Sasha Levin @ 2011-12-05 13:01 UTC (permalink / raw)
To: marcel, padovan, davem; +Cc: Dave Jones, linux-kernel, netdev
Hi,
When closing and opening a HCI device, a device id may be assigned
before the previous one was fully released. It manifests itself for
example in a warning when the new sysfs entry is being added before the
previous one was deleted:
[ 5711.916643] ------------[ cut here ]------------
[ 5711.918640] WARNING: at fs/sysfs/dir.c:481 sysfs_add_one+0xb7/0xe0()
[ 5711.920203] sysfs: cannot create duplicate filename '/devices/virtual/bluetooth/hci0'
[ 5711.921866] Pid: 20596, comm: trinity Not tainted 3.2.0-rc4-next-20111205-sasha-00003-gd1b8117 #48
[ 5711.923256] Call Trace:
[ 5711.923651] [<ffffffff810aec45>] warn_slowpath_common+0x75/0xb0
[ 5711.924600] [<ffffffff810aece1>] warn_slowpath_fmt+0x41/0x50
[ 5711.925503] [<ffffffff812196d7>] sysfs_add_one+0xb7/0xe0
[ 5711.926357] [<ffffffff81219785>] create_dir+0x85/0xe0
[ 5711.927267] [<ffffffff812198fb>] sysfs_create_dir+0x7b/0xc0
[ 5711.928555] [<ffffffff817a7201>] kobject_add_internal+0x121/0x200
[ 5711.929947] [<ffffffff817a73dd>] kobject_add+0x6d/0xb0
[ 5711.931170] [<ffffffff819f8e1b>] device_add+0xcb/0x700
[ 5711.932073] [<ffffffff819f8c8c>] ? dev_set_name+0x3c/0x40
[ 5711.932911] [<ffffffff821d166c>] ? hci_register_dev+0x56c/0x690
[ 5711.933859] [<ffffffff821e23e2>] hci_add_sysfs+0x52/0x150
[ 5711.934733] [<ffffffff821d16a6>] hci_register_dev+0x5a6/0x690
[ 5711.935678] [<ffffffff81d423fb>] vhci_open+0xfb/0x190
[ 5711.936777] [<ffffffff818a5cd1>] misc_open+0x81/0x110
[ 5711.937951] [<ffffffff811a4f9f>] chrdev_open+0x7f/0x150
[ 5711.939152] [<ffffffff811a4f20>] ? cdev_put+0x10/0x10
[ 5711.940410] [<ffffffff8119e122>] __dentry_open+0x282/0x3b0
[ 5711.941513] [<ffffffff8119f274>] nameidata_to_filp+0x74/0x80
[ 5711.942448] [<ffffffff811aed2c>] do_last+0x1bc/0x940
[ 5711.943268] [<ffffffff811af586>] path_openat+0xd6/0x440
[ 5711.944124] [<ffffffff8104a1f3>] ? sched_clock+0x13/0x20
[ 5711.945104] [<ffffffff810d6605>] ? sched_clock_local+0x25/0x90
[ 5711.946065] [<ffffffff811af934>] do_filp_open+0x44/0xa0
[ 5711.947261] [<ffffffff810a3a1d>] ? sub_preempt_count+0x9d/0xd0
[ 5711.948614] [<ffffffff823db830>] ? _raw_spin_unlock+0x30/0x60
[ 5711.949917] [<ffffffff811be6d5>] ? alloc_fd+0x185/0x1f0
[ 5711.951126] [<ffffffff8119f79c>] do_sys_open+0xfc/0x1d0
[ 5711.951949] [<ffffffff8119f88b>] sys_open+0x1b/0x20
[ 5711.952742] [<ffffffff823dcf52>] system_call_fastpath+0x16/0x1b
[ 5711.953739] ---[ end trace 6eef4878a8c24f09 ]---
But it may also cause more things which are not as visible.
Please let me know if I can help with debugging this issue.
--
Sasha.
^ permalink raw reply
* eth0: hw csum failure
From: Pavel Mateja @ 2011-12-05 12:51 UTC (permalink / raw)
To: netdev
Hi,
I'm trying new kernel and I got my dmesg flooded with traces:
[ 78.068024] eth0: hw csum failure.
[ 78.068030] Pid: 0, comm: kworker/0:0 Not tainted 3.1.0-rc3+ #13
[ 78.068033] Call Trace:
[ 78.068035] <IRQ> [<ffffffff81225bc6>] ? netdev_rx_csum_fault+0x29/0x31
[ 78.068048] [<ffffffff8121fb86>] ? __skb_checksum_complete_head+0x41/0x53
[ 78.068058] [<ffffffffa02da598>] ? br_multicast_rcv+0x7e8/0xca1 [bridge]
[ 78.068063] [<ffffffff8118b424>] ? swiotlb_map_sg_attrs+0xe8/0x10e
[ 78.068077] [<ffffffffa0051547>] ? ahci_qc_prep+0x59/0x108 [libahci]
[ 78.068083] [<ffffffffa0050e15>] ? ahci_qc_issue+0x11/0xdb [libahci]
[ 78.068093] [<ffffffffa0021bd2>] ? ata_qc_issue+0x28b/0x2c5 [libata]
[ 78.068099] [<ffffffff8102ec2c>] ? select_task_rq_fair+0x369/0x610
[ 78.068108] [<ffffffffa0024fb2>] ? ata_qc_set_pc_nbytes+0x1b/0x1b [libata]
[ 78.068114] [<ffffffffa02d4fb8>] ? br_handle_frame_finish+0x90/0x1fe [bridge]
[ 78.068121] [<ffffffffa02d52cc>] ? br_handle_frame+0x1a6/0x1be [bridge]
[ 78.068127] [<ffffffffa02d5126>] ? br_handle_frame_finish+0x1fe/0x1fe [bridge]
[ 78.068132] [<ffffffff81223181>] ? __netif_receive_skb+0x162/0x2a8
[ 78.068136] [<ffffffff812264eb>] ? netif_receive_skb+0x63/0x69
[ 78.068140] [<ffffffff8122691a>] ? napi_gro_receive+0x1d/0x2b
[ 78.068143] [<ffffffff81226567>] ? napi_skb_finish+0x1c/0x31
[ 78.068151] [<ffffffffa00c4c9f>] ? sky2_poll+0x781/0x99c [sky2]
[ 78.068155] [<ffffffff812269ea>] ? net_rx_action+0x61/0x14f
[ 78.068161] [<ffffffff81039e2b>] ? __do_softirq+0xb5/0x16f
[ 78.068166] [<ffffffff812ce2ac>] ? call_softirq+0x1c/0x30
[ 78.068170] [<ffffffff8100375b>] ? do_softirq+0x2e/0x63
[ 78.068174] [<ffffffff8103a087>] ? irq_exit+0x3c/0x9a
[ 78.068177] [<ffffffff810034a1>] ? do_IRQ+0x82/0x98
[ 78.068182] [<ffffffff812c792b>] ? common_interrupt+0x6b/0x6b
[ 78.068184] <EOI> [<ffffffff81008056>] ? mwait_idle+0x7f/0xa5
[ 78.068192] [<ffffffff81008049>] ? mwait_idle+0x72/0xa5
[ 78.068195] [<ffffffff8100123b>] ? cpu_idle+0xa0/0xda
[ 78.068199] [<ffffffff812c7654>] ? _raw_spin_unlock_irqrestore+0x5/0xf
[ 78.068205] [<ffffffff812bb779>] ? start_secondary+0x1c9/0x1cf
If i did git bisect right it was caused by commit
4b275d7efa1c4412f0d572fcd7f78ed0919370b3
bridge: Pseudo-header required for the checksum of ICMPv6
Problem disappears when I turn off HW checksum via ethtool.
Can anybody help?
--
Pavel Mateja
^ permalink raw reply
* Re: sky2 tx watchdog timeout with 1Gb speed
From: Milan Kocian @ 2011-12-05 12:47 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20111126170331.744025f1@s6510.linuxnetplumber.net>
On Sat, Nov 26, 2011 at 05:03:31PM -0800, Stephen Hemminger wrote:
>
> I think the problem might be that the board doesn't really have all the DMA pins
> wired. You might try enabling iommu, or limiting to <4G of memory.
hello stephen,
you are probably right. I found that with this mb (Gigabyte GA-965GM-S2) was
more problems with linux. So I replaced this old crap with new one :-).
Many thanks for your time.
Best regards,
--
Milan Kocian
^ permalink raw reply
* [PATCH net-next] ipv4: arp: Cleanup in arp.c
From: igorm @ 2011-12-05 12:25 UTC (permalink / raw)
To: netdev; +Cc: davem, Igor Maravic
From: Igor Maravic <igorm@etf.rs>
Use "IS_ENABLED(CONFIG_FOO)" macro instead of
"defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE)"
Signed-off-by: Igor Maravic <igorm@etf.rs>
---
net/ipv4/arp.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index ff324eb..381a087 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -277,9 +277,9 @@ static int arp_constructor(struct neighbour *neigh)
default:
break;
case ARPHRD_ROSE:
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+#if IS_ENABLED(CONFIG_AX25)
case ARPHRD_AX25:
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
+#if IS_ENABLED(CONFIG_NETROM)
case ARPHRD_NETROM:
#endif
neigh->ops = &arp_broken_ops;
@@ -629,13 +629,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
arp->ar_pro = htons(ETH_P_IP);
break;
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+#if IS_ENABLED(CONFIG_AX25)
case ARPHRD_AX25:
arp->ar_hrd = htons(ARPHRD_AX25);
arp->ar_pro = htons(AX25_P_IP);
break;
-#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
+#if IS_ENABLED(CONFIG_NETROM)
case ARPHRD_NETROM:
arp->ar_hrd = htons(ARPHRD_NETROM);
arp->ar_pro = htons(AX25_P_IP);
@@ -643,13 +643,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
#endif
#endif
-#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE)
+#if IS_ENABLED(CONFIG_FDDI)
case ARPHRD_FDDI:
arp->ar_hrd = htons(ARPHRD_ETHER);
arp->ar_pro = htons(ETH_P_IP);
break;
#endif
-#if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)
+#if IS_ENABLED(CONFIG_TR)
case ARPHRD_IEEE802_TR:
arp->ar_hrd = htons(ARPHRD_IEEE802);
arp->ar_pro = htons(ETH_P_IP);
@@ -1036,7 +1036,7 @@ static int arp_req_set(struct net *net, struct arpreq *r,
return -EINVAL;
}
switch (dev->type) {
-#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE)
+#if IS_ENABLED(CONFIG_FDDI)
case ARPHRD_FDDI:
/*
* According to RFC 1390, FDDI devices should accept ARP
@@ -1282,7 +1282,7 @@ void __init arp_init(void)
}
#ifdef CONFIG_PROC_FS
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+#if IS_ENABLED(CONFIG_AX25)
/* ------------------------------------------------------------------------ */
/*
@@ -1330,7 +1330,7 @@ static void arp_format_neigh_entry(struct seq_file *seq,
read_lock(&n->lock);
/* Convert hardware address to XX:XX:XX:XX ... form. */
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+#if IS_ENABLED(CONFIG_AX25)
if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM)
ax2asc2((ax25_address *)n->ha, hbuffer);
else {
@@ -1343,7 +1343,7 @@ static void arp_format_neigh_entry(struct seq_file *seq,
if (k != 0)
--k;
hbuffer[k] = 0;
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+#if IS_ENABLED(CONFIG_AX25)
}
#endif
sprintf(tbuf, "%pI4", n->primary_key);
--
1.7.5.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox