Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193791
b: refs/heads/master
c: 5c58c47
h: refs/heads/master
i:
  193789: ba74373
  193787: 8e33462
  193783: 0765b04
  193775: f96ede8
  193759: bac3af5
  193727: 6d21780
  193663: 5e77599
  193535: e2bc907
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Mar 27, 2010
1 parent b0e44b4 commit ee457ee
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 38 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: 2853eb892edb6be1ea13787d0c24fb72c1d1cca5
refs/heads/master: 5c58c47a4f3758c81594402451d8fe0d8accb4e8
24 changes: 1 addition & 23 deletions trunk/drivers/net/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1495,22 +1495,6 @@ static void ixgbevf_restore_vlan(struct ixgbevf_adapter *adapter)
}
}

static u8 *ixgbevf_addr_list_itr(struct ixgbe_hw *hw, u8 **mc_addr_ptr,
u32 *vmdq)
{
struct dev_mc_list *mc_ptr;
u8 *addr = *mc_addr_ptr;
*vmdq = 0;

mc_ptr = container_of(addr, struct dev_mc_list, dmi_addr[0]);
if (mc_ptr->next)
*mc_addr_ptr = mc_ptr->next->dmi_addr;
else
*mc_addr_ptr = NULL;

return addr;
}

/**
* ixgbevf_set_rx_mode - Multicast set
* @netdev: network interface device structure
Expand All @@ -1523,16 +1507,10 @@ static void ixgbevf_set_rx_mode(struct net_device *netdev)
{
struct ixgbevf_adapter *adapter = netdev_priv(netdev);
struct ixgbe_hw *hw = &adapter->hw;
u8 *addr_list = NULL;
int addr_count = 0;

/* reprogram multicast list */
addr_count = netdev_mc_count(netdev);
if (addr_count)
addr_list = netdev->mc_list->dmi_addr;
if (hw->mac.ops.update_mc_addr_list)
hw->mac.ops.update_mc_addr_list(hw, addr_list, addr_count,
ixgbevf_addr_list_itr);
hw->mac.ops.update_mc_addr_list(hw, netdev);
}

static void ixgbevf_napi_enable_all(struct ixgbevf_adapter *adapter)
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/net/ixgbevf/vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,22 +252,18 @@ static s32 ixgbevf_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr,
/**
* ixgbevf_update_mc_addr_list_vf - Update Multicast addresses
* @hw: pointer to the HW structure
* @mc_addr_list: array of multicast addresses to program
* @mc_addr_count: number of multicast addresses to program
* @next: caller supplied function to return next address in list
* @netdev: pointer to net device structure
*
* Updates the Multicast Table Array.
**/
static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw, u8 *mc_addr_list,
u32 mc_addr_count,
ixgbe_mc_addr_itr next)
static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw,
struct net_device *netdev)
{
struct dev_addr_list *dmi;
struct ixgbe_mbx_info *mbx = &hw->mbx;
u32 msgbuf[IXGBE_VFMAILBOX_SIZE];
u16 *vector_list = (u16 *)&msgbuf[1];
u32 vector;
u32 cnt, i;
u32 vmdq;

/* Each entry in the list uses 1 16 bit word. We have 30
* 16 bit words available in our HW msg buffer (minus 1 for the
Expand All @@ -278,13 +274,17 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw, u8 *mc_addr_list,
* addresses except for in large enterprise network environments.
*/

cnt = (mc_addr_count > 30) ? 30 : mc_addr_count;
cnt = netdev_mc_count(netdev);
if (cnt > 30)
cnt = 30;
msgbuf[0] = IXGBE_VF_SET_MULTICAST;
msgbuf[0] |= cnt << IXGBE_VT_MSGINFO_SHIFT;

for (i = 0; i < cnt; i++) {
vector = ixgbevf_mta_vector(hw, next(hw, &mc_addr_list, &vmdq));
vector_list[i] = vector;
i = 0;
netdev_for_each_mc_addr(dmi, netdev) {
if (i == cnt)
break;
vector_list[i++] = ixgbevf_mta_vector(hw, dmi->dmi_addr);
}

mbx->ops.write_posted(hw, msgbuf, IXGBE_VFMAILBOX_SIZE);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ixgbevf/vf.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/if_ether.h>
#include <linux/netdevice.h>

#include "defines.h"
#include "regs.h"
Expand Down Expand Up @@ -62,8 +63,7 @@ struct ixgbe_mac_operations {
/* RAR, Multicast, VLAN */
s32 (*set_rar)(struct ixgbe_hw *, u32, u8 *, u32);
s32 (*init_rx_addrs)(struct ixgbe_hw *);
s32 (*update_mc_addr_list)(struct ixgbe_hw *, u8 *, u32,
ixgbe_mc_addr_itr);
s32 (*update_mc_addr_list)(struct ixgbe_hw *, struct net_device *);
s32 (*enable_mc)(struct ixgbe_hw *);
s32 (*disable_mc)(struct ixgbe_hw *);
s32 (*clear_vfta)(struct ixgbe_hw *);
Expand Down

0 comments on commit ee457ee

Please sign in to comment.