~ [ source navigation ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/powerpc/nx-gzip/

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Name Size Last modified (GMT) Description
Back Parent directory 2024-10-29 14:06:28
Folder include/ 2024-10-29 14:06:28
File 99-nx-gzip.rules 52 bytes 2024-10-29 14:06:28
File Makefile 197 bytes 2024-10-29 14:06:28
File README 1554 bytes 2024-10-29 14:06:28
C file gunz_test.c 28085 bytes 2024-10-29 14:06:28
C file gzfht_test.c 10968 bytes 2024-10-29 14:06:28
C file gzip_vas.c 6416 bytes 2024-10-29 14:06:28
File nx-gzip-test.sh 647 bytes 2024-10-29 14:06:28

  1 Test the nx-gzip function:
  2 =========================
  3 
  4 Verify that following device exists:
  5   /dev/crypto/nx-gzip
  6 If you get a permission error run as sudo or set the device permissions:
  7    sudo chmod go+rw /dev/crypto/nx-gzip
  8 However, chmod may not survive across boots. You may create a udev file such
  9 as:
 10    /etc/udev/rules.d/99-nx-gzip.rules
 11 
 12 
 13 To manually build and run:
 14 $ gcc -O3 -I./include -o gzfht_test gzfht_test.c gzip_vas.c
 15 $ gcc -O3 -I./include -o gunz_test gunz_test.c gzip_vas.c
 16 
 17 
 18 Compress any file using Fixed Huffman mode. Output will have a .nx.gz suffix:
 19 $ ./gzfht_test gzip_vas.c
 20 file gzip_vas.c read, 6413 bytes
 21 compressed 6413 to 3124 bytes total, crc32 checksum = abd15e8a
 22 
 23 
 24 Uncompress the previous output. Output will have a .nx.gunzip suffix:
 25 ./gunz_test gzip_vas.c.nx.gz
 26 gzHeader FLG 0
 27 00 00 00 00 04 03
 28 gzHeader MTIME, XFL, OS ignored
 29 computed checksum abd15e8a isize 0000190d
 30 stored   checksum abd15e8a isize 0000190d
 31 decomp is complete: fclose
 32 
 33 
 34 Compare two files:
 35 $ sha1sum gzip_vas.c.nx.gz.nx.gunzip gzip_vas.c
 36 bf43e3c0c3651f5f22b6f9784cd9b1eeab4120b6  gzip_vas.c.nx.gz.nx.gunzip
 37 bf43e3c0c3651f5f22b6f9784cd9b1eeab4120b6  gzip_vas.c
 38 
 39 
 40 Note that the code here are intended for testing the nx-gzip hardware function.
 41 They are not intended for demonstrating performance or compression ratio.
 42 By being simplistic these selftests expect to allocate the entire set of source
 43 and target pages in the memory so it needs enough memory to work.
 44 For more information and source code consider using:
 45 https://github.com/libnxz/power-gzip

~ [ source navigation ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php