def METHOD_NAME(self, dp):
    """
    For direction OUT:
        add flow with learn action(which will add a rule matching on UE
        mac_addr in a scratch table, that will load the necessary
        gre infomration for the incoming(direction IN) flow)
    For direction IN:
        Will get forwarded to the scratch table and matched on the flow
            from the learn action
        Finally will get forwarded to the next table
    """
    parser = dp.ofproto_parser
    # Add a learn action that will match on UE mac, and:
    #   load gre tun_id, swap and load gre tun src and gre tun dst mac
    # Example learned flow:
    #   reg1=0x10,dl_dst=aa:29:3e:95:64:40
    #   actions=load:0x1389->NXM_NX_TUN_ID[0..31],
    #           load:0xc0a84666->NXM_NX_TUN_IPV4_DST[],
    #           load:0xc0a84665->NXM_NX_TUN_IPV4_SRC[]
    #
    outbound_match = MagmaMatch(direction=Direction.OUT)
    actions = [
        parser.NXActionLearn(
            table_id=self.tunnel_learn_scratch,
            priority=flows.DEFAULT_PRIORITY,
            specs=[
                parser.NXFlowSpecMatch(
                    src=('eth_src_nxm', 0),
                    dst=('eth_dst_nxm', 0),
                    n_bits=48,
                ),
                parser.NXFlowSpecMatch(
                    src=Direction.IN,
                    dst=(DIRECTION_REG, 0),
                    n_bits=32,
                ),
                parser.NXFlowSpecLoad(
                    src=('tun_ipv4_src', 0),
                    dst=('tun_ipv4_dst', 0),
                    n_bits=32,
                ),
                # TODO This might be getting overwritten by the IP stack,
                # check if its required
                parser.NXFlowSpecLoad(
                    src=('tun_ipv4_dst', 0),
                    dst=('tun_ipv4_src', 0),
                    n_bits=32,
                ),
            ],
        ),
    ]
    flows.add_resubmit_next_service_flow(
        dp, self.tbl_num,
        outbound_match, actions,
        priority=flows.MINIMUM_PRIORITY,
        resubmit_table=self.next_table,
    )
    # The inbound match will first send packets to the scratch table,
    # where global registers will be set and the packet will be dropped
    # Then the final action will send packet down the pipelined(with the
    # necessary tunnel information loaded from the scratch table)
    inbound_match = MagmaMatch(direction=Direction.IN)
    actions = [
        parser.NXActionResubmitTable(table_id=self.tunnel_learn_scratch),
    ]
    flows.add_resubmit_next_service_flow(
        dp, self.tbl_num,
        inbound_match, actions,
        priority=flows.MINIMUM_PRIORITY,
        resubmit_table=self.next_table,
    )