EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FILTER_OP_V3_IN_LEN,
MC_CMD_FILTER_OP_EXT_OUT_LEN);
efx_filter_match_flags_t match_flags;
+ uint32_t port_id;
efx_rc_t rc;
req.emr_cmd = MC_CMD_FILTER_OP;
req.emr_out_length = MC_CMD_FILTER_OP_EXT_OUT_LEN;
/*
- * Remove match flag for encapsulated filters that does not correspond
+ * Remove EFX match flags that do not correspond
* to the MCDI match flags
*/
match_flags = spec->efs_match_flags & ~EFX_FILTER_MATCH_ENCAP_TYPE;
+ match_flags &= ~EFX_FILTER_MATCH_MPORT;
switch (filter_op) {
case MC_CMD_FILTER_OP_IN_OP_REPLACE:
goto fail1;
}
- MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_PORT_ID, enp->en_vport_id);
+ if (spec->efs_match_flags & EFX_FILTER_MATCH_MPORT)
+ port_id = spec->efs_ingress_mport;
+ else
+ port_id = enp->en_vport_id;
+
+ MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_PORT_ID, port_id);
MCDI_IN_SET_DWORD(req, FILTER_OP_EXT_IN_MATCH_FIELDS,
match_flags);
if (spec->efs_dmaq_id == EFX_FILTER_SPEC_RX_DMAQ_ID_DROP) {
#define EFX_FILTER_MATCH_OUTER_VID 0x00000100
/* Match by IP transport protocol */
#define EFX_FILTER_MATCH_IP_PROTO 0x00000200
+/* Match by ingress MPORT */
+#define EFX_FILTER_MATCH_MPORT 0x00000400
/* Match by VNI or VSID */
#define EFX_FILTER_MATCH_VNI_OR_VSID 0x00000800
/* For encapsulated packets, match by inner frame local MAC address */
efx_oword_t efs_loc_host;
uint8_t efs_vni_or_vsid[EFX_VNI_OR_VSID_LEN];
uint8_t efs_ifrm_loc_mac[EFX_MAC_ADDR_LEN];
+ uint32_t efs_ingress_mport;
} efx_filter_spec_t;