vdpa/sfc: set multicast filter during init
Insert unknown multicast filter to allow IPv6 neighbor discovery Signed-off-by: Vijay Kumar Srivastava <vsrivast@xilinx.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
b3fc350472
commit
136d164684
@ -20,7 +20,7 @@
|
||||
#define SFC_VDPA_DEFAULT_MCDI_IOVA 0x200000000000
|
||||
|
||||
/* Broadcast & Unicast MAC filters are supported */
|
||||
#define SFC_MAX_SUPPORTED_FILTERS 2
|
||||
#define SFC_MAX_SUPPORTED_FILTERS 3
|
||||
|
||||
/*
|
||||
* Get function-local index of the associated VI from the
|
||||
@ -31,6 +31,7 @@
|
||||
enum sfc_vdpa_filter_type {
|
||||
SFC_VDPA_BCAST_MAC_FILTER = 0,
|
||||
SFC_VDPA_UCAST_MAC_FILTER = 1,
|
||||
SFC_VDPA_MCAST_DST_FILTER = 2,
|
||||
SFC_VDPA_FILTER_NTYPE
|
||||
};
|
||||
|
||||
|
@ -38,8 +38,12 @@ sfc_vdpa_set_mac_filter(efx_nic_t *nic, efx_filter_spec_t *spec,
|
||||
spec->efs_flags = EFX_FILTER_FLAG_RX;
|
||||
spec->efs_dmaq_id = qid;
|
||||
|
||||
rc = efx_filter_spec_set_eth_local(spec, EFX_FILTER_SPEC_VID_UNSPEC,
|
||||
eth_addr);
|
||||
if (eth_addr == NULL)
|
||||
rc = efx_filter_spec_set_mc_def(spec);
|
||||
else
|
||||
rc = efx_filter_spec_set_eth_local(spec,
|
||||
EFX_FILTER_SPEC_VID_UNSPEC,
|
||||
eth_addr);
|
||||
if (rc != 0)
|
||||
return rc;
|
||||
|
||||
@ -101,9 +105,19 @@ int sfc_vdpa_filter_config(struct sfc_vdpa_ops_data *ops_data)
|
||||
|
||||
rc = sfc_vdpa_set_mac_filter(nic, spec, qid,
|
||||
ucast_eth_addr.addr_bytes);
|
||||
if (rc != 0)
|
||||
sfc_vdpa_err(sva, "unicast MAC filter insertion failed: %s",
|
||||
rte_strerror(rc));
|
||||
else
|
||||
sva->filters.filter_cnt++;
|
||||
|
||||
sfc_vdpa_log_init(sva, "insert unknown mcast filter");
|
||||
spec = &sva->filters.spec[SFC_VDPA_MCAST_DST_FILTER];
|
||||
|
||||
rc = sfc_vdpa_set_mac_filter(nic, spec, qid, NULL);
|
||||
if (rc != 0)
|
||||
sfc_vdpa_err(sva,
|
||||
"unicast MAC filter insertion failed: %s",
|
||||
"mcast filter insertion failed: %s",
|
||||
rte_strerror(rc));
|
||||
else
|
||||
sva->filters.filter_cnt++;
|
||||
|
Loading…
Reference in New Issue
Block a user