}
 EXPORT_SYMBOL_GPL(ocelot_port_del_dscp_prio);
 
-static struct ocelot_mirror *ocelot_mirror_get(struct ocelot *ocelot, int to,
-                                              struct netlink_ext_ack *extack)
+struct ocelot_mirror *ocelot_mirror_get(struct ocelot *ocelot, int to,
+                                       struct netlink_ext_ack *extack)
 {
        struct ocelot_mirror *m = ocelot->mirror;
 
        return m;
 }
 
-static void ocelot_mirror_put(struct ocelot *ocelot)
+void ocelot_mirror_put(struct ocelot *ocelot)
 {
        struct ocelot_mirror *m = ocelot->mirror;
 
 
                    void (*populate)(struct ocelot_vcap_filter *f));
 int ocelot_trap_del(struct ocelot *ocelot, int port, unsigned long cookie);
 
+struct ocelot_mirror *ocelot_mirror_get(struct ocelot *ocelot, int to,
+                                       struct netlink_ext_ack *extack);
+void ocelot_mirror_put(struct ocelot *ocelot);
+
 extern struct notifier_block ocelot_netdevice_nb;
 extern struct notifier_block ocelot_switchdev_nb;
 extern struct notifier_block ocelot_switchdev_blocking_nb;
 
                        filter->action.port_mask = BIT(egress_port);
                        filter->type = OCELOT_VCAP_FILTER_OFFLOAD;
                        break;
+               case FLOW_ACTION_MIRRED:
+                       if (filter->block_id != VCAP_IS2) {
+                               NL_SET_ERR_MSG_MOD(extack,
+                                                  "Mirror action can only be offloaded to VCAP IS2");
+                               return -EOPNOTSUPP;
+                       }
+                       if (filter->goto_target != -1) {
+                               NL_SET_ERR_MSG_MOD(extack,
+                                                  "Last action must be GOTO");
+                               return -EOPNOTSUPP;
+                       }
+                       egress_port = ocelot->ops->netdev_to_port(a->dev);
+                       if (egress_port < 0) {
+                               NL_SET_ERR_MSG_MOD(extack,
+                                                  "Destination not an ocelot port");
+                               return -EOPNOTSUPP;
+                       }
+                       filter->egress_port.value = egress_port;
+                       filter->action.mirror_ena = true;
+                       filter->type = OCELOT_VCAP_FILTER_OFFLOAD;
+                       break;
                case FLOW_ACTION_VLAN_POP:
                        if (filter->block_id != VCAP_IS1) {
                                NL_SET_ERR_MSG_MOD(extack,
 
 
        vcap_action_set(vcap, data, VCAP_IS2_ACT_MASK_MODE, a->mask_mode);
        vcap_action_set(vcap, data, VCAP_IS2_ACT_PORT_MASK, a->port_mask);
+       vcap_action_set(vcap, data, VCAP_IS2_ACT_MIRROR_ENA, a->mirror_ena);
        vcap_action_set(vcap, data, VCAP_IS2_ACT_POLICE_ENA, a->police_ena);
        vcap_action_set(vcap, data, VCAP_IS2_ACT_POLICE_IDX, a->pol_ix);
        vcap_action_set(vcap, data, VCAP_IS2_ACT_CPU_QU_NUM, a->cpu_qu_num);
                                     struct ocelot_vcap_filter *filter,
                                     struct netlink_ext_ack *extack)
 {
+       struct ocelot_mirror *m;
        int ret;
 
+       if (filter->block_id == VCAP_IS2 && filter->action.mirror_ena) {
+               m = ocelot_mirror_get(ocelot, filter->egress_port.value,
+                                     extack);
+               if (IS_ERR(m))
+                       return PTR_ERR(m);
+       }
+
        if (filter->block_id == VCAP_IS2 && filter->action.police_ena) {
                ret = ocelot_vcap_policer_add(ocelot, filter->action.pol_ix,
                                              &filter->action.pol);
 {
        if (filter->block_id == VCAP_IS2 && filter->action.police_ena)
                ocelot_vcap_policer_del(ocelot, filter->action.pol_ix);
+
+       if (filter->block_id == VCAP_IS2 && filter->action.mirror_ena)
+               ocelot_mirror_put(ocelot);
 }
 
 static int ocelot_vcap_filter_add_to_block(struct ocelot *ocelot,
 
                        enum ocelot_mask_mode mask_mode;
                        unsigned long port_mask;
                        bool police_ena;
+                       bool mirror_ena;
                        struct ocelot_policer pol;
                        u32 pol_ix;
                };
        unsigned long ingress_port_mask;
        /* For VCAP ES0 */
        struct ocelot_vcap_port ingress_port;
+       /* For VCAP IS2 mirrors and ES0 */
        struct ocelot_vcap_port egress_port;
 
        enum ocelot_vcap_bit dmac_mc;