i40e/base: set shared bit for multicast filters
Add the use of the new shared MAC filter bit for multicast and broadcast filters in order to make better use of the filters available from the device. Signed-off-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Remy Horton <remy.horton@intel.com>
This commit is contained in:
parent
e6691b428e
commit
71d0a41e9a
@ -1033,6 +1033,7 @@ struct i40e_aqc_add_macvlan_element_data {
|
||||
#define I40E_AQC_MACVLAN_ADD_HASH_MATCH 0x0002
|
||||
#define I40E_AQC_MACVLAN_ADD_IGNORE_VLAN 0x0004
|
||||
#define I40E_AQC_MACVLAN_ADD_TO_QUEUE 0x0008
|
||||
#define I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC 0x0010
|
||||
__le16 queue_number;
|
||||
#define I40E_AQC_MACVLAN_CMD_QUEUE_SHIFT 0
|
||||
#define I40E_AQC_MACVLAN_CMD_QUEUE_MASK (0x7FF << \
|
||||
|
@ -2777,6 +2777,7 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid,
|
||||
(struct i40e_aqc_macvlan *)&desc.params.raw;
|
||||
enum i40e_status_code status;
|
||||
u16 buf_size;
|
||||
int i;
|
||||
|
||||
if (count == 0 || !mv_list || !hw)
|
||||
return I40E_ERR_PARAM;
|
||||
@ -2790,12 +2791,17 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid,
|
||||
cmd->seid[1] = 0;
|
||||
cmd->seid[2] = 0;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
if (I40E_IS_MULTICAST(mv_list[i].mac_addr))
|
||||
mv_list[i].flags |=
|
||||
CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC);
|
||||
|
||||
desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD));
|
||||
if (buf_size > I40E_AQ_LARGE_BUF)
|
||||
desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB);
|
||||
|
||||
status = i40e_asq_send_command(hw, &desc, mv_list, buf_size,
|
||||
cmd_details);
|
||||
cmd_details);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user