Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314634
b: refs/heads/master
c: 52a4fd7
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jun 27, 2012
1 parent 30e5aa3 commit 90eb008
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 122bb046bcfb8f3d2d94d9f7f6b74da187a740f2
refs/heads/master: 52a4fd77808662a16cd17ad3b0e1ad75e0162d8b
5 changes: 2 additions & 3 deletions trunk/drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,6 @@ static int team_change_mode(struct team *team, const char *kind)
* Rx path frame handler
************************/

static bool team_port_enabled(struct team_port *port);

/* note: already called with rcu_read_lock */
static rx_handler_result_t team_handle_frame(struct sk_buff **pskb)
{
Expand Down Expand Up @@ -673,10 +671,11 @@ static bool team_port_find(const struct team *team,
return false;
}

static bool team_port_enabled(struct team_port *port)
bool team_port_enabled(struct team_port *port)
{
return port->index != -1;
}
EXPORT_SYMBOL(team_port_enabled);

/*
* Enable/disable port by adding to enabled port hashlist and setting
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/team/team_mode_loadbalance.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ static int lb_tx_hash_to_port_mapping_set(struct team *team,
unsigned char hash = ctx->info->array_index;

list_for_each_entry(port, &team->port_list, list) {
if (ctx->data.u32_val == port->dev->ifindex) {
if (ctx->data.u32_val == port->dev->ifindex &&
team_port_enabled(port)) {
rcu_assign_pointer(LB_HTPM_PORT_BY_HASH(lb_priv, hash),
port);
return 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/if_team.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ struct team_port {
long mode_priv[0];
};

extern bool team_port_enabled(struct team_port *port);

struct team_mode_ops {
int (*init)(struct team *team);
void (*exit)(struct team *team);
Expand Down

0 comments on commit 90eb008

Please sign in to comment.