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 */
/* 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 = team_num_to_port_index(team, hash);
/* 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)
{
+ struct lb_priv *lb_priv = get_lb_priv(team);
struct team_port *port;
port = rcu_dereference_bh(LB_HTPM_PORT_BY_HASH(lb_priv, hash));
if (likely(port))
return port;
/* If no valid port in the table, fall back to simple hash */
- return lb_hash_select_tx_port(team, lb_priv, skb, hash);
+ return lb_hash_select_tx_port(team, hash);
}
struct lb_select_tx_port {
hash = lb_get_skb_hash(lb_priv, skb);
select_tx_port_func = rcu_dereference_bh(lb_priv->select_tx_port_func);
- port = select_tx_port_func(team, lb_priv, skb, hash);
+ port = select_tx_port_func(team, hash);
if (unlikely(!port))
goto drop;
if (team_dev_queue_xmit(team, port, skb))