MATCH_MASK(MC_CMD_FILTER_OP_IN_MATCH_OUTER_VLAN));
EFX_STATIC_ASSERT(EFX_FILTER_MATCH_IP_PROTO ==
MATCH_MASK(MC_CMD_FILTER_OP_IN_MATCH_IP_PROTO));
+ EFX_STATIC_ASSERT(EFX_FILTER_MATCH_UNKNOWN_MCAST_DST ==
+ MATCH_MASK(MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST));
+ EFX_STATIC_ASSERT((uint32_t)EFX_FILTER_MATCH_UNKNOWN_UCAST_DST ==
+ MATCH_MASK(MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST));
#undef MATCH_MASK
EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (ef10_filter_table_t), eftp);
efx_mcdi_req_t req;
uint8_t payload[MAX(MC_CMD_FILTER_OP_IN_LEN,
MC_CMD_FILTER_OP_OUT_LEN)];
- uint32_t match_fields = 0;
efx_rc_t rc;
memset(payload, 0, sizeof (payload));
goto fail1;
}
- if (spec->efs_match_flags & EFX_FILTER_MATCH_LOC_MAC_IG) {
- /*
- * The LOC_MAC_IG match flag can represent unknown unicast
- * or multicast filters - use the MAC address to distinguish
- * them.
- */
- if (EFX_MAC_ADDR_IS_MULTICAST(spec->efs_loc_mac))
- match_fields |= 1U <<
- MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_LBN;
- else
- match_fields |= 1U <<
- MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_LBN;
- }
-
- match_fields |= spec->efs_match_flags & (~EFX_FILTER_MATCH_LOC_MAC_IG);
-
MCDI_IN_SET_DWORD(req, FILTER_OP_IN_PORT_ID,
EVB_PORT_ID_ASSIGNED);
MCDI_IN_SET_DWORD(req, FILTER_OP_IN_MATCH_FIELDS,
- match_fields);
+ spec->efs_match_flags);
MCDI_IN_SET_DWORD(req, FILTER_OP_IN_RX_DEST,
MC_CMD_FILTER_OP_IN_RX_DEST_HOST);
MCDI_IN_SET_DWORD(req, FILTER_OP_IN_RX_QUEUE,
uint8_t payload[MAX(MC_CMD_GET_PARSER_DISP_INFO_IN_LEN,
MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX)];
efx_rc_t rc;
- uint32_t i;
- boolean_t support_unknown_ucast = B_FALSE;
- boolean_t support_unknown_mcast = B_FALSE;
(void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_GET_PARSER_DISP_INFO;
EFX_STATIC_ASSERT(sizeof (uint32_t) ==
MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_LEN);
- /*
- * Remove UNKNOWN UCAST and MCAST flags, and if both are present, change
- * the lower priority one to LOC_MAC_IG.
- */
- for (i = 0; i < *length; i++) {
- if (list[i] & MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_LBN) {
- list[i] &=
- (~MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_LBN);
- support_unknown_ucast = B_TRUE;
- }
- if (list[i] & MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_LBN) {
- list[i] &=
- (~MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_LBN);
- support_unknown_mcast = B_TRUE;
- }
-
- if (support_unknown_ucast && support_unknown_mcast) {
- list[i] &= EFX_FILTER_MATCH_LOC_MAC_IG;
- break;
- }
- }
-
return (0);
fail2:
EFX_FILTER_MATCH_OUTER_VID = 0x0100, /* Match by outer VLAN ID */
EFX_FILTER_MATCH_IP_PROTO = 0x0200, /* Match by IP transport
* protocol */
- EFX_FILTER_MATCH_LOC_MAC_IG = 0x0400, /* Match by local MAC address
- * I/G bit. Used for RX default
- * unicast and multicast/
- * broadcast filters. */
+ /* Match otherwise-unmatched multicast and broadcast packets */
+ EFX_FILTER_MATCH_UNKNOWN_MCAST_DST = 0x40000000,
+ /* Match otherwise-unmatched unicast packets */
+ EFX_FILTER_MATCH_UNKNOWN_UCAST_DST = 0x80000000,
} efx_filter_match_flags_t;
typedef enum efx_filter_priority_s {
*/
typedef struct efx_filter_spec_s {
- uint32_t efs_match_flags:12;
+ uint32_t efs_match_flags;
uint32_t efs_priority:2;
uint32_t efs_flags:6;
uint32_t efs_dmaq_id:12;
const efx_filter_ops_t *efop;
efx_rc_t rc;
- /* Check that efx_filter_spec_t is 64 bytes. */
- EFX_STATIC_ASSERT(sizeof (efx_filter_spec_t) == 64);
-
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_FILTER));
{
EFSYS_ASSERT3P(spec, !=, NULL);
- spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC_IG;
+ spec->efs_match_flags |= EFX_FILTER_MATCH_UNKNOWN_UCAST_DST;
return (0);
}
{
EFSYS_ASSERT3P(spec, !=, NULL);
- spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC_IG;
- spec->efs_loc_mac[0] = 1;
+ spec->efs_match_flags |= EFX_FILTER_MATCH_UNKNOWN_MCAST_DST;
return (0);
}