|
@@ -1381,6 +1381,32 @@ out:
|
|
|
return NETDEV_TX_OK;
|
|
|
}
|
|
|
|
|
|
+int bond_tlb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
|
|
|
+{
|
|
|
+ struct bonding *bond = netdev_priv(bond_dev);
|
|
|
+ struct ethhdr *eth_data;
|
|
|
+ struct slave *tx_slave = NULL;
|
|
|
+ u32 hash_index;
|
|
|
+
|
|
|
+ skb_reset_mac_header(skb);
|
|
|
+ eth_data = eth_hdr(skb);
|
|
|
+
|
|
|
+ /* Do not TX balance any multicast or broadcast */
|
|
|
+ if (!is_multicast_ether_addr(eth_data->h_dest)) {
|
|
|
+ switch (skb->protocol) {
|
|
|
+ case htons(ETH_P_IP):
|
|
|
+ case htons(ETH_P_IPX):
|
|
|
+ /* In case of IPX, it will falback to L2 hash */
|
|
|
+ case htons(ETH_P_IPV6):
|
|
|
+ hash_index = bond_xmit_hash(bond, skb);
|
|
|
+ tx_slave = tlb_choose_channel(bond, hash_index & 0xFF, skb->len);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return bond_do_alb_xmit(skb, bond, tx_slave);
|
|
|
+}
|
|
|
+
|
|
|
int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
|
|
|
{
|
|
|
struct bonding *bond = netdev_priv(bond_dev);
|