Skip to content
Snippets Groups Projects
  1. Mar 24, 2010
    • Lubos Slovak's avatar
      Folder structure fixed. · b0048730
      Lubos Slovak authored
      b0048730
    • Lubos Slovak's avatar
      Branch for main development + reorganized files. · eba9bb58
      Lubos Slovak authored
      An actual (working) development version should be always in this
        branch.
      For subtasks, new branches will be created. For now all the old
        files are here, although this is actually a subtask. Later,
        we will remove all the old code from this branch and move it to
        some other branch.
      The master branch should be used for working or stable versions.
      
      Added .gitignore file.
      Created basic directory structure for the project and changed
        Makefile accordingly.
      Added QtCreator project files (CuteDNS.*).
      eba9bb58
  2. Mar 22, 2010
    • Lubos Slovak's avatar
      Hashing loop check fixed. Rehashing working. · 5fd4ebc1
      Lubos Slovak authored
      ck_check_used2() renamed to ck_check_used() as the previous
        function of this name was of no use.
      Added ck_check_used_twice() which checks if some position was used
        twice druing a rehash - only after using a position twice can we
        assume that an infinite loop occured
        (can we or is it only a heuristic?)
      Rehashing probably working in a basic setup and with no locks.
        (Need to add: item locks, using both hashing functions in
           lookup function, switching the generation after half the table
           is rehashed, etc.)
      5fd4ebc1
    • Lubos Slovak's avatar
      Removed item rwlocks implementation. · 28adf6f2
      Lubos Slovak authored
      This was not a feasible way to lock the items
        - there was no way to atomically acquire the lock and save
          the information to the structure.
      Consider using some totally diffrent technique - copy-on-write,
        RCU, etc.
      28adf6f2
  3. Mar 19, 2010
    • Lubos Slovak's avatar
      Item rwlocks bugfixes and changes. · a1e0eef3
      Lubos Slovak authored
      Bugfix: assumed the first free place is after all locks.
      Now using counter to keep tracks of threads waiting for lock.
      STILL NOT FUNCTIONAL! (not tested, but the idea is wrong)
      a1e0eef3
    • Lubos Slovak's avatar
      Minor changes and bugfixes. · b29b888b
      Lubos Slovak authored
      Bugfixes in ck_hash_item().
      Completed ck_rehash() (rehashing of items from 2nd table).
      No locks are used for rehashing yet.
      Bug not fixed: detection of infinite loop in hashing is not correct.
      b29b888b
  4. Mar 16, 2010
    • Lubos Slovak's avatar
      Item rwlocks standalone implementation. · b1d56130
      Lubos Slovak authored
      Added structure irwl_table which holds table of locks (type
        irwl_lock) of arbitrary items identified by a pointer.
      Implemented read locking, write locking, unlocking, creation
        and destruction of the structure.
      Implementation uses mutex associated with the table to prevent
        race conditions while locking/unlocking.
      b1d56130
    • Lubos Slovak's avatar
      Code refactoring. · 32321fb2
      Lubos Slovak authored
      Function main() moved to new file main.c.
      Bitset test moved to new files test.[ch].
      Tests related to cuckoo table remain in cuckoo-test.[ch].
      Removed rwlocks from ck_hash_table (will be replaced by standalone
        item lock implementation).
      32321fb2
  5. Mar 12, 2010
  6. Mar 09, 2010
    • Lubos Slovak's avatar
      Bugfixes. · 2358741b
      Lubos Slovak authored
      Buffer was not used (wrong check).
      Item which caused error in insertion (infinite loop while buffer
        full) was being deleted in the test function even though it
        may have been inserted into the table. (This was causing the
        invalid pointer error.)
      Simplified ck_insert_item().
      2358741b
  7. Mar 08, 2010
    • Lubos Slovak's avatar
      Some refactoring & debugging stuff (still 1 bug). · bc0b9fe9
      Lubos Slovak authored
      A lot of macros in cuckoo-hash-table.c replaced by constants and
        static inline functions.
      Some debug output added.
      dns-simple: RDATA is now allocated separately, not together with
        RR.
      There is some bug, probably in hash table insertion, resulting
        in "Invalid pointer" error when destroying certain item in hash
        table.
      bc0b9fe9
    • Lubos Slovak's avatar
      Memory issues fixed + minor changes the hash table · 1785a053
      Lubos Slovak authored
      Added "generation" to hash table items and proper methods, hash counting, etc.
      Added checks for NULL pointers when deleting items from table.
      Fixed dnss_destroy_rr() (deleting RDATA twice).
      Minor changes and fixes.
      Universal system's functions moved to .c file.
      1785a053
  8. Mar 05, 2010
    • Lubos Slovak's avatar
      Bugfix in file parsing. · cefa1458
      Lubos Slovak authored
      cefa1458
    • Lubos Slovak's avatar
      256390eb
    • Lubos Slovak's avatar
      Memory leaks and problems fixed. API modifications · 5f8abd67
      Lubos Slovak authored
      All items are now properly created, copied and destroyed.
        (too much copying - should avoid in later development)
      
      Modified API of dns-simple 'library':
        Added destructors which take ** to the object
          and are setting the pointer to NULL.
        dnss_dname_to_wire() now takes the position and allocated size as parameters.
        dnss_create_response(), dnss_create_error_response() and dnss_wire_format()
          now all return errors as appropriate.
      
      Fixed copying issues in dns-simple 'library':
        Questions and RRs are now copied entirely, not just pointers.
          (See functions dnss_copy_questions() and dnss_copy_rrs().)
        Added some checks for NULL-pointers when deallocating.
      
      Added pointer to hash table item destructor function to the hash table.
      
      ck_destroy_table() rewritten to destroy individual items in the table and buffer.
      
      A lot of checks added (mostly for result of malloc).
      
      Redundant and old code removed.
      5f8abd67
  9. Mar 03, 2010
  10. Mar 02, 2010
  11. Mar 01, 2010
    • Lubos Slovak's avatar
      Test now inserts RR into the hash table. · 86a470cd
      Lubos Slovak authored
      Creating default A RRs with dummy address (loopback), this has no implications
        on performance testing.
      Fixed some bugs in dns-simple.
      Added header common.h to contain common typedefs, constants and macros.
      More consistent debug messages (better #ifdefs)
      86a470cd
    • Lubos Slovak's avatar
      Completed DNS functions & fixes to comply with C99 · 9540d1d8
      Lubos Slovak authored
      Removed read_domain_names() and test_lookup() functions.
      Added dnss_wire_format(), dnss_dname_to_wire() and dnss_parse_query().
      Many functions in universal-system.h and bitset.h not inline any more
        (should check it later and find a way to make them inline).
      9540d1d8
  12. Feb 28, 2010
    • Lubos Slovak's avatar
      First commit - server with cuckoo hash prototype · 2da03d5d
      Lubos Slovak authored
      Classic (2-ary) cuckoo hash table with char* keys.
        (Insert, find, delete implemented.)
      Simple bitset (not used right now).
      Several hash functions downloaded from web.
      Universal system of hash functions (according to J. Katajainen & M. Lykke
        of University of Copenhagen).
      Several basic data structures for DNS data - not finished yet.
      2da03d5d