* [patch net-next 13/19] team: pass NULL to __team_option_inst_add() instead of 0
From: Jiri Pirko @ 2012-06-19 15:54 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, jbrouer
In-Reply-To: <1340121261-2966-1-git-send-email-jpirko@redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index da72f41..eb18ac9 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -164,7 +164,7 @@ static int __team_option_inst_add_option(struct team *team,
int err;
if (!option->per_port) {
- err = __team_option_inst_add(team, option, 0);
+ err = __team_option_inst_add(team, option, NULL);
if (err)
goto inst_del_option;
}
--
1.7.10.2
^ permalink raw reply related
* [patch net-next 14/19] team: add port_[enabled/disabled] mode callbacks
From: Jiri Pirko @ 2012-06-19 15:54 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, jbrouer
In-Reply-To: <1340121261-2966-1-git-send-email-jpirko@redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team.c | 4 ++++
include/linux/if_team.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index eb18ac9..bc76f94 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -714,6 +714,8 @@ static void team_port_enable(struct team *team,
port->index = team->en_port_count++;
hlist_add_head_rcu(&port->hlist,
team_port_index_hash(team, port->index));
+ if (team->ops.port_enabled)
+ team->ops.port_enabled(team, port);
}
static void __reconstruct_port_hlist(struct team *team, int rm_index)
@@ -737,6 +739,8 @@ static void team_port_disable(struct team *team,
if (!team_port_enabled(port))
return;
+ if (team->ops.port_disabled)
+ team->ops.port_disabled(team, port);
hlist_del_rcu(&port->hlist);
__reconstruct_port_hlist(team, rm_index);
team->en_port_count--;
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index 2f29725..c193886 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -74,6 +74,8 @@ struct team_mode_ops {
int (*port_enter)(struct team *team, struct team_port *port);
void (*port_leave)(struct team *team, struct team_port *port);
void (*port_change_mac)(struct team *team, struct team_port *port);
+ void (*port_enabled)(struct team *team, struct team_port *port);
+ void (*port_disabled)(struct team *team, struct team_port *port);
};
enum team_option_type {
--
1.7.10.2
^ permalink raw reply related
* [patch net-next 15/19] team: lb: introduce infrastructure for userspace driven tx loadbalancing
From: Jiri Pirko @ 2012-06-19 15:54 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, jbrouer
In-Reply-To: <1340121261-2966-1-git-send-email-jpirko@redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team_mode_loadbalance.c | 517 +++++++++++++++++++++++++++++-
1 file changed, 500 insertions(+), 17 deletions(-)
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index a475b13..33e30ed 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -17,18 +17,163 @@
#include <linux/filter.h>
#include <linux/if_team.h>
+struct lb_priv;
+
+typedef struct team_port *lb_select_tx_port_func_t(struct team *,
+ struct lb_priv *,
+ struct sk_buff *,
+ unsigned char);
+
+#define LB_TX_HASHTABLE_SIZE 256 /* hash is a char */
+
+struct lb_stats {
+ u64 tx_bytes;
+};
+
+struct lb_pcpu_stats {
+ struct lb_stats hash_stats[LB_TX_HASHTABLE_SIZE];
+ struct u64_stats_sync syncp;
+};
+
+struct lb_stats_info {
+ struct lb_stats stats;
+ struct lb_stats last_stats;
+ struct team_option_inst_info *opt_inst_info;
+};
+
+struct lb_port_mapping {
+ struct team_port __rcu *port;
+ struct team_option_inst_info *opt_inst_info;
+};
+
+struct lb_priv_ex {
+ struct team *team;
+ struct lb_port_mapping tx_hash_to_port_mapping[LB_TX_HASHTABLE_SIZE];
+ struct sock_fprog *orig_fprog;
+ struct {
+ unsigned int refresh_interval; /* in tenths of second */
+ struct delayed_work refresh_dw;
+ struct lb_stats_info info[LB_TX_HASHTABLE_SIZE];
+ } stats;
+};
+
struct lb_priv {
struct sk_filter __rcu *fp;
- struct sock_fprog *orig_fprog;
+ lb_select_tx_port_func_t __rcu *select_tx_port_func;
+ struct lb_pcpu_stats __percpu *pcpu_stats;
+ struct lb_priv_ex *ex; /* priv extension */
};
-static struct lb_priv *lb_priv(struct team *team)
+static struct lb_priv *get_lb_priv(struct team *team)
{
return (struct lb_priv *) &team->mode_priv;
}
-static unsigned char lb_get_skb_hash(struct lb_priv *lb_priv,
- struct sk_buff *skb)
+struct lb_port_priv {
+ struct lb_stats __percpu *pcpu_stats;
+ struct lb_stats_info stats_info;
+};
+
+static struct lb_port_priv *get_lb_port_priv(struct team_port *port)
+{
+ return (struct lb_port_priv *) &port->mode_priv;
+}
+
+#define LB_HTPM_PORT_BY_HASH(lp_priv, hash) \
+ (lb_priv)->ex->tx_hash_to_port_mapping[hash].port
+
+#define LB_HTPM_OPT_INST_INFO_BY_HASH(lp_priv, hash) \
+ (lb_priv)->ex->tx_hash_to_port_mapping[hash].opt_inst_info
+
+static void lb_tx_hash_to_port_mapping_null_port(struct team *team,
+ struct team_port *port)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ bool changed = false;
+ int i;
+
+ for (i = 0; i < LB_TX_HASHTABLE_SIZE; i++) {
+ struct lb_port_mapping *pm;
+
+ pm = &lb_priv->ex->tx_hash_to_port_mapping[i];
+ if (pm->port == port) {
+ rcu_assign_pointer(pm->port, NULL);
+ team_option_inst_set_change(pm->opt_inst_info);
+ changed = true;
+ }
+ }
+ if (changed)
+ team_options_change_check(team);
+}
+
+/* Basic tx selection based solely by hash */
+static struct team_port *lb_hash_select_tx_port(struct team *team,
+ struct lb_priv *lb_priv,
+ struct sk_buff *skb,
+ unsigned char hash)
+{
+ int port_index;
+
+ port_index = hash % team->en_port_count;
+ return team_get_port_by_index_rcu(team, port_index);
+}
+
+/* Hash to port mapping select tx port */
+static struct team_port *lb_htpm_select_tx_port(struct team *team,
+ struct lb_priv *lb_priv,
+ struct sk_buff *skb,
+ unsigned char hash)
+{
+ return rcu_dereference(LB_HTPM_PORT_BY_HASH(lb_priv, hash));
+}
+
+struct lb_select_tx_port {
+ char *name;
+ lb_select_tx_port_func_t *func;
+};
+
+static const struct lb_select_tx_port lb_select_tx_port_list[] = {
+ {
+ .name = "hash",
+ .func = lb_hash_select_tx_port,
+ },
+ {
+ .name = "hash_to_port_mapping",
+ .func = lb_htpm_select_tx_port,
+ },
+};
+#define LB_SELECT_TX_PORT_LIST_COUNT ARRAY_SIZE(lb_select_tx_port_list)
+
+static char *lb_select_tx_port_get_name(lb_select_tx_port_func_t *func)
+{
+ int i;
+
+ for (i = 0; i < LB_SELECT_TX_PORT_LIST_COUNT; i++) {
+ const struct lb_select_tx_port *item;
+
+ item = &lb_select_tx_port_list[i];
+ if (item->func == func)
+ return item->name;
+ }
+ return NULL;
+}
+
+static lb_select_tx_port_func_t *lb_select_tx_port_get_func(const char *name)
+{
+ int i;
+
+ for (i = 0; i < LB_SELECT_TX_PORT_LIST_COUNT; i++) {
+ const struct lb_select_tx_port *item;
+
+ item = &lb_select_tx_port_list[i];
+ if (!strcmp(item->name, name))
+ return item->func;
+ }
+ return NULL;
+}
+
+static unsigned int lb_get_skb_hash(struct lb_priv *lb_priv,
+ struct sk_buff *skb)
{
struct sk_filter *fp;
uint32_t lhash;
@@ -42,18 +187,40 @@ static unsigned char lb_get_skb_hash(struct lb_priv *lb_priv,
return c[0] ^ c[1] ^ c[2] ^ c[3];
}
+static void lb_update_tx_stats(unsigned int tx_bytes, struct lb_priv *lb_priv,
+ struct lb_port_priv *lb_port_priv,
+ unsigned char hash)
+{
+ struct lb_pcpu_stats *pcpu_stats;
+ struct lb_stats *port_stats;
+ struct lb_stats *hash_stats;
+
+ pcpu_stats = this_cpu_ptr(lb_priv->pcpu_stats);
+ port_stats = this_cpu_ptr(lb_port_priv->pcpu_stats);
+ hash_stats = &pcpu_stats->hash_stats[hash];
+ u64_stats_update_begin(&pcpu_stats->syncp);
+ port_stats->tx_bytes += tx_bytes;
+ hash_stats->tx_bytes += tx_bytes;
+ u64_stats_update_end(&pcpu_stats->syncp);
+}
+
static bool lb_transmit(struct team *team, struct sk_buff *skb)
{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ lb_select_tx_port_func_t *select_tx_port_func;
struct team_port *port;
- int port_index;
+ unsigned char hash;
+ unsigned int tx_bytes = skb->len;
- port_index = lb_get_skb_hash(lb_priv(team), skb) % team->en_port_count;
- port = team_get_port_by_index_rcu(team, port_index);
+ hash = lb_get_skb_hash(lb_priv, skb);
+ select_tx_port_func = rcu_dereference(lb_priv->select_tx_port_func);
+ port = select_tx_port_func(team, lb_priv, skb, hash);
if (unlikely(!port))
goto drop;
skb->dev = port->dev;
if (dev_queue_xmit(skb))
return false;
+ lb_update_tx_stats(tx_bytes, lb_priv, get_lb_port_priv(port), hash);
return true;
drop:
@@ -63,14 +230,16 @@ drop:
static int lb_bpf_func_get(struct team *team, struct team_gsetter_ctx *ctx)
{
- if (!lb_priv(team)->orig_fprog) {
+ struct lb_priv *lb_priv = get_lb_priv(team);
+
+ if (!lb_priv->ex->orig_fprog) {
ctx->data.bin_val.len = 0;
ctx->data.bin_val.ptr = NULL;
return 0;
}
- ctx->data.bin_val.len = lb_priv(team)->orig_fprog->len *
+ ctx->data.bin_val.len = lb_priv->ex->orig_fprog->len *
sizeof(struct sock_filter);
- ctx->data.bin_val.ptr = lb_priv(team)->orig_fprog->filter;
+ ctx->data.bin_val.ptr = lb_priv->ex->orig_fprog->filter;
return 0;
}
@@ -103,6 +272,7 @@ static void __fprog_destroy(struct sock_fprog *fprog)
static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
{
+ struct lb_priv *lb_priv = get_lb_priv(team);
struct sk_filter *fp = NULL;
struct sock_fprog *fprog = NULL;
int err;
@@ -119,14 +289,232 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
}
}
- if (lb_priv(team)->orig_fprog) {
+ if (lb_priv->ex->orig_fprog) {
/* Clear old filter data */
- __fprog_destroy(lb_priv(team)->orig_fprog);
- sk_unattached_filter_destroy(lb_priv(team)->fp);
+ __fprog_destroy(lb_priv->ex->orig_fprog);
+ sk_unattached_filter_destroy(lb_priv->fp);
}
- rcu_assign_pointer(lb_priv(team)->fp, fp);
- lb_priv(team)->orig_fprog = fprog;
+ rcu_assign_pointer(lb_priv->fp, fp);
+ lb_priv->ex->orig_fprog = fprog;
+ return 0;
+}
+
+static int lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ char *name;
+
+ name = lb_select_tx_port_get_name(lb_priv->select_tx_port_func);
+ BUG_ON(!name);
+ ctx->data.str_val = name;
+ return 0;
+}
+
+static int lb_tx_method_set(struct team *team, struct team_gsetter_ctx *ctx)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ lb_select_tx_port_func_t *func;
+
+ func = lb_select_tx_port_get_func(ctx->data.str_val);
+ if (!func)
+ return -EINVAL;
+ rcu_assign_pointer(lb_priv->select_tx_port_func, func);
+ return 0;
+}
+
+static int lb_tx_hash_to_port_mapping_init(struct team *team,
+ struct team_option_inst_info *info)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ unsigned char hash = info->array_index;
+
+ LB_HTPM_OPT_INST_INFO_BY_HASH(lb_priv, hash) = info;
+ return 0;
+}
+
+static int lb_tx_hash_to_port_mapping_get(struct team *team,
+ struct team_gsetter_ctx *ctx)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ struct team_port *port;
+ unsigned char hash = ctx->info->array_index;
+
+ port = LB_HTPM_PORT_BY_HASH(lb_priv, hash);
+ ctx->data.u32_val = port ? port->dev->ifindex : 0;
+ return 0;
+}
+
+static int lb_tx_hash_to_port_mapping_set(struct team *team,
+ struct team_gsetter_ctx *ctx)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ struct team_port *port;
+ unsigned char hash = ctx->info->array_index;
+
+ list_for_each_entry(port, &team->port_list, list) {
+ if (ctx->data.u32_val == port->dev->ifindex) {
+ rcu_assign_pointer(LB_HTPM_PORT_BY_HASH(lb_priv, hash),
+ port);
+ return 0;
+ }
+ }
+ return -ENODEV;
+}
+
+static int lb_hash_stats_init(struct team *team,
+ struct team_option_inst_info *info)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ unsigned char hash = info->array_index;
+
+ lb_priv->ex->stats.info[hash].opt_inst_info = info;
+ return 0;
+}
+
+static int lb_hash_stats_get(struct team *team, struct team_gsetter_ctx *ctx)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ unsigned char hash = ctx->info->array_index;
+
+ ctx->data.bin_val.ptr = &lb_priv->ex->stats.info[hash].stats;
+ ctx->data.bin_val.len = sizeof(struct lb_stats);
+ return 0;
+}
+
+static int lb_port_stats_init(struct team *team,
+ struct team_option_inst_info *info)
+{
+ struct team_port *port = info->port;
+ struct lb_port_priv *lb_port_priv = get_lb_port_priv(port);
+
+ lb_port_priv->stats_info.opt_inst_info = info;
+ return 0;
+}
+
+static int lb_port_stats_get(struct team *team, struct team_gsetter_ctx *ctx)
+{
+ struct team_port *port = ctx->info->port;
+ struct lb_port_priv *lb_port_priv = get_lb_port_priv(port);
+
+ ctx->data.bin_val.ptr = &lb_port_priv->stats_info.stats;
+ ctx->data.bin_val.len = sizeof(struct lb_stats);
+ return 0;
+}
+
+static void __lb_stats_info_refresh_prepare(struct lb_stats_info *s_info)
+{
+ memcpy(&s_info->last_stats, &s_info->stats, sizeof(struct lb_stats));
+ memset(&s_info->stats, 0, sizeof(struct lb_stats));
+}
+
+static bool __lb_stats_info_refresh_check(struct lb_stats_info *s_info,
+ struct team *team)
+{
+ if (memcmp(&s_info->last_stats, &s_info->stats,
+ sizeof(struct lb_stats))) {
+ team_option_inst_set_change(s_info->opt_inst_info);
+ return true;
+ }
+ return false;
+}
+
+static void __lb_one_cpu_stats_add(struct lb_stats *acc_stats,
+ struct lb_stats *cpu_stats,
+ struct u64_stats_sync *syncp)
+{
+ unsigned int start;
+ struct lb_stats tmp;
+
+ do {
+ start = u64_stats_fetch_begin_bh(syncp);
+ tmp.tx_bytes = cpu_stats->tx_bytes;
+ } while (u64_stats_fetch_retry_bh(syncp, start));
+ acc_stats->tx_bytes += tmp.tx_bytes;
+}
+
+static void lb_stats_refresh(struct work_struct *work)
+{
+ struct team *team;
+ struct lb_priv *lb_priv;
+ struct lb_priv_ex *lb_priv_ex;
+ struct lb_pcpu_stats *pcpu_stats;
+ struct lb_stats *stats;
+ struct lb_stats_info *s_info;
+ struct team_port *port;
+ bool changed = false;
+ int i;
+ int j;
+
+ lb_priv_ex = container_of(work, struct lb_priv_ex,
+ stats.refresh_dw.work);
+
+ team = lb_priv_ex->team;
+ lb_priv = get_lb_priv(team);
+
+ if (!mutex_trylock(&team->lock)) {
+ schedule_delayed_work(&lb_priv_ex->stats.refresh_dw, 0);
+ return;
+ }
+
+ for (j = 0; j < LB_TX_HASHTABLE_SIZE; j++) {
+ s_info = &lb_priv->ex->stats.info[j];
+ __lb_stats_info_refresh_prepare(s_info);
+ for_each_possible_cpu(i) {
+ pcpu_stats = per_cpu_ptr(lb_priv->pcpu_stats, i);
+ stats = &pcpu_stats->hash_stats[j];
+ __lb_one_cpu_stats_add(&s_info->stats, stats,
+ &pcpu_stats->syncp);
+ }
+ changed |= __lb_stats_info_refresh_check(s_info, team);
+ }
+
+ list_for_each_entry(port, &team->port_list, list) {
+ struct lb_port_priv *lb_port_priv = get_lb_port_priv(port);
+
+ s_info = &lb_port_priv->stats_info;
+ __lb_stats_info_refresh_prepare(s_info);
+ for_each_possible_cpu(i) {
+ pcpu_stats = per_cpu_ptr(lb_priv->pcpu_stats, i);
+ stats = per_cpu_ptr(lb_port_priv->pcpu_stats, i);
+ __lb_one_cpu_stats_add(&s_info->stats, stats,
+ &pcpu_stats->syncp);
+ }
+ changed |= __lb_stats_info_refresh_check(s_info, team);
+ }
+
+ if (changed)
+ team_options_change_check(team);
+
+ schedule_delayed_work(&lb_priv_ex->stats.refresh_dw,
+ (lb_priv_ex->stats.refresh_interval * HZ) / 10);
+
+ mutex_unlock(&team->lock);
+}
+
+static int lb_stats_refresh_interval_get(struct team *team,
+ struct team_gsetter_ctx *ctx)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+
+ ctx->data.u32_val = lb_priv->ex->stats.refresh_interval;
+ return 0;
+}
+
+static int lb_stats_refresh_interval_set(struct team *team,
+ struct team_gsetter_ctx *ctx)
+{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ unsigned int interval;
+
+ interval = ctx->data.u32_val;
+ if (lb_priv->ex->stats.refresh_interval == interval)
+ return 0;
+ lb_priv->ex->stats.refresh_interval = interval;
+ if (interval)
+ schedule_delayed_work(&lb_priv->ex->stats.refresh_dw, 0);
+ else
+ cancel_delayed_work(&lb_priv->ex->stats.refresh_dw);
return 0;
}
@@ -137,23 +525,117 @@ static const struct team_option lb_options[] = {
.getter = lb_bpf_func_get,
.setter = lb_bpf_func_set,
},
+ {
+ .name = "lb_tx_method",
+ .type = TEAM_OPTION_TYPE_STRING,
+ .getter = lb_tx_method_get,
+ .setter = lb_tx_method_set,
+ },
+ {
+ .name = "lb_tx_hash_to_port_mapping",
+ .array_size = LB_TX_HASHTABLE_SIZE,
+ .type = TEAM_OPTION_TYPE_U32,
+ .init = lb_tx_hash_to_port_mapping_init,
+ .getter = lb_tx_hash_to_port_mapping_get,
+ .setter = lb_tx_hash_to_port_mapping_set,
+ },
+ {
+ .name = "lb_hash_stats",
+ .array_size = LB_TX_HASHTABLE_SIZE,
+ .type = TEAM_OPTION_TYPE_BINARY,
+ .init = lb_hash_stats_init,
+ .getter = lb_hash_stats_get,
+ },
+ {
+ .name = "lb_port_stats",
+ .per_port = true,
+ .type = TEAM_OPTION_TYPE_BINARY,
+ .init = lb_port_stats_init,
+ .getter = lb_port_stats_get,
+ },
+ {
+ .name = "lb_stats_refresh_interval",
+ .type = TEAM_OPTION_TYPE_U32,
+ .getter = lb_stats_refresh_interval_get,
+ .setter = lb_stats_refresh_interval_set,
+ },
};
static int lb_init(struct team *team)
{
- return team_options_register(team, lb_options,
- ARRAY_SIZE(lb_options));
+ struct lb_priv *lb_priv = get_lb_priv(team);
+ lb_select_tx_port_func_t *func;
+ int err;
+
+ /* set default tx port selector */
+ func = lb_select_tx_port_get_func("hash");
+ BUG_ON(!func);
+ rcu_assign_pointer(lb_priv->select_tx_port_func, func);
+
+ lb_priv->ex = kzalloc(sizeof(*lb_priv->ex), GFP_KERNEL);
+ if (!lb_priv->ex)
+ return -ENOMEM;
+ lb_priv->ex->team = team;
+
+ lb_priv->pcpu_stats = alloc_percpu(struct lb_pcpu_stats);
+ if (!lb_priv->pcpu_stats) {
+ err = -ENOMEM;
+ goto err_alloc_pcpu_stats;
+ }
+
+ INIT_DELAYED_WORK(&lb_priv->ex->stats.refresh_dw, lb_stats_refresh);
+
+ err = team_options_register(team, lb_options, ARRAY_SIZE(lb_options));
+ if (err)
+ goto err_options_register;
+ return 0;
+
+err_options_register:
+ free_percpu(lb_priv->pcpu_stats);
+err_alloc_pcpu_stats:
+ kfree(lb_priv->ex);
+ return err;
}
static void lb_exit(struct team *team)
{
+ struct lb_priv *lb_priv = get_lb_priv(team);
+
team_options_unregister(team, lb_options,
ARRAY_SIZE(lb_options));
+ cancel_delayed_work_sync(&lb_priv->ex->stats.refresh_dw);
+ free_percpu(lb_priv->pcpu_stats);
+ kfree(lb_priv->ex);
+}
+
+static int lb_port_enter(struct team *team, struct team_port *port)
+{
+ struct lb_port_priv *lb_port_priv = get_lb_port_priv(port);
+
+ lb_port_priv->pcpu_stats = alloc_percpu(struct lb_stats);
+ if (!lb_port_priv->pcpu_stats)
+ return -ENOMEM;
+ return 0;
+}
+
+static void lb_port_leave(struct team *team, struct team_port *port)
+{
+ struct lb_port_priv *lb_port_priv = get_lb_port_priv(port);
+
+ free_percpu(lb_port_priv->pcpu_stats);
+}
+
+static void lb_port_disabled(struct team *team, struct team_port *port)
+{
+ lb_tx_hash_to_port_mapping_null_port(team, port);
}
static const struct team_mode_ops lb_mode_ops = {
.init = lb_init,
.exit = lb_exit,
+ .port_enter = lb_port_enter,
+ .port_leave = lb_port_leave,
+ .port_disabled = lb_port_disabled,
.transmit = lb_transmit,
};
@@ -161,6 +643,7 @@ static const struct team_mode lb_mode = {
.kind = "loadbalance",
.owner = THIS_MODULE,
.priv_size = sizeof(struct lb_priv),
+ .port_priv_size = sizeof(struct lb_port_priv),
.ops = &lb_mode_ops,
};
--
1.7.10.2
^ permalink raw reply related
* [patch net-next 16/19] team: implement multipart netlink messages for options transfers
From: Jiri Pirko @ 2012-06-19 15:54 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, jbrouer
In-Reply-To: <1340121261-2966-1-git-send-email-jpirko@redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team.c | 198 +++++++++++++++++++++++++++--------------------
1 file changed, 116 insertions(+), 82 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index bc76f94..9e9d3e5 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1571,102 +1571,128 @@ err_fill:
return err;
}
+typedef int team_nl_send_func_t(struct sk_buff *skb,
+ struct team *team, u32 pid);
+
+static int team_nl_send_unicast(struct sk_buff *skb, struct team *team, u32 pid)
+{
+ return genlmsg_unicast(dev_net(team->dev), skb, pid);
+}
+
static int team_nl_fill_one_option_get(struct sk_buff *skb, struct team *team,
struct team_option_inst *opt_inst)
{
struct nlattr *option_item;
struct team_option *option = opt_inst->option;
- struct team_option_inst_info *opt_inst_info;
+ struct team_option_inst_info *opt_inst_info = &opt_inst->info;
struct team_gsetter_ctx ctx;
int err;
+ ctx.info = opt_inst_info;
+ err = team_option_get(team, opt_inst, &ctx);
+ if (err)
+ return err;
+
option_item = nla_nest_start(skb, TEAM_ATTR_ITEM_OPTION);
if (!option_item)
- goto nla_put_failure;
- if (nla_put_string(skb, TEAM_ATTR_OPTION_NAME, option->name))
- goto nla_put_failure;
- if (opt_inst->changed) {
- if (nla_put_flag(skb, TEAM_ATTR_OPTION_CHANGED))
- goto nla_put_failure;
- opt_inst->changed = false;
- }
- if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED))
- goto nla_put_failure;
+ return -EMSGSIZE;
- opt_inst_info = &opt_inst->info;
+ if (nla_put_string(skb, TEAM_ATTR_OPTION_NAME, option->name))
+ goto nest_cancel;
if (opt_inst_info->port &&
nla_put_u32(skb, TEAM_ATTR_OPTION_PORT_IFINDEX,
opt_inst_info->port->dev->ifindex))
- goto nla_put_failure;
+ goto nest_cancel;
if (opt_inst->option->array_size &&
nla_put_u32(skb, TEAM_ATTR_OPTION_ARRAY_INDEX,
opt_inst_info->array_index))
- goto nla_put_failure;
- ctx.info = opt_inst_info;
+ goto nest_cancel;
switch (option->type) {
case TEAM_OPTION_TYPE_U32:
if (nla_put_u8(skb, TEAM_ATTR_OPTION_TYPE, NLA_U32))
- goto nla_put_failure;
- err = team_option_get(team, opt_inst, &ctx);
- if (err)
- goto errout;
+ goto nest_cancel;
if (nla_put_u32(skb, TEAM_ATTR_OPTION_DATA, ctx.data.u32_val))
- goto nla_put_failure;
+ goto nest_cancel;
break;
case TEAM_OPTION_TYPE_STRING:
if (nla_put_u8(skb, TEAM_ATTR_OPTION_TYPE, NLA_STRING))
- goto nla_put_failure;
- err = team_option_get(team, opt_inst, &ctx);
- if (err)
- goto errout;
+ goto nest_cancel;
if (nla_put_string(skb, TEAM_ATTR_OPTION_DATA,
ctx.data.str_val))
- goto nla_put_failure;
+ goto nest_cancel;
break;
case TEAM_OPTION_TYPE_BINARY:
if (nla_put_u8(skb, TEAM_ATTR_OPTION_TYPE, NLA_BINARY))
- goto nla_put_failure;
- err = team_option_get(team, opt_inst, &ctx);
- if (err)
- goto errout;
+ goto nest_cancel;
if (nla_put(skb, TEAM_ATTR_OPTION_DATA, ctx.data.bin_val.len,
ctx.data.bin_val.ptr))
- goto nla_put_failure;
+ goto nest_cancel;
break;
case TEAM_OPTION_TYPE_BOOL:
if (nla_put_u8(skb, TEAM_ATTR_OPTION_TYPE, NLA_FLAG))
- goto nla_put_failure;
- err = team_option_get(team, opt_inst, &ctx);
- if (err)
- goto errout;
+ goto nest_cancel;
if (ctx.data.bool_val &&
nla_put_flag(skb, TEAM_ATTR_OPTION_DATA))
- goto nla_put_failure;
+ goto nest_cancel;
break;
default:
BUG();
}
+ if (opt_inst->removed && nla_put_flag(skb, TEAM_ATTR_OPTION_REMOVED))
+ goto nest_cancel;
+ if (opt_inst->changed) {
+ if (nla_put_flag(skb, TEAM_ATTR_OPTION_CHANGED))
+ goto nest_cancel;
+ opt_inst->changed = false;
+ }
nla_nest_end(skb, option_item);
return 0;
-nla_put_failure:
- err = -EMSGSIZE;
-errout:
- return err;
+nest_cancel:
+ nla_nest_cancel(skb, option_item);
+ return -EMSGSIZE;
+}
+
+static int __send_and_alloc_skb(struct sk_buff **pskb,
+ struct team *team, u32 pid,
+ team_nl_send_func_t *send_func)
+{
+ int err;
+
+ if (*pskb) {
+ err = send_func(*pskb, team, pid);
+ if (err)
+ return err;
+ }
+ *pskb = genlmsg_new(NLMSG_DEFAULT_SIZE - GENL_HDRLEN, GFP_KERNEL);
+ if (!*pskb)
+ return -ENOMEM;
+ return 0;
}
-static int team_nl_fill_options_get(struct sk_buff *skb,
- u32 pid, u32 seq, int flags,
- struct team *team,
+static int team_nl_send_options_get(struct team *team, u32 pid, u32 seq,
+ int flags, team_nl_send_func_t *send_func,
struct list_head *sel_opt_inst_list)
{
struct nlattr *option_list;
+ struct nlmsghdr *nlh;
void *hdr;
struct team_option_inst *opt_inst;
int err;
+ struct sk_buff *skb = NULL;
+ bool incomplete;
+ int i;
- hdr = genlmsg_put(skb, pid, seq, &team_nl_family, flags,
+ opt_inst = list_first_entry(sel_opt_inst_list,
+ struct team_option_inst, tmp_list);
+
+start_again:
+ err = __send_and_alloc_skb(&skb, team, pid, send_func);
+ if (err)
+ return err;
+
+ hdr = genlmsg_put(skb, pid, seq, &team_nl_family, flags | NLM_F_MULTI,
TEAM_CMD_OPTIONS_GET);
if (IS_ERR(hdr))
return PTR_ERR(hdr);
@@ -1677,46 +1703,62 @@ static int team_nl_fill_options_get(struct sk_buff *skb,
if (!option_list)
goto nla_put_failure;
- list_for_each_entry(opt_inst, sel_opt_inst_list, tmp_list) {
+ i = 0;
+ incomplete = false;
+ list_for_each_entry_from(opt_inst, sel_opt_inst_list, tmp_list) {
err = team_nl_fill_one_option_get(skb, team, opt_inst);
- if (err)
+ if (err) {
+ if (err == -EMSGSIZE) {
+ if (!i)
+ goto errout;
+ incomplete = true;
+ break;
+ }
goto errout;
+ }
+ i++;
}
nla_nest_end(skb, option_list);
- return genlmsg_end(skb, hdr);
+ genlmsg_end(skb, hdr);
+ if (incomplete)
+ goto start_again;
+
+send_done:
+ nlh = nlmsg_put(skb, pid, seq, NLMSG_DONE, 0, flags | NLM_F_MULTI);
+ if (!nlh) {
+ err = __send_and_alloc_skb(&skb, team, pid, send_func);
+ if (err)
+ goto errout;
+ goto send_done;
+ }
+
+ return send_func(skb, team, pid);
nla_put_failure:
err = -EMSGSIZE;
errout:
genlmsg_cancel(skb, hdr);
+ nlmsg_free(skb);
return err;
}
-static int team_nl_fill_options_get_all(struct sk_buff *skb,
- struct genl_info *info, int flags,
- struct team *team)
-{
- struct team_option_inst *opt_inst;
- LIST_HEAD(sel_opt_inst_list);
-
- list_for_each_entry(opt_inst, &team->option_inst_list, list)
- list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list);
- return team_nl_fill_options_get(skb, info->snd_pid,
- info->snd_seq, NLM_F_ACK,
- team, &sel_opt_inst_list);
-}
-
static int team_nl_cmd_options_get(struct sk_buff *skb, struct genl_info *info)
{
struct team *team;
+ struct team_option_inst *opt_inst;
int err;
+ LIST_HEAD(sel_opt_inst_list);
team = team_nl_team_get(info);
if (!team)
return -EINVAL;
- err = team_nl_send_generic(info, team, team_nl_fill_options_get_all);
+ list_for_each_entry(opt_inst, &team->option_inst_list, list)
+ list_add_tail(&opt_inst->tmp_list, &sel_opt_inst_list);
+ err = team_nl_send_options_get(team, info->snd_pid, info->snd_seq,
+ NLM_F_ACK, team_nl_send_unicast,
+ &sel_opt_inst_list);
team_nl_team_put(team);
@@ -1963,28 +2005,18 @@ static struct genl_multicast_group team_change_event_mcgrp = {
.name = TEAM_GENL_CHANGE_EVENT_MC_GRP_NAME,
};
+static int team_nl_send_multicast(struct sk_buff *skb,
+ struct team *team, u32 pid)
+{
+ return genlmsg_multicast_netns(dev_net(team->dev), skb, 0,
+ team_change_event_mcgrp.id, GFP_KERNEL);
+}
+
static int team_nl_send_event_options_get(struct team *team,
struct list_head *sel_opt_inst_list)
{
- struct sk_buff *skb;
- int err;
- struct net *net = dev_net(team->dev);
-
- skb = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
- if (!skb)
- return -ENOMEM;
-
- err = team_nl_fill_options_get(skb, 0, 0, 0, team, sel_opt_inst_list);
- if (err < 0)
- goto err_fill;
-
- err = genlmsg_multicast_netns(net, skb, 0, team_change_event_mcgrp.id,
- GFP_KERNEL);
- return err;
-
-err_fill:
- nlmsg_free(skb);
- return err;
+ return team_nl_send_options_get(team, 0, 0, 0, team_nl_send_multicast,
+ sel_opt_inst_list);
}
static int team_nl_send_event_port_list_get(struct team *team)
@@ -2053,7 +2085,8 @@ static void __team_options_change_check(struct team *team)
}
err = team_nl_send_event_options_get(team, &sel_opt_inst_list);
if (err)
- netdev_warn(team->dev, "Failed to send options change via netlink\n");
+ netdev_warn(team->dev, "Failed to send options change via netlink (err %d)\n",
+ err);
}
static void __team_option_inst_change(struct team *team,
@@ -2066,7 +2099,8 @@ static void __team_option_inst_change(struct team *team,
list_add(&sel_opt_inst->tmp_list, &sel_opt_inst_list);
err = team_nl_send_event_options_get(team, &sel_opt_inst_list);
if (err)
- netdev_warn(team->dev, "Failed to send option change via netlink\n");
+ netdev_warn(team->dev, "Failed to send option change via netlink (err %d)\n",
+ err);
}
/* rtnl lock is held */
--
1.7.10.2
^ permalink raw reply related
* [patch net-next 17/19] team: ensure correct order of netlink messages delivery
From: Jiri Pirko @ 2012-06-19 15:54 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, jbrouer
In-Reply-To: <1340121261-2966-1-git-send-email-jpirko@redhat.com>
currently, when port is created and per-port options are present, there
options are sent to userspace with ifindex of port which userspace does
not know about. Port add message goes right after.
This patch corrects message ordering so userspace would not be confused.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team.c | 25 +++++--------------------
1 file changed, 5 insertions(+), 20 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 9e9d3e5..a7b391d 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -347,24 +347,6 @@ void team_options_unregister(struct team *team,
}
EXPORT_SYMBOL(team_options_unregister);
-static int team_option_port_add(struct team *team, struct team_port *port)
-{
- int err;
-
- err = __team_option_inst_add_port(team, port);
- if (err)
- return err;
- __team_options_change_check(team);
- return 0;
-}
-
-static void team_option_port_del(struct team *team, struct team_port *port)
-{
- __team_option_inst_mark_removed_port(team, port);
- __team_options_change_check(team);
- __team_option_inst_del_port(team, port);
-}
-
static int team_option_get(struct team *team,
struct team_option_inst *opt_inst,
struct team_gsetter_ctx *ctx)
@@ -891,7 +873,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
goto err_handler_register;
}
- err = team_option_port_add(team, port);
+ err = __team_option_inst_add_port(team, port);
if (err) {
netdev_err(dev, "Device %s failed to add per-port options\n",
portname);
@@ -904,6 +886,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
team_adjust_ops(team);
__team_compute_features(team);
__team_port_change_check(port, !!netif_carrier_ok(port_dev));
+ __team_options_change_check(team);
netdev_info(dev, "Port device %s added\n", portname);
@@ -947,12 +930,14 @@ static int team_port_del(struct team *team, struct net_device *port_dev)
return -ENOENT;
}
+ __team_option_inst_mark_removed_port(team, port);
+ __team_options_change_check(team);
+ __team_option_inst_del_port(team, port);
port->removed = true;
__team_port_change_check(port, false);
team_port_disable(team, port);
list_del_rcu(&port->list);
team_adjust_ops(team);
- team_option_port_del(team, port);
netdev_rx_handler_unregister(port_dev);
netdev_set_master(port_dev, NULL);
vlan_vids_del_by_dev(port_dev, dev);
--
1.7.10.2
^ permalink raw reply related
* [patch net-next 18/19] team: allow to send multiple set events in one message
From: Jiri Pirko @ 2012-06-19 15:54 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, jbrouer
In-Reply-To: <1340121261-2966-1-git-send-email-jpirko@redhat.com>
When multiple sets are done, event message is generated for each. This
patch accumulates these messages into one.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team.c | 33 +++++++++------------------------
1 file changed, 9 insertions(+), 24 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index a7b391d..3a4a74b 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -320,8 +320,6 @@ static void __team_options_unregister(struct team *team,
}
static void __team_options_change_check(struct team *team);
-static void __team_option_inst_change(struct team *team,
- struct team_option_inst *opt_inst);
int team_options_register(struct team *team,
const struct team_option *option,
@@ -360,16 +358,9 @@ static int team_option_set(struct team *team,
struct team_option_inst *opt_inst,
struct team_gsetter_ctx *ctx)
{
- int err;
-
if (!opt_inst->option->setter)
return -EOPNOTSUPP;
- err = opt_inst->option->setter(team, ctx);
- if (err)
- return err;
-
- __team_option_inst_change(team, opt_inst);
- return err;
+ return opt_inst->option->setter(team, ctx);
}
void team_option_inst_set_change(struct team_option_inst_info *opt_inst_info)
@@ -1750,12 +1741,16 @@ static int team_nl_cmd_options_get(struct sk_buff *skb, struct genl_info *info)
return err;
}
+static int team_nl_send_event_options_get(struct team *team,
+ struct list_head *sel_opt_inst_list);
+
static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
{
struct team *team;
int err = 0;
int i;
struct nlattr *nl_option;
+ LIST_HEAD(opt_inst_list);
team = team_nl_team_get(info);
if (!team)
@@ -1867,6 +1862,8 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
err = team_option_set(team, opt_inst, &ctx);
if (err)
goto team_put;
+ opt_inst->changed = true;
+ list_add(&opt_inst->tmp_list, &opt_inst_list);
}
if (!opt_found) {
err = -ENOENT;
@@ -1874,6 +1871,8 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
}
}
+ err = team_nl_send_event_options_get(team, &opt_inst_list);
+
team_put:
team_nl_team_put(team);
@@ -2074,20 +2073,6 @@ static void __team_options_change_check(struct team *team)
err);
}
-static void __team_option_inst_change(struct team *team,
- struct team_option_inst *sel_opt_inst)
-{
- int err;
- LIST_HEAD(sel_opt_inst_list);
-
- sel_opt_inst->changed = true;
- list_add(&sel_opt_inst->tmp_list, &sel_opt_inst_list);
- err = team_nl_send_event_options_get(team, &sel_opt_inst_list);
- if (err)
- netdev_warn(team->dev, "Failed to send option change via netlink (err %d)\n",
- err);
-}
-
/* rtnl lock is held */
static void __team_port_change_check(struct team_port *port, bool linkup)
{
--
1.7.10.2
^ permalink raw reply related
* Re: [RFC net-next 07/14] Fix intel/ixgbe
From: Alexander Duyck @ 2012-06-19 15:54 UTC (permalink / raw)
To: Yuval Mintz; +Cc: netdev, davem, eilong, Jeff Kirsher
In-Reply-To: <1340118848-30978-8-git-send-email-yuvalmin@broadcom.com>
On 06/19/2012 08:14 AM, Yuval Mintz wrote:
> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> index af1a531..21e4513 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> @@ -802,7 +802,8 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
> * The default is to use pairs of vectors.
> */
> v_budget = max(adapter->num_rx_queues, adapter->num_tx_queues);
> - v_budget = min_t(int, v_budget, num_online_cpus());
> + v_budget = min_t(int, v_budget, min_t(int, num_online_cpus(),
> + DEFAULT_MAX_NUM_RSS_QUEUES));
> v_budget += NON_Q_VECTORS;
>
> /*
This patch doesn't limit the number of queues. It is limiting the
number of interrupts. The two are not directly related as we can
support multiple queues per interrupt.
Also this change assumes we are only using receive side scaling. We
have other features such as DCB, FCoE, and Flow Director which require
additional queues.
Thanks,
Alex
^ permalink raw reply
* [patch net-next 19/19] team: use rcu_dereference_bh() in tx path
From: Jiri Pirko @ 2012-06-19 15:54 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet, jbrouer
In-Reply-To: <1340121261-2966-1-git-send-email-jpirko@redhat.com>
Should be used instead of rcu_dereference, since rcu_read_lock_bh is
held.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/team/team_mode_activebackup.c | 2 +-
drivers/net/team/team_mode_loadbalance.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/team/team_mode_activebackup.c b/drivers/net/team/team_mode_activebackup.c
index bcc7d6d..2fe02a8 100644
--- a/drivers/net/team/team_mode_activebackup.c
+++ b/drivers/net/team/team_mode_activebackup.c
@@ -40,7 +40,7 @@ static bool ab_transmit(struct team *team, struct sk_buff *skb)
{
struct team_port *active_port;
- active_port = rcu_dereference(ab_priv(team)->active_port);
+ active_port = rcu_dereference_bh(ab_priv(team)->active_port);
if (unlikely(!active_port))
goto drop;
skb->dev = active_port->dev;
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index 33e30ed..45cc095 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -124,7 +124,7 @@ static struct team_port *lb_htpm_select_tx_port(struct team *team,
struct sk_buff *skb,
unsigned char hash)
{
- return rcu_dereference(LB_HTPM_PORT_BY_HASH(lb_priv, hash));
+ return rcu_dereference_bh(LB_HTPM_PORT_BY_HASH(lb_priv, hash));
}
struct lb_select_tx_port {
@@ -179,7 +179,7 @@ static unsigned int lb_get_skb_hash(struct lb_priv *lb_priv,
uint32_t lhash;
unsigned char *c;
- fp = rcu_dereference(lb_priv->fp);
+ fp = rcu_dereference_bh(lb_priv->fp);
if (unlikely(!fp))
return 0;
lhash = SK_RUN_FILTER(fp, skb);
@@ -213,7 +213,7 @@ static bool lb_transmit(struct team *team, struct sk_buff *skb)
unsigned int tx_bytes = skb->len;
hash = lb_get_skb_hash(lb_priv, skb);
- select_tx_port_func = rcu_dereference(lb_priv->select_tx_port_func);
+ select_tx_port_func = rcu_dereference_bh(lb_priv->select_tx_port_func);
port = select_tx_port_func(team, lb_priv, skb, hash);
if (unlikely(!port))
goto drop;
--
1.7.10.2
^ permalink raw reply related
* Re: [RFC net-next 05/14] Fix intel/ixgbevf
From: Eilon Greenstein @ 2012-06-19 16:06 UTC (permalink / raw)
To: Alexander Duyck; +Cc: Yuval Mintz, netdev, davem, Jeff Kirsher
In-Reply-To: <4FE09D3F.4060305@intel.com>
On Tue, 2012-06-19 at 08:39 -0700, Alexander Duyck wrote:
> On 06/19/2012 08:13 AM, Yuval Mintz wrote:
> > Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> >
> > Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > ---
> > drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 5 +++--
> > 1 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> > index f69ec42..3ad46c2 100644
> > --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> > +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> > @@ -2014,7 +2014,7 @@ err_tx_ring_allocation:
> > static int ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter)
> > {
> > int err = 0;
> > - int vector, v_budget;
> > + int vector, v_budget, ncpu;
> >
> > /*
> > * It's easy to be greedy for MSI-X vectors, but it really
> > @@ -2022,8 +2022,9 @@ static int ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter)
> > * than CPU's. So let's be conservative and only ask for
> > * (roughly) twice the number of vectors as there are CPU's.
> > */
> > + ncpu = min_t(int, num_online_cpus(), DEFAULT_MAX_NUM_RSS_QUEUES);
> > v_budget = min(adapter->num_rx_queues + adapter->num_tx_queues,
> > - (int)(num_online_cpus() * 2)) + NON_Q_VECTORS;
> > + ncpu * 2) + NON_Q_VECTORS;
> >
> > /* A failure in MSI-X entry allocation isn't fatal, but it does
> > * mean we disable MSI-X capabilities of the adapter. */
> This change is pointless on the ixgbevf driver. The VF hardware can
> support at most 4 RSS queues. As such num_rx_queues + num_tx_queues
> will never exceed 8 so you are essentially adding a necessary min(x,8).
It is pointless with the current value, but if someone will edit the
kernel source code and replace the 8 with a 2, it will become
meaningful. The compiler will optimize this part, and I think that for
completion, it is best to keep this reference so a future default number
change will not be missed.
Eilon
^ permalink raw reply
* Re: [RFC net-next 06/14] Fix intel/igb
From: Eilon Greenstein @ 2012-06-19 16:07 UTC (permalink / raw)
To: Alexander Duyck
Cc: Yuval Mintz, netdev, davem, Jeff Kirsher, Wyborny, Carolyn
In-Reply-To: <4FE09DFF.704@intel.com>
On Tue, 2012-06-19 at 08:42 -0700, Alexander Duyck wrote:
> On 06/19/2012 08:14 AM, Yuval Mintz wrote:
> > Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> >
> > Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > ---
> > drivers/net/ethernet/intel/igb/igb_main.c | 14 ++++++++------
> > 1 files changed, 8 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
> > index dd3bfe8..8e7ade5 100644
> > --- a/drivers/net/ethernet/intel/igb/igb_main.c
> > +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> > @@ -2380,18 +2380,20 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
> > #endif /* CONFIG_PCI_IOV */
> > switch (hw->mac.type) {
> > case e1000_i210:
> > - adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES_I210,
> > - num_online_cpus());
> > + adapter->rss_queues = IGB_MAX_RX_QUEUES_I210;
> > break;
> > case e1000_i211:
> > - adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES_I211,
> > - num_online_cpus());
> > + adapter->rss_queues = IGB_MAX_RX_QUEUES_I211;
> > break;
> > default:
> > - adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES,
> > - num_online_cpus());
> > + adapter->rss_queues = IGB_MAX_RX_QUEUES;
> > break;
> > }
> > +
> > + adapter->rss_queues = min_t(u32, adapter->rss_queues,
> > + min_t(u32, num_online_cpus(),
> > + DEFAULT_MAX_NUM_RSS_QUEUES));
> > +
> > /* i350 cannot do RSS and SR-IOV at the same time */
> > if (hw->mac.type == e1000_i350 && adapter->vfs_allocated_count)
> > adapter->rss_queues = 1;
> Same issue here as ixgbevf, only we support a max of 8 Rx queues in the
> hardware. So now you are once again adding another unnecessary limit on
> something that is already limited to 8 or less.
>
Same issue and same reply :)
It is here to support a change of the DEFAULT_MAX_NUM_RSS_QUEUES macro.
Eilon
^ permalink raw reply
* Re: [RFC net-next 07/14] Fix intel/ixgbe
From: Eilon Greenstein @ 2012-06-19 16:11 UTC (permalink / raw)
To: Alexander Duyck; +Cc: Yuval Mintz, netdev, davem, Jeff Kirsher
In-Reply-To: <4FE0A0CD.5050909@intel.com>
On Tue, 2012-06-19 at 08:54 -0700, Alexander Duyck wrote:
> On 06/19/2012 08:14 AM, Yuval Mintz wrote:
> > Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> >
> > Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > ---
> > drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> > index af1a531..21e4513 100644
> > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
> > @@ -802,7 +802,8 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
> > * The default is to use pairs of vectors.
> > */
> > v_budget = max(adapter->num_rx_queues, adapter->num_tx_queues);
> > - v_budget = min_t(int, v_budget, num_online_cpus());
> > + v_budget = min_t(int, v_budget, min_t(int, num_online_cpus(),
> > + DEFAULT_MAX_NUM_RSS_QUEUES));
> > v_budget += NON_Q_VECTORS;
> >
> > /*
> This patch doesn't limit the number of queues. It is limiting the
> number of interrupts. The two are not directly related as we can
> support multiple queues per interrupt.
>
> Also this change assumes we are only using receive side scaling. We
> have other features such as DCB, FCoE, and Flow Director which require
> additional queues.
You are right - but DEFAULT_MAX_NUM_RSS_QUEUES is there to limit the RSS
and not everything else. It is harder to determine what else should be
set to a lower value and the two goals were to limit the memory waste in
correlation to the number of CPUs and to have some unification between
the drivers - both goals are applicable mostly to the RSS and not so
much to DCB, FCoE and similar features.
Thanks,
Eilon
^ permalink raw reply
* Re: [RFC] TCP: Support configurable delayed-ack parameters.
From: Ben Greear @ 2012-06-19 16:11 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, Daniel Baluta, David Miller
In-Reply-To: <1340082688.7491.2299.camel@edumazet-glaptop>
On 06/18/2012 10:11 PM, Eric Dumazet wrote:
> On Mon, 2012-06-18 at 17:52 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> RFC2581 ($4.2) specifies when an ACK should be generated as follows:
>>
>> " .. an ACK SHOULD be generated for at least every second
>> full-sized segment, and MUST be generated within 500 ms
>> of the arrival of the first unacknowledged packet.
>> "
>>
>> We export the number of segments and the timeout limits
>> specified above, so that a user can tune them according
>> to their needs.
>>
>> Specifically:
>> * /proc/sys/net/ipv4/tcp_default_delack_segs, represents
>> the threshold for the number of segments.
>> * /proc/sys/net/ipv4/tcp_default_delack_min, specifies
>> the minimum timeout value
>> * /proc/sys/net/ipv4/tcp_default_delack_max, specifies
>> the maximum timeout value.
>>
>> In addition, new TCP socket options are added to allow
>> per-socket configuration:
>>
>> TCP_DELACK_SEGS
>> TCP_DELACK_MIN
>> TCP_DELACK_MAX
>>
>> In order to keep a multiply out of the hot path, the segs * mss
>> computation is recalculated and cached whenever segs or mss changes.
>>
>
> I know David was worried about this multiply, but current cpus do a
> multiply in at most 3 cycles.
>
> Addding an u32 field in socket structure adds 1/16 of a cache line, and
> adds more penalty.
>
> Avoiding to build/send an ACK packet can save us so many cpu cycles that
> the multiply is pure noise.
Dave..any opinion on this? I'll be happy to get rid of the
multiply caching if it's agreed that it should not be there.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [RFC net-next 00/14] default maximal number of RSS queues in mq drivers
From: Eilon Greenstein @ 2012-06-19 16:17 UTC (permalink / raw)
To: Yuval Mintz, netdev, davem, Or Gerlitz, Divy Le Ray,
Jitendra Kalsaria, Ron Mercer, Anirban Chakraborty, Jeff Kirsher,
Jon Mason, Andrew Gallatin, Jon Mason, Subbu Seetharaman,
Sathya Perla, Matt Carlson, Ajit Khaparde, Michael Chan
In-Reply-To: <1340118848-30978-1-git-send-email-yuvalmin@broadcom.com>
On Tue, 2012-06-19 at 18:13 +0300, Yuval Mintz wrote:
> Different vendors support different number of RSS queues by default. Today,
> there exists an ethtool API through which users can change the number of
> channels their driver supports; This enables us to pursue the goal of using
> a default number of RSS queues in various multi-queue drivers.
>
> This RFC intendeds to achieve the above default, by upper-limiting the number
> of interrupts multi-queue drivers request (by default, not via the new API)
> with correlation to the number of cpus on the machine.
>
> After examining multi-queue drivers that call alloc_etherdev_mq[s],
> it became evident that most drivers allocate their devices using hard-coded
> values. Changing those defaults directly will most likely cause a regression.
>
> However, (most) multi-queue driver look at the number of online cpus when
> requesting for interrupts. We assume that the number of interrupts the
> driver manages to request is propagated across the driver, and the number
> of RSS queues it configures is based upon it.
>
> This RFC modifies said logic - if the number of cpus is large enough, use
> a smaller default value instead. This serves 2 main purposes:
> 1. A step forward unity in the number of RSS queues of various drivers.
> 2. It prevents wasteful requests for interrupts on machines with many cpus.
>
> Notice no testing was made on this RFC (other than on the bnx2x driver)
> except for compilation test.
>
> Drivers identified as multi-queue, handled in this RFC:
>
> * mellanox mlx4
> * neterion vxge
> * qlogic qlge
> * intel igb, igbxe, igbxevf
> * chelsio cxgb3, cxgb4
> * myricom myri10ge
> * emulex benet
> * broadcom tg3, bnx2, bnx2x
>
> Driver identified as multi-queue, no reference to number of online cpus found,
> and thus unhandled in this RFC:
>
> * neterion s2io
> * marvell mv643xx
> * freescale gianfar
> * ibm ehea
> * ti cpmac
> * sun niu
> * sfc efx
> * chelsio cxgb4vf
>
> Cheers,
> Yuval Mintz
>
> Cc: Divy Le Ray <divy@chelsio.com>
> Cc: Or Gerlitz <ogerlitz@mellanox.com>
> Cc: Jon Mason <jdmason@kudzu.us>
> Cc: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
> Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
> Cc: Ron Mercer <ron.mercer@qlogic.com>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Cc: Jon Mason <mason@myri.com>
> Cc: Andrew Gallatin <gallatin@myri.com>
> Cc: Sathya Perla <sathya.perla@emulex.com>
> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
> Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
> Cc: Matt Carlson <mcarlson@broadcom.com>
> Cc: Michael Chan <mchan@broadcom.com>
Obviously we need to make the subject line more self-explanatory and
start with the component name followed by colon. We will fix it in the
next version of the patch, but please comment on the content.
Thanks,
Eilon
^ permalink raw reply
* Re: [RFC net-next 01/14] Add Default
From: Alexander Duyck @ 2012-06-19 16:37 UTC (permalink / raw)
To: Yuval Mintz; +Cc: netdev, davem, eilong
In-Reply-To: <1340118848-30978-2-git-send-email-yuvalmin@broadcom.com>
On 06/19/2012 08:13 AM, Yuval Mintz wrote:
> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> ---
> include/linux/etherdevice.h | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> index 3d406e0..bb1ecaf 100644
> --- a/include/linux/etherdevice.h
> +++ b/include/linux/etherdevice.h
> @@ -44,7 +44,10 @@ extern int eth_mac_addr(struct net_device *dev, void *p);
> extern int eth_change_mtu(struct net_device *dev, int new_mtu);
> extern int eth_validate_addr(struct net_device *dev);
>
> -
> +/* The maximal number of RSS queues a driver should have unless configured
> + * so explicitly.
> + */
> +#define DEFAULT_MAX_NUM_RSS_QUEUES (8)
>
> extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
> unsigned int rxqs);
I'm not a big fan of just having this as a fixed define in the code. It
seems like it would make much more sense to have this in the Kconfig
somewhere as a range value if you plan on making this changeable in the
future.
Thanks,
Alex
^ permalink raw reply
* Re: [RFC] micrel KSZ8041 disable auto negotiation with fiber
From: Ben Hutchings @ 2012-06-19 17:08 UTC (permalink / raw)
To: Aníbal Almeida Pinto; +Cc: netdev
In-Reply-To: <4FE090A7.801@efacec.com>
On Tue, 2012-06-19 at 15:45 +0100, Aníbal Almeida Pinto wrote:
> Hi,
>
> I am working on a custom board based on a OMAP L138 with a KSZ8041TL-FTL
> phy that have fibber and copper support.
>
> When using with fibber the board can't connect to a switch, only after
> exec :
>
> ethtool -s eth1 speed 100 duplex full autoneg off
>
> the phy get link and start working.
>
> On some switches it appears that autoneg don't work well with fibber,
> ethtool reports that its at 10MB/s after exec
>
> ethtool -s eth1 autoneg on
I'm not aware of any specification for autoneg over fibre, so I imagine
the PHY is being programmed with an invalid configuration and sending
weird signals.
> The auto negotiation bit on phy register is disable on start when using
> the fibber but Linux don't appear to look at it.
>
> Found a thread [1] that solve the problem but don't appear to be fully
> accepted.
>
> The problem is modifying the phy code without interfere with ethtool use.
>
> Any official/accepted solution to this problem ?
The net driver or PHY driver needs to disable autoneg by default when
connected to fibre, and reject attempts to turn it on.
As for *how* the driver is supposed to know whether that's the case, I
have no idea...
> [1] - http://marc.info/?l=linuxppc-embedded&m=131107263711714
...which seems to be where the previous discussion ended.
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: [RFC net-next 01/14] Add Default
From: Eilon Greenstein @ 2012-06-19 17:41 UTC (permalink / raw)
To: Alexander Duyck; +Cc: Yuval Mintz, netdev, davem
In-Reply-To: <4FE0AABE.4070100@intel.com>
On Tue, 2012-06-19 at 09:37 -0700, Alexander Duyck wrote:
> On 06/19/2012 08:13 AM, Yuval Mintz wrote:
> > Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> > ---
> > include/linux/etherdevice.h | 5 ++++-
> > 1 files changed, 4 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> > index 3d406e0..bb1ecaf 100644
> > --- a/include/linux/etherdevice.h
> > +++ b/include/linux/etherdevice.h
> > @@ -44,7 +44,10 @@ extern int eth_mac_addr(struct net_device *dev, void *p);
> > extern int eth_change_mtu(struct net_device *dev, int new_mtu);
> > extern int eth_validate_addr(struct net_device *dev);
> >
> > -
> > +/* The maximal number of RSS queues a driver should have unless configured
> > + * so explicitly.
> > + */
> > +#define DEFAULT_MAX_NUM_RSS_QUEUES (8)
> >
> > extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
> > unsigned int rxqs);
> I'm not a big fan of just having this as a fixed define in the code. It
> seems like it would make much more sense to have this in the Kconfig
> somewhere as a range value if you plan on making this changeable in the
> future.
My original suggestion was a kernel command line parameter, but Dave was
less than enthusiastic. If you will follow the original thread, you can
probably understand why I decided to adopt Dave's constant approach
without suggesting Kconfig:
http://marc.info/?l=linux-netdev&m=133992386010982&w=2
However, 8 is not a holy number - I'm open for suggestions.
Thanks,
Eilon
^ permalink raw reply
* Re: [RFC] micrel KSZ8041 disable auto negotiation with fiber
From: Aníbal Almeida Pinto @ 2012-06-19 17:53 UTC (permalink / raw)
To: Ben Hutchings; +Cc: netdev
In-Reply-To: <1340125709.2692.23.camel@bwh-desktop.uk.solarflarecom.com>
Em Ter 19 Jun 2012 18:08:29 WEST, Ben Hutchings escreveu:
> On Tue, 2012-06-19 at 15:45 +0100, Aníbal Almeida Pinto wrote:
>> Hi,
>>
>> I am working on a custom board based on a OMAP L138 with a KSZ8041TL-FTL
>> phy that have fibber and copper support.
>>
>> When using with fibber the board can't connect to a switch, only after
>> exec :
>>
>> ethtool -s eth1 speed 100 duplex full autoneg off
>>
>> the phy get link and start working.
>>
>> On some switches it appears that autoneg don't work well with fibber,
>> ethtool reports that its at 10MB/s after exec
>>
>> ethtool -s eth1 autoneg on
>
> I'm not aware of any specification for autoneg over fibre, so I imagine
> the PHY is being programmed with an invalid configuration and sending
> weird signals.
>
>> The auto negotiation bit on phy register is disable on start when using
>> the fibber but Linux don't appear to look at it.
>>
>> Found a thread [1] that solve the problem but don't appear to be fully
>> accepted.
>>
>> The problem is modifying the phy code without interfere with ethtool use.
>>
>> Any official/accepted solution to this problem ?
>
> The net driver or PHY driver needs to disable autoneg by default when
> connected to fibre, and reject attempts to turn it on.
>
> As for *how* the driver is supposed to know whether that's the case, I
> have no idea...
On this chip you have a pin where you can specify if is fibber or
copper, at power up it cleat/set the bit of auto negotiation.
The driver can save the bit state after phy power up or reset, and with
that validate if is copper or fibber.
In the case of fibber shouldn't allow change the auto negotiation.
>
>> [1] - http://marc.info/?l=linuxppc-embedded&m=131107263711714
>
> ...which seems to be where the previous discussion ended.
>
> Ben.
>
^ permalink raw reply
* Re: [RFC net-next 05/14] Fix intel/ixgbevf
From: Greg Rose @ 2012-06-19 18:07 UTC (permalink / raw)
To: eilong; +Cc: Alexander Duyck, Yuval Mintz, netdev, davem, Jeff Kirsher
In-Reply-To: <1340122013.2486.14.camel@lb-tlvb-eilong.il.broadcom.com>
On Tue, 19 Jun 2012 19:06:53 +0300
Eilon Greenstein <eilong@broadcom.com> wrote:
> On Tue, 2012-06-19 at 08:39 -0700, Alexander Duyck wrote:
> > On 06/19/2012 08:13 AM, Yuval Mintz wrote:
> > > Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> > > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> > >
> > > Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > > ---
> > > drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 5 +++--
> > > 1 files changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> > > b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index
> > > f69ec42..3ad46c2 100644 ---
> > > a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++
> > > b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -2014,7
> > > +2014,7 @@ err_tx_ring_allocation: static int
> > > ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter)
> > > { int err = 0;
> > > - int vector, v_budget;
> > > + int vector, v_budget, ncpu;
> > >
> > > /*
> > > * It's easy to be greedy for MSI-X vectors, but it
> > > really @@ -2022,8 +2022,9 @@ static int
> > > ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter)
> > > * than CPU's. So let's be conservative and only ask for
> > > * (roughly) twice the number of vectors as there are
> > > CPU's. */
> > > + ncpu = min_t(int, num_online_cpus(),
> > > DEFAULT_MAX_NUM_RSS_QUEUES); v_budget =
> > > min(adapter->num_rx_queues + adapter->num_tx_queues,
> > > - (int)(num_online_cpus() * 2)) +
> > > NON_Q_VECTORS;
> > > + ncpu * 2) + NON_Q_VECTORS;
> > >
> > > /* A failure in MSI-X entry allocation isn't fatal, but
> > > it does
> > > * mean we disable MSI-X capabilities of the adapter. */
> > This change is pointless on the ixgbevf driver. The VF hardware can
> > support at most 4 RSS queues. As such num_rx_queues + num_tx_queues
> > will never exceed 8 so you are essentially adding a necessary
> > min(x,8).
>
> It is pointless with the current value, but if someone will edit the
> kernel source code and replace the 8 with a 2, it will become
> meaningful. The compiler will optimize this part, and I think that for
> completion, it is best to keep this reference so a future default
> number change will not be missed.
>
> Eilon
I don't feel there is any real point to making this change to the
ixgbevf driver. 82599 virtual functions have 3 MSI-X vectors, one of
which is for the mailbox and the other two can be shared with tx/rx
queue pairs or assigned separately to tx or rx queues. So this code is
pointless no matter what value is set for DEFAULT_MAX_NUM_RSS_QUEUES.
Perhaps the patches to the other drivers in your RFC will have some
effect but this one looks like a no-op for the ixgbevf driver so there
is no reason for it.
- Greg
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [RFC net-next 05/14] Fix intel/ixgbevf
From: Eilon Greenstein @ 2012-06-19 18:24 UTC (permalink / raw)
To: Greg Rose; +Cc: Alexander Duyck, Yuval Mintz, netdev, davem, Jeff Kirsher
In-Reply-To: <20120619110704.000045b2@unknown>
On Tue, 2012-06-19 at 11:07 -0700, Greg Rose wrote:
> On Tue, 19 Jun 2012 19:06:53 +0300
> Eilon Greenstein <eilong@broadcom.com> wrote:
>
> > On Tue, 2012-06-19 at 08:39 -0700, Alexander Duyck wrote:
> > > On 06/19/2012 08:13 AM, Yuval Mintz wrote:
> > > > Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> > > > Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> > > >
> > > > Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > > > ---
> > > > drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 5 +++--
> > > > 1 files changed, 3 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> > > > b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index
> > > > f69ec42..3ad46c2 100644 ---
> > > > a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++
> > > > b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -2014,7
> > > > +2014,7 @@ err_tx_ring_allocation: static int
> > > > ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter)
> > > > { int err = 0;
> > > > - int vector, v_budget;
> > > > + int vector, v_budget, ncpu;
> > > >
> > > > /*
> > > > * It's easy to be greedy for MSI-X vectors, but it
> > > > really @@ -2022,8 +2022,9 @@ static int
> > > > ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter)
> > > > * than CPU's. So let's be conservative and only ask for
> > > > * (roughly) twice the number of vectors as there are
> > > > CPU's. */
> > > > + ncpu = min_t(int, num_online_cpus(),
> > > > DEFAULT_MAX_NUM_RSS_QUEUES); v_budget =
> > > > min(adapter->num_rx_queues + adapter->num_tx_queues,
> > > > - (int)(num_online_cpus() * 2)) +
> > > > NON_Q_VECTORS;
> > > > + ncpu * 2) + NON_Q_VECTORS;
> > > >
> > > > /* A failure in MSI-X entry allocation isn't fatal, but
> > > > it does
> > > > * mean we disable MSI-X capabilities of the adapter. */
> > > This change is pointless on the ixgbevf driver. The VF hardware can
> > > support at most 4 RSS queues. As such num_rx_queues + num_tx_queues
> > > will never exceed 8 so you are essentially adding a necessary
> > > min(x,8).
> >
> > It is pointless with the current value, but if someone will edit the
> > kernel source code and replace the 8 with a 2, it will become
> > meaningful. The compiler will optimize this part, and I think that for
> > completion, it is best to keep this reference so a future default
> > number change will not be missed.
> >
> > Eilon
>
> I don't feel there is any real point to making this change to the
> ixgbevf driver. 82599 virtual functions have 3 MSI-X vectors, one of
> which is for the mailbox and the other two can be shared with tx/rx
> queue pairs or assigned separately to tx or rx queues. So this code is
> pointless no matter what value is set for DEFAULT_MAX_NUM_RSS_QUEUES.
> Perhaps the patches to the other drivers in your RFC will have some
> effect but this one looks like a no-op for the ixgbevf driver so there
> is no reason for it.
OK - I guess we can just add a comment in this location saying that
using DEFAULT_MAX_NUM_RSS_QUEUES is meaningless for the ixgbevf with
that explanation so it will not look as if it was simply over looked.
Thanks,
Eilon
^ permalink raw reply
* Re: [PATCH] ipv4: Early TCP socket demux.
From: Stephen Hemminger @ 2012-06-19 18:31 UTC (permalink / raw)
To: David Miller; +Cc: xiaosuo, stephen.hemminger, netdev
In-Reply-To: <20120618.211613.921381844240194486.davem@davemloft.net>
On Mon, 18 Jun 2012 21:16:13 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Changli Gao <xiaosuo@gmail.com>
> Date: Tue, 19 Jun 2012 12:13:48 +0800
>
> > On Tue, Jun 19, 2012 at 12:03 PM, Stephen Hemminger
> > <stephen.hemminger@vyatta.com> wrote:
> >>
> >>>
> >>> You know you want it.
> >>>
> >>> Signed-off-by: David S. Miller <davem@davemloft.net>
> >>
> >> David, I understand it, Eric understands it, and maybe one or
> >> two others. But on the principal of what is "good for the goose
> >> is good for the gander", you really need to provide a reasonable
> >> change log entry. Just because you are the network maintainer
> >> doesn't mean you get to skip all the documented rules about submitting
> >> patches.
> >
> > Agree. Thanks.
>
> That's the last time I try to be even slightly humerous on this
> list.
>
> Thanks for killing the fun Stephen.
We all need to lighten up, keep trying to be humorous.
Maybe you just need better material. The IP stack is just in too good
a shape, how about something with more natural whackiness like bluetooth.
^ permalink raw reply
* Re: [RFC] micrel KSZ8041 disable auto negotiation with fiber
From: Ben Hutchings @ 2012-06-19 18:45 UTC (permalink / raw)
To: Aníbal Almeida Pinto; +Cc: netdev
In-Reply-To: <4FE0BC99.2030101@efacec.com>
On Tue, 2012-06-19 at 18:53 +0100, Aníbal Almeida Pinto wrote:
> Em Ter 19 Jun 2012 18:08:29 WEST, Ben Hutchings escreveu:
> > On Tue, 2012-06-19 at 15:45 +0100, Aníbal Almeida Pinto wrote:
> >> Hi,
> >>
> >> I am working on a custom board based on a OMAP L138 with a KSZ8041TL-FTL
> >> phy that have fibber and copper support.
[...]
> > The net driver or PHY driver needs to disable autoneg by default when
> > connected to fibre, and reject attempts to turn it on.
> >
> > As for *how* the driver is supposed to know whether that's the case, I
> > have no idea...
>
> On this chip you have a pin where you can specify if is fibber or
> copper, at power up it cleat/set the bit of auto negotiation.
>
> The driver can save the bit state after phy power up or reset, and with
> that validate if is copper or fibber.
>
> In the case of fibber shouldn't allow change the auto negotiation.
So presumably the problem is where to put this logic?
It looks like you'll be using the davinci_emac net driver, which uses
phylib (i.e. separate PHY drivers) so you need to change ks8041_driver
and related functions in drivers/net/phy/micrel.c.
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: [RFC net-next 01/14] Add Default
From: Alexander Duyck @ 2012-06-19 19:01 UTC (permalink / raw)
To: eilong; +Cc: Yuval Mintz, netdev, davem
In-Reply-To: <1340127678.2486.18.camel@lb-tlvb-eilong.il.broadcom.com>
On 06/19/2012 10:41 AM, Eilon Greenstein wrote:
> On Tue, 2012-06-19 at 09:37 -0700, Alexander Duyck wrote:
>> On 06/19/2012 08:13 AM, Yuval Mintz wrote:
>>> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
>>> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
>>> ---
>>> include/linux/etherdevice.h | 5 ++++-
>>> 1 files changed, 4 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
>>> index 3d406e0..bb1ecaf 100644
>>> --- a/include/linux/etherdevice.h
>>> +++ b/include/linux/etherdevice.h
>>> @@ -44,7 +44,10 @@ extern int eth_mac_addr(struct net_device *dev, void *p);
>>> extern int eth_change_mtu(struct net_device *dev, int new_mtu);
>>> extern int eth_validate_addr(struct net_device *dev);
>>>
>>> -
>>> +/* The maximal number of RSS queues a driver should have unless configured
>>> + * so explicitly.
>>> + */
>>> +#define DEFAULT_MAX_NUM_RSS_QUEUES (8)
>>>
>>> extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
>>> unsigned int rxqs);
>> I'm not a big fan of just having this as a fixed define in the code. It
>> seems like it would make much more sense to have this in the Kconfig
>> somewhere as a range value if you plan on making this changeable in the
>> future.
> My original suggestion was a kernel command line parameter, but Dave was
> less than enthusiastic. If you will follow the original thread, you can
> probably understand why I decided to adopt Dave's constant approach
> without suggesting Kconfig:
> http://marc.info/?l=linux-netdev&m=133992386010982&w=2
There is a huge difference between a kernel parameter an a kconfig
value. The main idea behind the kconfig value is that you are going to
have different preferences depending on architectures and such so it
would make much more sense to have the default as a config option.
> However, 8 is not a holy number - I'm open for suggestions.
>
> Thanks,
> Eilon
I'm not sure why you couldn't just limit it to 16. From what I can tell
that is the largest number that gets used for RSS queues on almost all
the different hardware out there.
As far as the rest of the patches for the Intel drivers go you might be
better off if you understood how we allocate queues on the ixgbe/ixgbevf
drivers. Usually we have the number of queues determined before we set
the number of vectors so your patches that limited the number of vectors
aren't going to have the effect you desire. So for example RSS
configuration is currently handled in either ixgbe_set_rss_queues or
ixgbe_set_dcb_queues depending on the mode the driver is in. You would
be much better off looking there for how to limit the RSS queueing on
the ixgbe adapter.
Thanks,
Alex
^ permalink raw reply
* [PATCH net] batman-adv: fix skb->data assignment
From: Antonio Quartulli @ 2012-06-19 19:26 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
stable-u79uwXL29TY76Z2rM5mHXA
skb_linearize(skb) possibly rearranges the skb internal data and then changes
the skb->data pointer value. For this reason any other pointer in the code that
was assigned skb->data before invoking skb_linearise(skb) must be re-assigned.
In the current tt_query message handling code this is not done and therefore, in
case of skb linearization, the pointer used to handle the packet header ends up
in pointing to free'd memory.
This bug was introduced by a73105b8d4c765d9ebfb664d0a66802127d8e4c7
(batman-adv: improved client announcement mechanism)
Signed-off-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
---
This patch has already been merged in net-next. I am sorry about that, but we
were missing some knowledge about sending patches for stable.
Thank you,
Antonio
net/batman-adv/routing.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 840e2c6..015471d 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -617,6 +617,8 @@ int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if)
* changes */
if (skb_linearize(skb) < 0)
goto out;
+ /* skb_linearize() possibly changed skb->data */
+ tt_query = (struct tt_query_packet *)skb->data;
tt_len = tt_query->tt_data * sizeof(struct tt_change);
--
1.7.9.4
^ permalink raw reply related
* Re: [RFC net-next 01/14] Add Default
From: Eilon Greenstein @ 2012-06-19 19:53 UTC (permalink / raw)
To: Alexander Duyck; +Cc: Yuval Mintz, netdev, davem
In-Reply-To: <4FE0CCA2.304@intel.com>
On Tue, 2012-06-19 at 12:01 -0700, Alexander Duyck wrote:
> On 06/19/2012 10:41 AM, Eilon Greenstein wrote:
> > On Tue, 2012-06-19 at 09:37 -0700, Alexander Duyck wrote:
> >> On 06/19/2012 08:13 AM, Yuval Mintz wrote:
> >>> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> >>> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
> >>> ---
> >>> include/linux/etherdevice.h | 5 ++++-
> >>> 1 files changed, 4 insertions(+), 1 deletions(-)
> >>>
> >>> diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> >>> index 3d406e0..bb1ecaf 100644
> >>> --- a/include/linux/etherdevice.h
> >>> +++ b/include/linux/etherdevice.h
> >>> @@ -44,7 +44,10 @@ extern int eth_mac_addr(struct net_device *dev, void *p);
> >>> extern int eth_change_mtu(struct net_device *dev, int new_mtu);
> >>> extern int eth_validate_addr(struct net_device *dev);
> >>>
> >>> -
> >>> +/* The maximal number of RSS queues a driver should have unless configured
> >>> + * so explicitly.
> >>> + */
> >>> +#define DEFAULT_MAX_NUM_RSS_QUEUES (8)
> >>>
> >>> extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
> >>> unsigned int rxqs);
> >> I'm not a big fan of just having this as a fixed define in the code. It
> >> seems like it would make much more sense to have this in the Kconfig
> >> somewhere as a range value if you plan on making this changeable in the
> >> future.
> > My original suggestion was a kernel command line parameter, but Dave was
> > less than enthusiastic. If you will follow the original thread, you can
> > probably understand why I decided to adopt Dave's constant approach
> > without suggesting Kconfig:
> > http://marc.info/?l=linux-netdev&m=133992386010982&w=2
> There is a huge difference between a kernel parameter an a kconfig
> value. The main idea behind the kconfig value is that you are going to
> have different preferences depending on architectures and such so it
> would make much more sense to have the default as a config option.
Yes, I'm aware of that. Coming from the orientation of number of CPUs
and memory constrains, the kernel parameter came to mind first, after
receiving the reply about using just a good default, I have considered
the kconfig alternative but decided not to make further suggestions and
just go with a good default.
> I'm not sure why you couldn't just limit it to 16. From what I can tell
> that is the largest number that gets used for RSS queues on almost all
> the different hardware out there.
cxgb4 32, myril10ge 32, efx 32, niu 24.
The point is that I was requested by a customer to support more queues,
but simply enabling that much more MSI-X vectors in the FW will cause
the driver to consume too much memory and this is probably not desired
for most users. Having the set_channels API is good solution to have a
default value which is different than the maximal value, and that brings
us to where we are now - finding a default value for all multi-queue
drivers.
> As far as the rest of the patches for the Intel drivers go you might be
> better off if you understood how we allocate queues on the ixgbe/ixgbevf
> drivers. Usually we have the number of queues determined before we set
> the number of vectors so your patches that limited the number of vectors
> aren't going to have the effect you desire. So for example RSS
> configuration is currently handled in either ixgbe_set_rss_queues or
> ixgbe_set_dcb_queues depending on the mode the driver is in. You would
> be much better off looking there for how to limit the RSS queueing on
> the ixgbe adapter.
OK, we will move the logic to those functions.
^ permalink raw reply
* pull request: wireless-next 2012-06-19
From: John W. Linville @ 2012-06-19 19:57 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 17569 bytes --]
commit b3c911eeb47d08aada986f769b6a060794dfe9d0
Dave,
This is a sizeable batch of updates intended for 3.6...
The bulk of the changes here are Bluetooth. Gustavo says:
Here goes the first Bluetooth pull request for 3.6, we have
queued quite a lot of work. Andrei Emeltchenko added the AMP
Manager code, a lot of work is needed, but the first bit are
already there. This code is disabled by default. Mat Martineau
changed the whole L2CAP ERTM state machine code, replacing
the old one with a new implementation. Besides that we had
lot of coding style fixes (to follow net rules), more l2cap
core separation from socket and many clean ups and fixed all
over the tree.
Along with the above, there is a healthy dose of ath9k, iwlwifi,
and other driver updates. There is also another pull from the
wireless tree to resolve some merge issues. I also fixed-up some
merge discrepencies between net-next and wireless-next.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 43b03f1f6d6832d744918947d185a7aee89d1e0f:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2012-06-12 21:59:18 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git for-davem
Andre Guedes (4):
Bluetooth: Change default MTU for L2CAP ATT channel
Bluetooth: Check MTU value in l2cap_sock_setsockopt_old
Bluetooth: Rename L2CAP_LE_DEFAULT_MTU
Bluetooth: Filter duplicated reports in LE scan
Andrei Emeltchenko (35):
Bluetooth: Silent sparse warnings
Bluetooth: Use defined link key size
Bluetooth: Preserve L2CAP flags values
Bluetooth: trivial: Remove empty line
Bluetooth: Define L2CAP conf continuation flag
Bluetooth: Define and use PSM identifiers
Bluetooth: Use __constant when dealing with constants
Bluetooth: Use __constant modifier in HCI code
Bluetooth: Define HCI AMP cmd struct
Bluetooth: Move clean up code and set of SOCK_ZAPPED to l2cap_sock.c
Bluetooth: Add l2cap_chan->ops->ready()
Bluetooth: trivial: Use defined PSMLEN instead of magic
Bluetooth: A2MP: Create A2MP channel
Bluetooth: A2MP: AMP Manager basic functions
Bluetooth: A2MP: Build and Send msg helpers
Bluetooth: A2MP: Add chan callbacks
Bluetooth: A2MP: Definitions for A2MP commands
Bluetooth: A2MP: Define A2MP status codes
Bluetooth: A2MP: Process A2MP messages
Bluetooth: A2MP: Process A2MP Command Reject
Bluetooth: A2MP: Process A2MP Discover Request
Bluetooth: A2MP: Process A2MP Change Notify
Bluetooth: A2MP: Process A2MP Get Info Request
Bluetooth: A2MP: Process A2MP Get AMP Assoc Request
Bluetooth: A2MP: Process A2MP Create Physlink Request
Bluetooth: A2MP: Process A2MP Disc Physlink Request
Bluetooth: A2MP: Process A2MP Command Responses
Bluetooth: A2MP: Handling fixed channels
Bluetooth: A2MP: Manage incoming connections
Bluetooth: Do not check func ready existence
Bluetooth: A2MP: Do not reference hci_conn
Bluetooth: Make l2cap_data_channel return void
Bluetooth: Make l2cap_conless_channel return void
Bluetooth: Make l2cap_att_channel return void
Bluetooth: Remove magic disconnect reason
Andrzej Kaczmarek (3):
Bluetooth: Allow only one LE connection attempt
Bluetooth: Return proper mgmt state when LE pairing connection failed
Bluetooth: Fix not removing hci_conn for failed LE connection
Arend van Spriel (4):
brcmsmac: remove brcms_set_hint() function
brcmsmac: fix smatch warning found in ampdu.c
brcmfmac: add debugfs helper functions
brcmfmac: expose sdio internal counters in debugfs
Ashok Nagarajan (1):
mac80211: add missing kernel-doc
Avinash Patil (1):
mwifiex: fix incorrect privacy setting in beacon and probe response
Bing Zhao (1):
Bluetooth: btmrvl: add SD8787 Bluetooth AMP device ID
Brandon Misemer (1):
iwlwifi: Fix Makefile build order for built-in driver
Dan Carpenter (2):
iwlwifi: turn on a lockdep assertion
iwlwifi: unlock on error path
David Spinadel (1):
mac80211: stop polling in disassociation
Eliad Peller (2):
cfg80211: fix potential deadlock in regulatory
mac80211: check sdata_running on ieee80211_set_bitrate_mask
Emmanuel Grumbach (10):
iwlwifi: s/iwl_read_targ_mem_words/iwl_read_targ_mem_bytes
iwlwifi: iwl_{read,write}_targ_mem_words takes dwords
iwlwifi: print more info when a queue is stuck
iwlwifi: don't configure a txq that is being disabled
iwlwifi: remove lock around txq_enable
iwlwifi: comment that setting driver_data overrides info->control
iwlwifi: print even more info when a queue is stuck
iwlwifi: don't modify the timer if we don't Tx
iwlwifi: warn if TFD index and WiFi Seq don't match
iwlwifi: WARN only once when we have trouble in reclaim
Gustavo Padovan (29):
Bluetooth: Fix coding style in mgmt.c
Bluetooth: Fix coding style in sco.c
Bluetooth: Fix coding style in hci_sock.c
Bluetooth: Fix coding style in hci_sysfs.c
Bluetooth: Fix coding style in hci_event.c
Bluetooth: Fix coding style in hci_conn.c
Bluetooth: Fix coding style in hci_core.c
Bluetooth: Do not purge queue in Basic Mode
Bluetooth: Remove double check for BT_CONNECTED
Bluetooth: Remove dead int returns
Bluetooth: Fix trailing whitespaces in license text
Bluetooth: Remove most of the inline usage
Bluetooth: Remove 'register' usage from the subsystem
Bluetooth: Fix coding style in include/net/bluetooth
Bluetooth: Fix coding style in the subsystem
Bluetooth: Remove unnecessary headers include
Bluetooth: Remove unneeded EXPORT_SYMBOL
Bluetooth: Use lmp_ssp_capable() macro
Bluetooth: Get a more accurate L2CAP PDU len
Bluetooth: Remove extra l2cap_state_change(BT_CONNECTED)
Bluetooth: Use l2cap_chan_ready() in LE path
Bluetooth: Use chan as parameters for l2cap chan ops
Bluetooth: Use chan->state instead of sk->sk_state
Bluetooth: Move check for backlog size to l2cap_sock.c
Bluetooth: check for already existent channel before create new one
Bluetooth: Create function to return the ERTM header size
Bluetooth: Remove unused err var from l2cap_segment_sdu()
Bluetooth: Create empty l2cap ops function
Bluetooth: Fix style in hidp code
Ilan Peer (2):
iwlwifi: refactor testmode
iwlwifi: decouple testmode and iwl-test
Johan Hedberg (4):
Bluetooth: Fix SMP pairing method selection
Bluetooth: Fix deadlock and crash when SMP pairing times out
Bluetooth: Fix SMP security elevation from medium to high
Bluetooth: Add support for encryption key refresh
Johannes Berg (5):
mac80211: add some missing kernel-doc
iwlwifi: fix dynamic loading
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
iwlwifi: fix 6035 device parameters
iwlwifi: use request_module instead of _nowait
John W. Linville (6):
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth-next
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next into for-davem
Jussi Kivilinna (1):
rndis_wlan: fix matching bssid check in rndis_check_bssid_list()
Mat Martineau (28):
Bluetooth: Free allocated ERTM SREJ list if init fails
Bluetooth: Fix early return from l2cap_chan_del
Bluetooth: Change default state of ERTM disable flag
Bluetooth: Add a new L2CAP ERTM transmit state machine.
Bluetooth: Refactor l2cap_streaming_send
Bluetooth: Refactor l2cap_ertm_send
Bluetooth: Refactor l2cap_send_sframe
Bluetooth: Consolidate common receive code for ERTM and streaming mode
Bluetooth: Add streaming mode receive and incoming packet classifier
Bluetooth: Remove receive code that has been superceded
Bluetooth: Refactor l2cap_send_ack
Bluetooth: Use the transmit state machine for busy state changes
Bluetooth: Update l2cap_send_i_or_rr_or_rnr to fit the spec better
Bluetooth: Add the ERTM receive state machine
Bluetooth: Add implementation for retransmitting all unacked frames
Bluetooth: Send SREJ frames when packets go missing
Bluetooth: Reassemble all available data when retransmissions succeed.
Bluetooth: Handle SREJ requests to resend unacked frames
Bluetooth: Handle incoming REJ frames
Bluetooth: Use new header structures in l2cap_send_rr_or_rnr
Bluetooth: Check rules when setting retransmit or monitor timers
Bluetooth: Use the ERTM transmit state machine from timeout handlers
Bluetooth: Simplify the ERTM ack timeout
Bluetooth: Remove unneccesary inline
Bluetooth: Set txwin values for streaming mode
Bluetooth: Remove unused ERTM control field macros
Bluetooth: Enable ERTM by default
Bluetooth: Send a configuration request after security confirmation
Michal Kazior (1):
cfg80211: check iface combinations only when iface is running
Mohammed Shafi Shajakhan (4):
ath9k: Fix a WARNING on suspend/resume with IBSS
ath9k: remove incompatible IBSS interface check in change_iface
ath9k: Fix softlockup in AR9485
ath9k: Fix softlockup in AR9485
Rajkumar Manoharan (19):
ath9k: choose legacy rate as last rate of MRR series
ath9k: restore power state on set channel failure
ath9k_hw: Fix AR9462 power consumption on idle associated
ath9k_hw: check GPM HW write pointer before chip reset
ath9k_hw: fix incorrect LNA register settings
ath9k_hw: program OBS register only when MCI is disabled
ath9k_hw: process MCI interrupts only when btcoex is enabled
ath9k: simplify btcoex profile management
ath9k: keep btcoex period in milliseconds
ath9k: defer btcoex scheme update
ath9k: fix btcoex duty cycle
ath9k_hw: cleanup MCI gpm offset state
ath9k_hw: add utility function to set BT version
ath9k_hw: remove MCI_STATE_SEND_WLAN_CHANNELS
ath9k_hw: remove MCI_STATE_NEED_FLUSH_BT_INFO
ath9k_hw: remove p_data argument from ar9003_mci_state
ath9k_hw: remove MCI_STATE_BT
ath9k_hw: remove MCI_STATE_CONT_* state
ath9k_hw: remove MCI_STATE_SET_BT_SLEEP
Sasha Levin (1):
Bluetooth: Really fix registering hci with duplicate name
Sujith Manoharan (1):
ath9k_hw: Update initvals for AR9462
Szymon Janc (2):
Bluetooth: Rename HCI_QUIRK_NO_RESET to HCI_QUIRK_RESET_ON_CLOSE
Bluetooth: Remove unused HCI timeouts definitions
Vinicius Costa Gomes (1):
Bluetooth: Fix checking the wrong flag when accepting a socket
Vishal Agarwal (1):
Bluetooth: Fix LE pairing completion on connection failure
drivers/bluetooth/bluecard_cs.c | 10 +-
drivers/bluetooth/bpa10x.c | 2 +-
drivers/bluetooth/bt3c_cs.c | 4 +-
drivers/bluetooth/btmrvl_sdio.c | 3 +
drivers/bluetooth/btuart_cs.c | 4 +-
drivers/bluetooth/btusb.c | 14 +-
drivers/bluetooth/dtl1_cs.c | 4 +-
drivers/bluetooth/hci_bcsp.c | 2 +-
drivers/bluetooth/hci_h4.c | 2 +-
drivers/bluetooth/hci_ldisc.c | 2 +-
drivers/bluetooth/hci_ll.c | 6 +-
drivers/net/wireless/ath/ath9k/ar9003_mac.c | 7 +-
drivers/net/wireless/ath/ath9k/ar9003_mci.c | 330 ++--
drivers/net/wireless/ath/ath9k/ar9003_mci.h | 32 +-
.../net/wireless/ath/ath9k/ar9462_2p0_initvals.h | 2 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 1 +
drivers/net/wireless/ath/ath9k/gpio.c | 10 +-
drivers/net/wireless/ath/ath9k/hw.c | 11 +-
drivers/net/wireless/ath/ath9k/link.c | 8 +
drivers/net/wireless/ath/ath9k/main.c | 22 +-
drivers/net/wireless/ath/ath9k/mci.c | 162 +-
drivers/net/wireless/ath/ath9k/rc.c | 17 +-
drivers/net/wireless/ath/ath9k/reg.h | 4 +-
drivers/net/wireless/brcm80211/brcmfmac/Makefile | 2 +
drivers/net/wireless/brcm80211/brcmfmac/dhd.h | 3 +
drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c | 126 ++
drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.h | 59 +
.../net/wireless/brcm80211/brcmfmac/dhd_linux.c | 7 +
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 169 +-
drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 5 +-
.../net/wireless/brcm80211/brcmsmac/mac80211_if.c | 14 +-
drivers/net/wireless/iwlwifi/Makefile | 10 +-
drivers/net/wireless/iwlwifi/dvm/agn.h | 17 +-
drivers/net/wireless/iwlwifi/dvm/dev.h | 26 +-
drivers/net/wireless/iwlwifi/dvm/lib.c | 2 +-
drivers/net/wireless/iwlwifi/dvm/mac80211.c | 2 +-
drivers/net/wireless/iwlwifi/dvm/main.c | 6 +-
drivers/net/wireless/iwlwifi/dvm/rx.c | 24 +-
drivers/net/wireless/iwlwifi/dvm/testmode.c | 778 +-------
drivers/net/wireless/iwlwifi/dvm/tx.c | 4 +-
drivers/net/wireless/iwlwifi/iwl-drv.c | 38 +-
drivers/net/wireless/iwlwifi/iwl-fh.h | 2 +
drivers/net/wireless/iwlwifi/iwl-io.c | 20 +-
drivers/net/wireless/iwlwifi/iwl-io.h | 14 +-
drivers/net/wireless/iwlwifi/iwl-test.c | 856 ++++++++
drivers/net/wireless/iwlwifi/iwl-test.h | 161 ++
.../iwlwifi/{dvm/testmode.h => iwl-testmode.h} | 0
drivers/net/wireless/iwlwifi/pcie/6000.c | 1 +
drivers/net/wireless/iwlwifi/pcie/internal.h | 9 +-
drivers/net/wireless/iwlwifi/pcie/trans.c | 71 +-
drivers/net/wireless/iwlwifi/pcie/tx.c | 95 +-
drivers/net/wireless/mwifiex/uap_cmd.c | 11 +
drivers/net/wireless/rndis_wlan.c | 2 +-
include/net/bluetooth/a2mp.h | 126 ++
include/net/bluetooth/bluetooth.h | 39 +-
include/net/bluetooth/hci.h | 105 +-
include/net/bluetooth/hci_core.h | 29 +-
include/net/bluetooth/l2cap.h | 205 +--
include/net/mac80211.h | 6 +
net/bluetooth/Makefile | 3 +-
net/bluetooth/a2mp.c | 568 ++++++
net/bluetooth/af_bluetooth.c | 14 +-
net/bluetooth/bnep/core.c | 21 +-
net/bluetooth/bnep/netdev.c | 16 +-
net/bluetooth/bnep/sock.c | 18 +-
net/bluetooth/hci_conn.c | 98 +-
net/bluetooth/hci_core.c | 214 +-
net/bluetooth/hci_event.c | 357 ++--
net/bluetooth/hci_sock.c | 59 +-
net/bluetooth/hci_sysfs.c | 99 +-
net/bluetooth/hidp/core.c | 26 +-
net/bluetooth/hidp/sock.c | 16 +-
net/bluetooth/l2cap_core.c | 2132 ++++++++++++--------
net/bluetooth/l2cap_sock.c | 130 ++-
net/bluetooth/lib.c | 7 +-
net/bluetooth/mgmt.c | 89 +-
net/bluetooth/rfcomm/core.c | 32 +-
net/bluetooth/rfcomm/sock.c | 21 +-
net/bluetooth/rfcomm/tty.c | 9 +-
net/bluetooth/sco.c | 43 +-
net/bluetooth/smp.c | 18 +-
net/mac80211/cfg.c | 3 +
net/mac80211/mlme.c | 4 +-
net/mac80211/sta_info.h | 5 +
net/wireless/reg.c | 2 +-
net/wireless/util.c | 2 +-
86 files changed, 4743 insertions(+), 2966 deletions(-)
create mode 100644 drivers/net/wireless/brcm80211/brcmfmac/dhd_dbg.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-test.c
create mode 100644 drivers/net/wireless/iwlwifi/iwl-test.h
rename drivers/net/wireless/iwlwifi/{dvm/testmode.h => iwl-testmode.h} (100%)
create mode 100644 include/net/bluetooth/a2mp.h
create mode 100644 net/bluetooth/a2mp.c
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ 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