Sync: merge r215141 through r215188 from ^/head.
This commit is contained in:
commit
5fbbc222c8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/binutils-2.17/; revision=215189
@ -14,6 +14,10 @@
|
||||
# The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
|
||||
#
|
||||
|
||||
# 20101112: vgonel(9) has gone to private API a while ago
|
||||
OLD_FILES+=usr/share/man/man9/vgonel.9.gz
|
||||
# 20101112: removed gasp.info
|
||||
OLD_FILES+=usr/share/info/gasp.info.gz
|
||||
# 20101109: headers moved to machine/ to x86/
|
||||
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386"
|
||||
OLD_FILES+=usr/include/machine/mptable.h
|
||||
|
7
UPDATING
7
UPDATING
@ -22,6 +22,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW:
|
||||
machines to maximize performance. (To disable malloc debugging, run
|
||||
ln -s aj /etc/malloc.conf.)
|
||||
|
||||
20101111:
|
||||
The TCP stack has received a significant update to add support for
|
||||
modularised congestion control and generally improve the clarity of
|
||||
congestion control decisions. Bump __FreeBSD_version to 900025. User
|
||||
space tools that rely on the size of struct tcpcb in tcp_var.h (e.g.
|
||||
sockstat) need to be recompiled.
|
||||
|
||||
20101002:
|
||||
The man(1) utility has been replaced by a new version that no longer
|
||||
uses /etc/manpath.config. Please consult man.conf(5) for how to
|
||||
|
@ -1,114 +0,0 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
.\" This code is derived from software contributed to Berkeley by
|
||||
.\" Kenneth Almquist.
|
||||
.\" Copyright 1989 by Kenneth Almquist
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\" 4. Neither the name of the University nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)echo.1 8.2 (Berkeley) 5/4/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd May 4, 1995
|
||||
.Dt ECHO 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm echo
|
||||
.Nd produce message in a shell script
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl n | Fl e
|
||||
.Ar args...
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
utility prints its arguments on the standard output, separated by spaces.
|
||||
Unless the
|
||||
.Fl n
|
||||
option is present, a newline is output following the arguments.
|
||||
The
|
||||
.Fl e
|
||||
option causes
|
||||
.Nm
|
||||
to treat the escape sequences specially, as described in the following
|
||||
paragraph.
|
||||
The
|
||||
.Fl e
|
||||
option is the default, and is provided solely for compatibility with
|
||||
other systems.
|
||||
Only one of the options
|
||||
.Fl n
|
||||
and
|
||||
.Fl e
|
||||
may be given.
|
||||
.Pp
|
||||
If any of the following sequences of characters is encountered during
|
||||
output, the sequence is not output.
|
||||
Instead, the specified action is
|
||||
performed:
|
||||
.Bl -tag -width indent
|
||||
.It Li \eb
|
||||
A backspace character is output.
|
||||
.It Li \ec
|
||||
Subsequent output is suppressed.
|
||||
This is normally used at the end of the
|
||||
last argument to suppress the trailing newline that
|
||||
.Nm
|
||||
would otherwise output.
|
||||
.It Li \ef
|
||||
Output a form feed.
|
||||
.It Li \en
|
||||
Output a newline character.
|
||||
.It Li \er
|
||||
Output a carriage return.
|
||||
.It Li \et
|
||||
Output a (horizontal) tab character.
|
||||
.It Li \ev
|
||||
Output a vertical tab.
|
||||
.It Li \e0 Ns Ar digits
|
||||
Output the character whose value is given by zero to three digits.
|
||||
If there are zero digits, a
|
||||
.Dv NUL
|
||||
character is output.
|
||||
.It Li \e\e
|
||||
Output a backslash.
|
||||
.El
|
||||
.Sh HINTS
|
||||
Remember that backslash is special to the shell and needs to be escaped.
|
||||
To output a message to standard error, say
|
||||
.Pp
|
||||
.D1 echo message >&2
|
||||
.Sh BUGS
|
||||
The octal character escape mechanism
|
||||
.Pq Li \e0 Ns Ar digits
|
||||
differs from the
|
||||
C language mechanism.
|
||||
.Pp
|
||||
There is no way to force
|
||||
.Nm
|
||||
to treat its arguments literally, rather than interpreting them as
|
||||
options and escape sequences.
|
17
bin/sh/sh.1
17
bin/sh/sh.1
@ -32,7 +32,7 @@
|
||||
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 31, 2010
|
||||
.Dd November 12, 2010
|
||||
.Dt SH 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -65,20 +65,13 @@ The
|
||||
utility is the standard command interpreter for the system.
|
||||
The current version of
|
||||
.Nm
|
||||
is in the process of being changed to
|
||||
conform with the
|
||||
.St -p1003.2
|
||||
is close to the
|
||||
.St -p1003.1
|
||||
specification for the shell.
|
||||
This version has many features which make
|
||||
it appear
|
||||
similar in some respects to the Korn shell, but it is not a Korn
|
||||
shell clone like
|
||||
.Nm pdksh .
|
||||
Only features
|
||||
It only supports features
|
||||
designated by
|
||||
.Tn POSIX ,
|
||||
plus a few Berkeley extensions, are being
|
||||
incorporated into this shell.
|
||||
plus a few Berkeley extensions.
|
||||
This man page is not intended to be a tutorial nor a complete
|
||||
specification of the shell.
|
||||
.Ss Overview
|
||||
|
@ -80,10 +80,12 @@ n or # - change number of processes to display\n", stdout);
|
||||
#ifdef ORDER
|
||||
if (displaymode == DISP_CPU)
|
||||
fputs("\
|
||||
o - specify sort order (pri, size, res, cpu, time, threads)\n", stdout);
|
||||
o - specify sort order (pri, size, res, cpu, time, threads, jid)\n",
|
||||
stdout);
|
||||
else
|
||||
fputs("\
|
||||
o - specify sort order (vcsw, ivcsw, read, write, fault, total)\n", stdout);
|
||||
o - specify sort order (vcsw, ivcsw, read, write, fault, total, jid)\n",
|
||||
stdout);
|
||||
#endif
|
||||
fputs("\
|
||||
r - renice a process\n\
|
||||
|
@ -1,3 +1,114 @@
|
||||
commit e45929260cd902036efd40c5610a8d0a50d5712b
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Sat Oct 23 17:25:52 2010 +0300
|
||||
|
||||
Build: Fix mydist rule when .git doesn't exist.
|
||||
|
||||
commit 6e1326fcdf6b6209949be57cfe3ad4b781b65168
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Sat Oct 23 14:15:35 2010 +0300
|
||||
|
||||
Add NEWS for 5.0.0.
|
||||
|
||||
commit b667a3ef6338a2c1db7b7706b1f6c99ea392221c
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Sat Oct 23 14:02:53 2010 +0300
|
||||
|
||||
Bump version to 5.0.0 and liblzma version-info to 5:0:0.
|
||||
|
||||
commit 8c947e9291691629714dafb4536c718b6cc24fbd
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Sat Oct 23 12:30:54 2010 +0300
|
||||
|
||||
liblzma: Make lzma_code() check the reserved members in lzma_stream.
|
||||
|
||||
If any of the reserved members in lzma_stream are non-zero
|
||||
or non-NULL, LZMA_OPTIONS_ERROR is returned. It is possible
|
||||
that a new feature in the future is indicated by just setting
|
||||
a reserved member to some other value, so the old liblzma
|
||||
version need to catch it as an unsupported feature.
|
||||
|
||||
commit e61d85e082743ebd2dd0ff28fc0a82482ede0538
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Sat Oct 23 12:26:33 2010 +0300
|
||||
|
||||
Windows: Use MinGW's stdio functions.
|
||||
|
||||
The non-standard ones from msvcrt.dll appear to work
|
||||
most of the time with XZ Utils, but there are some
|
||||
corner cases where things may go very wrong. So it's
|
||||
good to use the better replacements provided by
|
||||
MinGW(-w64) runtime.
|
||||
|
||||
commit 23e23f1dc029146714c9a98313ab3ea93d71a2fc
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Sat Oct 23 12:21:32 2010 +0300
|
||||
|
||||
liblzma: Use 512 as INDEX_GROUP_SIZE.
|
||||
|
||||
This lets compiler use shifting instead of 64-bit division.
|
||||
|
||||
commit 613939fc82603b75b59eee840871a05bc8dd08e0
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Sat Oct 23 12:20:11 2010 +0300
|
||||
|
||||
liblzma: A few ABI tweaks to reserve space in structures.
|
||||
|
||||
commit 68b83f252df3d27480a9f6f03445d16f6506fef1
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Thu Oct 21 23:16:11 2010 +0300
|
||||
|
||||
xz: Make sure that message_strm() can never return NULL.
|
||||
|
||||
commit d09c5753e33ff96ee57edb6d1e98e34041203695
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Thu Oct 21 23:06:31 2010 +0300
|
||||
|
||||
liblzma: Update the comments in the API headers.
|
||||
|
||||
Adding support for LZMA_FINISH for Index encoding and
|
||||
decoding needed tiny additions to the relevant .c files too.
|
||||
|
||||
commit 33c1c0e102eb529588503b8beea0903a45488fad
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Tue Oct 19 12:08:30 2010 +0300
|
||||
|
||||
Update INSTALL.generic.
|
||||
|
||||
commit 0076e03641f201c4b77dddd5a6db5880be19a78c
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Tue Oct 19 11:44:37 2010 +0300
|
||||
|
||||
Clean up a few FIXMEs and TODOs.
|
||||
|
||||
lzma_chunk_size() was commented out because it is
|
||||
currently useless.
|
||||
|
||||
commit ce34ec4f54ff8b753da236f371ad8dd23c8135c9
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Tue Oct 19 10:21:08 2010 +0300
|
||||
|
||||
Update docs.
|
||||
|
||||
commit f0fa880d247e73264d2c04fe31fb3412318a0026
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Tue Oct 12 15:13:30 2010 +0300
|
||||
|
||||
xz: Avoid raise() also on OpenVMS.
|
||||
|
||||
This is similar to DOS/DJGPP that killing the program
|
||||
with a signal will print a backtrace or a similar message.
|
||||
|
||||
commit ac462b1c47c451f5c62e428306314c4bdad8ae7f
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Mon Oct 11 21:26:19 2010 +0300
|
||||
|
||||
xz: Avoid SA_RESTART for portability reasons.
|
||||
|
||||
SA_RESTART is not as portable as I had hoped. It's missing
|
||||
at least from OpenVMS, QNX, and DJGPP). Luckily we can do
|
||||
fine without SA_RESTART.
|
||||
|
||||
commit d52b411716a614c202e89ba732492efb9916cd3f
|
||||
Author: Lasse Collin <lasse.collin@tukaani.org>
|
||||
Date: Sun Oct 10 17:58:58 2010 +0300
|
||||
|
@ -18,15 +18,20 @@ Known bugs
|
||||
|
||||
XZ Utils compress some files significantly worse than LZMA Utils.
|
||||
This is due to faster compression presets used by XZ Utils, and
|
||||
can be worked around by using "xz --extreme". However, the presets
|
||||
need some tweaking and maybe this issue can be minimized without
|
||||
making the typical case too much slower.
|
||||
can often be worked around by using "xz --extreme". With some files
|
||||
--extreme isn't enough though: it's most likely with files that
|
||||
compress extremely well, so going from compression ratio of 0.003
|
||||
to 0.004 means big relative increase in the compressed file size.
|
||||
|
||||
xz doesn't quote unprintable characters when it displays file names
|
||||
given on the command line.
|
||||
|
||||
tuklib_exit() doesn't block signals => EINTR is possible.
|
||||
|
||||
SIGTSTP is not handled. If xz is stopped, the estimated remaining
|
||||
time and calculated (de)compression speed won't make sense in the
|
||||
progress indicator (xz --verbose).
|
||||
|
||||
|
||||
Missing features
|
||||
----------------
|
||||
@ -41,11 +46,13 @@ Missing features
|
||||
Buffer-to-buffer coding could use less RAM (especially when
|
||||
decompressing LZMA1 or LZMA2).
|
||||
|
||||
I/O library is not implemented. It will possibly be named libzzf.
|
||||
I/O library is not implemented (similar to gzopen() in zlib).
|
||||
It will be a separate library that supports uncompressed, .gz,
|
||||
.bz2, .lzma, and .xz files.
|
||||
|
||||
lzma_strerror() to convert lzma_ret to human readable form?
|
||||
This is tricky, because the same error codes are used with
|
||||
slightly different meanings.
|
||||
slightly different meanings, and this cannot be fixed anymore.
|
||||
|
||||
|
||||
Documentation
|
||||
|
@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-utils\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 18:33+0200\n"
|
||||
"POT-Creation-Date: 2010-10-23 17:48+0300\n"
|
||||
"PO-Revision-Date: 2010-09-17 18:54+0200\n"
|
||||
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
|
||||
"Language-Team: Czech <diskuze@lists.l10n.cz>\n"
|
||||
@ -30,8 +30,7 @@ msgstr "%s: Neznámý typ kontroly integrity"
|
||||
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr ""
|
||||
"Spolu s přepínači „--files“ nebo „--files0“ může být zadán pouze jeden soubor"
|
||||
msgstr "Spolu s přepínači „--files“ nebo „--files0“ může být zadán pouze jeden soubor"
|
||||
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
@ -52,8 +51,7 @@ msgstr "Použití přednastavení v režimu raw je nevhodné."
|
||||
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr ""
|
||||
"Přesné volby u přednastavení se mohou lišit mezi různými verzemi softwaru."
|
||||
msgstr "Přesné volby u přednastavení se mohou lišit mezi různými verzemi softwaru."
|
||||
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
@ -74,12 +72,8 @@ msgstr "Dekomprimace bude vyžadovat %s MiB paměti."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the "
|
||||
"memory usage limit of %s MiB"
|
||||
msgstr ""
|
||||
"Přizpůsobit velikost slovníku LZMA%c z %s MiB na %s MiB, tak aby nebylo "
|
||||
"překročeno omezení použitelné paměti %s MiB"
|
||||
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Přizpůsobit velikost slovníku LZMA%c z %s MiB na %s MiB, tak aby nebylo překročeno omezení použitelné paměti %s MiB"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
@ -159,8 +153,7 @@ msgstr "%s: Selhalo zavření souboru: %s"
|
||||
#: src/xz/file_io.c:762 src/xz/file_io.c:946
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr ""
|
||||
"%s: Selhalo nastavení pozice při pokusu o vytvoření záložního souboru: %s"
|
||||
msgstr "%s: Selhalo nastavení pozice při pokusu o vytvoření záložního souboru: %s"
|
||||
|
||||
#: src/xz/file_io.c:821
|
||||
#, c-format
|
||||
@ -319,12 +312,10 @@ msgstr " Zarovnání proudu: %s\n"
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize "
|
||||
"UncompSize Ratio Check Padding"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
" Proudy:\n"
|
||||
" Proud Bloky KomprPozice NekomprPozice KomprVelikost "
|
||||
"NekomprVelikost Poměr Kontrola Zarovnání"
|
||||
" Proud Bloky KomprPozice NekomprPozice KomprVelikost NekomprVelikost Poměr Kontrola Zarovnání"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
@ -332,12 +323,10 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize "
|
||||
"UncompSize Ratio Check"
|
||||
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
" Bloky:\n"
|
||||
" Proud Blok KomprPozice NekomprPozice CelkVelikost "
|
||||
"NekomprVelikost Poměr Kontrola"
|
||||
" Proud Blok KomprPozice NekomprPozice CelkVelikost NekomprVelikost Poměr Kontrola"
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
@ -408,78 +397,69 @@ msgstr "%s: Neočekávaný konec vstupu při čtení názvů souborů"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: Null character found when reading filenames; maybe you meant to use `--"
|
||||
"files0' instead of `--files'?"
|
||||
msgstr ""
|
||||
"%s: Byl nalezen nulový znak při čtení názvů souborů; nechtěli jste náhodou "
|
||||
"použít „--files0“ místo „--files“?"
|
||||
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
|
||||
msgstr "%s: Byl nalezen nulový znak při čtení názvů souborů; nechtěli jste náhodou použít „--files0“ místo „--files“?"
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "Komprimace a dekomprimace s přepínačem --robot není zatím podporovaná."
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid ""
|
||||
"Cannot read data from standard input when reading filenames from standard "
|
||||
"input"
|
||||
msgstr ""
|
||||
"Ze standardního vstupu nelze číst data, když se ze standardního vstupu "
|
||||
"načítají názvy souborů"
|
||||
msgid "Cannot read data from standard input when reading filenames from standard input"
|
||||
msgstr "Ze standardního vstupu nelze číst data, když se ze standardního vstupu načítají názvy souborů"
|
||||
|
||||
#: src/xz/message.c:800 src/xz/message.c:844
|
||||
#: src/xz/message.c:792 src/xz/message.c:842
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Interní chyba"
|
||||
|
||||
#: src/xz/message.c:807
|
||||
#: src/xz/message.c:799
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Nelze ustanovit ovladač signálu"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
#: src/xz/message.c:808
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Žádná kontrola integrity; integrita souboru se nebude ověřovat"
|
||||
|
||||
#: src/xz/message.c:819
|
||||
#: src/xz/message.c:811
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Nepodporovaný typ kontroly integrity; integrita souboru se nebude ověřovat"
|
||||
msgstr "Nepodporovaný typ kontroly integrity; integrita souboru se nebude ověřovat"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
#: src/xz/message.c:818
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Dosaženo omezení použitelné paměti"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
#: src/xz/message.c:821
|
||||
msgid "File format not recognized"
|
||||
msgstr "Formát souboru nebyl rozpoznán"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
#: src/xz/message.c:824
|
||||
msgid "Unsupported options"
|
||||
msgstr "Nepodporovaná volba"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
#: src/xz/message.c:827
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Komprimovaná data jsou poškozená"
|
||||
|
||||
#: src/xz/message.c:838
|
||||
#: src/xz/message.c:830
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Neočekávaný konec vstupu"
|
||||
|
||||
#: src/xz/message.c:886
|
||||
#: src/xz/message.c:881
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "Je vyžadováno %s MiB paměti. Limit je %s."
|
||||
|
||||
#: src/xz/message.c:1053
|
||||
#: src/xz/message.c:1048
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Omezující filtr: %s\n"
|
||||
|
||||
#: src/xz/message.c:1063
|
||||
#: src/xz/message.c:1058
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Zkuste „%s --help“ pro více informací"
|
||||
|
||||
#: src/xz/message.c:1089
|
||||
#: src/xz/message.c:1084
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@ -490,18 +470,15 @@ msgstr ""
|
||||
"Komprimuje nebo dekomprimuje SOUBORy ve formátu xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1096
|
||||
msgid ""
|
||||
"Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Povinné argumenty pro dlouhé přepínače jsou povinné rovněž pro krátké "
|
||||
"přepínače.\n"
|
||||
#: src/xz/message.c:1091
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr "Povinné argumenty pro dlouhé přepínače jsou povinné rovněž pro krátké přepínače.\n"
|
||||
|
||||
#: src/xz/message.c:1100
|
||||
#: src/xz/message.c:1095
|
||||
msgid " Operation mode:\n"
|
||||
msgstr "Operační režim:\n"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
#: src/xz/message.c:1098
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@ -513,7 +490,7 @@ msgstr ""
|
||||
" -t, --test testovat integritu komprimovaného souboru\n"
|
||||
" -l, --list vypsat informace o souborech .xz"
|
||||
|
||||
#: src/xz/message.c:1109
|
||||
#: src/xz/message.c:1104
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@ -521,39 +498,33 @@ msgstr ""
|
||||
"\n"
|
||||
"Modifikátory operací:\n"
|
||||
|
||||
#: src/xz/message.c:1112
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files"
|
||||
msgstr ""
|
||||
" -k, --keep zachovat (nemazat) vstupní soubory\n"
|
||||
" -f, --force vynutit přepis výstupního souboru a de/komprimovat "
|
||||
"odkazy\n"
|
||||
" -c, --stdout zapisovat na standardní výstup a nemazat vstupní "
|
||||
"soubory"
|
||||
" -f, --force vynutit přepis výstupního souboru a de/komprimovat odkazy\n"
|
||||
" -c, --stdout zapisovat na standardní výstup a nemazat vstupní soubory"
|
||||
|
||||
#: src/xz/message.c:1118
|
||||
#: src/xz/message.c:1113
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline "
|
||||
"character\n"
|
||||
" filenames must be terminated with the newline character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
" --no-sparse nevytvářet při dekomprimaci záložní soubory\n"
|
||||
" -S, --suffix=.PRIP použít u komprimovaných souborů příponu „.PRIP“\n"
|
||||
" --files[=SOUBOR] číst názvy souborů, které se mají zpracovat, ze "
|
||||
"SOUBORu;\n"
|
||||
" pokud není SOUBOR zadán, čte se ze standardního "
|
||||
"vstupu;\n"
|
||||
" --files[=SOUBOR] číst názvy souborů, které se mají zpracovat, ze SOUBORu;\n"
|
||||
" pokud není SOUBOR zadán, čte se ze standardního vstupu;\n"
|
||||
" názvy souborů musí být zakončeny znakem nového řádku\n"
|
||||
" --files0[=SOUBOR] stejné jako --files, ale použít k zakončování nulový "
|
||||
"znak"
|
||||
" --files0[=SOUBOR] stejné jako --files, ale použít k zakončování nulový znak"
|
||||
|
||||
#: src/xz/message.c:1126
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@ -561,7 +532,7 @@ msgstr ""
|
||||
"\n"
|
||||
"Základní přepínače pro formát souboru a komprimaci:\n"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
#: src/xz/message.c:1123
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
@ -570,76 +541,62 @@ msgid ""
|
||||
msgstr ""
|
||||
" -F, --format=FORMÁT formát souboru k zakódování nebo dekódování; možné\n"
|
||||
" hodnoty jsou „auto“ (výchozí), „xz“, „lzma“ a „raw“\n"
|
||||
" -C, --check=KONTROLA typ kontroly integrity: „none“ (používejte s "
|
||||
"rozmyslem),\n"
|
||||
" -C, --check=KONTROLA typ kontroly integrity: „none“ (používejte s rozmyslem),\n"
|
||||
" „crc32“, „crc64“ (výchozí) nebo „sha256“"
|
||||
|
||||
#: src/xz/message.c:1135
|
||||
#: src/xz/message.c:1130
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor "
|
||||
"*and*\n"
|
||||
" decompressor memory usage into account before using "
|
||||
"7-9!"
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
msgstr ""
|
||||
" -0 .. -9 přednastavení komprimace; výchozí je 6; než "
|
||||
"použijete\n"
|
||||
" hodnoty 7 – 9, vezměte do úvahy množství použité "
|
||||
"paměti"
|
||||
" -0 .. -9 přednastavení komprimace; výchozí je 6; než použijete\n"
|
||||
" hodnoty 7 – 9, vezměte do úvahy množství použité paměti"
|
||||
|
||||
#: src/xz/message.c:1139
|
||||
#: src/xz/message.c:1134
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU "
|
||||
"time;\n"
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
" -e, --extreme zkusit zlepšit poměr komprimace využitím více času\n"
|
||||
" procesoru; nemá vliv na paměťové nároky dekomprimace"
|
||||
|
||||
#: src/xz/message.c:1144
|
||||
#: src/xz/message.c:1139
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, "
|
||||
"decompression,\n"
|
||||
" set memory usage limit for compression, decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" nastaví omezení použitelné paměti pro komprimaci,\n"
|
||||
" dekomprimaci nebo obojí; LIMIT je v bajtech, % z "
|
||||
"paměti\n"
|
||||
" dekomprimaci nebo obojí; LIMIT je v bajtech, % z paměti\n"
|
||||
" RAM nebo 0 pro výchozí"
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
#: src/xz/message.c:1146
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage "
|
||||
"limit,\n"
|
||||
" give an error instead of adjusting the settings "
|
||||
"downwards"
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
msgstr ""
|
||||
" --no-adjust pokud nastavení komprimace přesáhne omezení "
|
||||
"použitelné\n"
|
||||
" --no-adjust pokud nastavení komprimace přesáhne omezení použitelné\n"
|
||||
" paměti, předat chybu namísto snížení nastavení"
|
||||
|
||||
#: src/xz/message.c:1157
|
||||
#: src/xz/message.c:1152
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Vlastní omezující filtr pro komprimaci (alternativa k použití "
|
||||
"přednastavených):"
|
||||
"Vlastní omezující filtr pro komprimaci (alternativa k použití přednastavených):"
|
||||
|
||||
#: src/xz/message.c:1166
|
||||
#: src/xz/message.c:1161
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
|
||||
"or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; "
|
||||
"default):\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
@ -647,33 +604,24 @@ msgid ""
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; "
|
||||
"bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic "
|
||||
"(default)"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic (default)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --lzma1[=VOLBY] LZMA1 nebo LZMA2; VOLBY je čárkou oddělovaný seznam "
|
||||
"žádné\n"
|
||||
" --lzma2[=VOLBY] nebo více následujících voleb (platné hodnoty; "
|
||||
"výchozí):\n"
|
||||
" preset=PŘE změnit volby na PŘEdnastavené (0 – 9"
|
||||
"[e])\n"
|
||||
" dict=POČ velikost slovníku (4 KiB – 1536 MiB; 8 "
|
||||
"MiB)\n"
|
||||
" lc=POČ počet kontextových bitů literálu (0 – 4; "
|
||||
"3)\n"
|
||||
" lp=POČ počet pozičních bitů literálu (0 – 4; "
|
||||
"0)\n"
|
||||
" --lzma1[=VOLBY] LZMA1 nebo LZMA2; VOLBY je čárkou oddělovaný seznam žádné\n"
|
||||
" --lzma2[=VOLBY] nebo více následujících voleb (platné hodnoty; výchozí):\n"
|
||||
" preset=PŘE změnit volby na PŘEdnastavené (0 – 9[e])\n"
|
||||
" dict=POČ velikost slovníku (4 KiB – 1536 MiB; 8 MiB)\n"
|
||||
" lc=POČ počet kontextových bitů literálu (0 – 4; 3)\n"
|
||||
" lp=POČ počet pozičních bitů literálu (0 – 4; 0)\n"
|
||||
" pb=POČ počet pozičních bitů (0 – 4; 2)\n"
|
||||
" mode=REŽIM režim komprimace (fast, normal; normal)\n"
|
||||
" nice=NUM příznivá délka shody (2 – 273; 64)\n"
|
||||
" mf=NÁZEV hledání shod (hc3, hc4, bt2, bt3, bt4; "
|
||||
"bt4)\n"
|
||||
" mf=NÁZEV hledání shod (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=POČ maximální hloubka prohledávání;\n"
|
||||
" 0 = automaticky (výchozí)"
|
||||
|
||||
#: src/xz/message.c:1181
|
||||
#: src/xz/message.c:1176
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -695,7 +643,7 @@ msgstr ""
|
||||
" Platné volby pro všechny filtry BCJ:\n"
|
||||
" start=POČ počáteční posun pro převody (výchozí=0)"
|
||||
|
||||
#: src/xz/message.c:1193
|
||||
#: src/xz/message.c:1188
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@ -704,11 +652,10 @@ msgid ""
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --delta[=VOLBY] Filtr Delta; platné VOLBY (platné hodnoty; výchozí):\n"
|
||||
" dist=POČ vzdálenost mezi bajty, které jsou "
|
||||
"odečítány\n"
|
||||
" dist=POČ vzdálenost mezi bajty, které jsou odečítány\n"
|
||||
" jeden od druhého (1 – 256; 1)"
|
||||
|
||||
#: src/xz/message.c:1201
|
||||
#: src/xz/message.c:1196
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@ -716,79 +663,71 @@ msgstr ""
|
||||
"\n"
|
||||
" Ostatní přepínače:\n"
|
||||
|
||||
#: src/xz/message.c:1204
|
||||
#: src/xz/message.c:1199
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors "
|
||||
"too\n"
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
" -q, --quiet potlačit varování; zadáním dvakrát, potlačíte i "
|
||||
"chyby\n"
|
||||
" -q, --quiet potlačit varování; zadáním dvakrát, potlačíte i chyby\n"
|
||||
" -v, --verbose podrobnější zprávy; zadáním dvakrát, budou ještě\n"
|
||||
" podrobnější"
|
||||
|
||||
#: src/xz/message.c:1209
|
||||
#: src/xz/message.c:1204
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn způsobí, že varování neovlivní stav ukončení"
|
||||
|
||||
#: src/xz/message.c:1211
|
||||
msgid ""
|
||||
" --robot use machine-parsable messages (useful for scripts)"
|
||||
#: src/xz/message.c:1206
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
" --robot použít strojově analyzovatelné zprávy (užitečné pro\n"
|
||||
" skripty)"
|
||||
|
||||
#: src/xz/message.c:1214
|
||||
#: src/xz/message.c:1209
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently "
|
||||
"active\n"
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr ""
|
||||
" --info-memory zobrazit celkové množství paměti RAM a současné "
|
||||
"aktivní\n"
|
||||
" --info-memory zobrazit celkové množství paměti RAM a současné aktivní\n"
|
||||
" omezení použitelné paměti a skončit"
|
||||
|
||||
#: src/xz/message.c:1217
|
||||
#: src/xz/message.c:1212
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
msgstr ""
|
||||
" -h, --help zobrazit krátkou nápovědu (vypíše jen základní "
|
||||
"přepínače)\n"
|
||||
" -h, --help zobrazit krátkou nápovědu (vypíše jen základní přepínače)\n"
|
||||
" -H, --long-help zobrazit tuto úplnou nápovědu a skončit"
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
#: src/xz/message.c:1216
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
msgstr ""
|
||||
" -h, --help zobrazit tuto zkrácenou nápovědu a skončit\n"
|
||||
" -H, --long-help zobrazit úplnou nápovědu (vypíše i pokročilé "
|
||||
"přepínače)"
|
||||
" -H, --long-help zobrazit úplnou nápovědu (vypíše i pokročilé přepínače)"
|
||||
|
||||
#: src/xz/message.c:1226
|
||||
#: src/xz/message.c:1221
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version zobrazit číslo verze a skončit"
|
||||
|
||||
#: src/xz/message.c:1228
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Pokud SOUBOR není zadán nebo pokud je -, bude se číst ze standardního "
|
||||
"vstupu.\n"
|
||||
"Pokud SOUBOR není zadán nebo pokud je -, bude se číst ze standardního vstupu.\n"
|
||||
|
||||
#. TRANSLATORS: This message indicates the bug reporting address
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1234
|
||||
#: src/xz/message.c:1229
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr "Chyby hlaste na <%s> (v angličtině nebo finštině).\n"
|
||||
|
||||
#: src/xz/message.c:1236
|
||||
#: src/xz/message.c:1231
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Domovská stránka %s: <%s>\n"
|
||||
@ -824,11 +763,8 @@ msgstr "Vybraný vyhledávač shod vyžaduje minimálně nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:79 src/xz/suffix.c:164
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr ""
|
||||
"%s: S přepínačem --format=raw je vyžadován --sufix=.PRIP, vyjma zápisu do "
|
||||
"standardního výstupu"
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s: S přepínačem --format=raw je vyžadován --sufix=.PRIP, vyjma zápisu do standardního výstupu"
|
||||
|
||||
#: src/xz/suffix.c:99
|
||||
#, c-format
|
||||
@ -857,9 +793,7 @@ msgstr "%s: Neplatná jednotka s předponou"
|
||||
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr ""
|
||||
"Platné jednotky s předponami jsou „KiB“ (2^10 B), „MiB“ (2^20 B) a "
|
||||
"„GiB“ (2^30 B)."
|
||||
msgstr "Platné jednotky s předponami jsou „KiB“ (2^10 B), „MiB“ (2^20 B) a „GiB“ (2^30 B)."
|
||||
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
@ -893,49 +827,37 @@ msgstr "Neznámá chyba"
|
||||
#~ msgstr "%s MiB (%s bajtů)\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ " -e, --extreme use more CPU time when encoding to increase "
|
||||
#~ "compression\n"
|
||||
#~ " -e, --extreme use more CPU time when encoding to increase compression\n"
|
||||
#~ " ratio without increasing memory usage of the decoder"
|
||||
#~ msgstr ""
|
||||
#~ " -e, --extreme využít více procesorového času pro kódování, čímž "
|
||||
#~ "se\n"
|
||||
#~ " zvýší kompresní poměr bez zvýšení paměti použité "
|
||||
#~ "kodérem"
|
||||
#~ " -e, --extreme využít více procesorového času pro kódování, čímž se\n"
|
||||
#~ " zvýší kompresní poměr bez zvýšení paměti použité kodérem"
|
||||
|
||||
#~ msgid ""
|
||||
#~ " -M, --memory=NUM use roughly NUM bytes of memory at maximum; 0 "
|
||||
#~ "indicates\n"
|
||||
#~ " -M, --memory=NUM use roughly NUM bytes of memory at maximum; 0 indicates\n"
|
||||
#~ " the default setting, which is 40 % of total RAM"
|
||||
#~ msgstr ""
|
||||
#~ " -M, --memory=POČ použít zhruba POČ bajtů paměti jako maximum; 0 "
|
||||
#~ "znamená\n"
|
||||
#~ " výchozí nastavení, což je 40% celkového množství "
|
||||
#~ "paměti"
|
||||
#~ " -M, --memory=POČ použít zhruba POČ bajtů paměti jako maximum; 0 znamená\n"
|
||||
#~ " výchozí nastavení, což je 40% celkového množství paměti"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ " --subblock[=OPTS] Subblock filter; valid OPTS (valid values; "
|
||||
#~ "default):\n"
|
||||
#~ " --subblock[=OPTS] Subblock filter; valid OPTS (valid values; default):\n"
|
||||
#~ " size=NUM number of bytes of data per subblock\n"
|
||||
#~ " (1 - 256Mi; 4Ki)\n"
|
||||
#~ " rle=NUM run-length encoder chunk size (0-256; "
|
||||
#~ "0)"
|
||||
#~ " rle=NUM run-length encoder chunk size (0-256; 0)"
|
||||
#~ msgstr ""
|
||||
#~ "\n"
|
||||
#~ " --subblock[=VOLBY] Subblokový filtr; platné VOLBY (platné hodnoty; "
|
||||
#~ "výchozí):\n"
|
||||
#~ " --subblock[=VOLBY] Subblokový filtr; platné VOLBY (platné hodnoty; výchozí):\n"
|
||||
#~ " size=POČ počet bajtů dat na subblok\n"
|
||||
#~ " (1 - 256 Mi; 4 Ki)\n"
|
||||
#~ " rle=POČ velikost dávky pro kodér run-length "
|
||||
#~ "(0-256; 0)"
|
||||
#~ " rle=POČ velikost dávky pro kodér run-length (0-256; 0)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "On this system and configuration, this program will use a maximum of "
|
||||
#~ "roughly\n"
|
||||
#~ "On this system and configuration, this program will use a maximum of roughly\n"
|
||||
#~ "%s MiB RAM and "
|
||||
#~ msgstr ""
|
||||
#~ "Na tomto systému a s tímto nastavením použije tento program maximum ze "
|
||||
#~ "zhruba\n"
|
||||
#~ "Na tomto systému a s tímto nastavením použije tento program maximum ze zhruba\n"
|
||||
#~ "%s MiB RAM a "
|
||||
|
||||
#~ msgid ""
|
||||
|
@ -6,10 +6,11 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: XZ Utils 4.999.9beta\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2010-09-11 17:07+0200\n"
|
||||
"POT-Creation-Date: 2010-10-23 17:48+0300\n"
|
||||
"PO-Revision-Date: 2010-09-07 20:27+0200\n"
|
||||
"Last-Translator: <maan@systemlinux.org>\n"
|
||||
"Language-Team: German\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@ -27,8 +28,7 @@ msgstr "%s: Integritäts-Check Typ nicht unterstützt"
|
||||
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr ""
|
||||
"Nur ein file kann als Argument für --files oder --files0 angegeben werden."
|
||||
msgstr "Nur ein file kann als Argument für --files oder --files0 angegeben werden."
|
||||
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
@ -41,8 +41,7 @@ msgstr "Maximal vier Filter möglich"
|
||||
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr ""
|
||||
"Das Speicher Limit ist zu niedrig für die gegebene Filter Konfiguration."
|
||||
msgstr "Das Speicher Limit ist zu niedrig für die gegebene Filter Konfiguration."
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
@ -50,9 +49,7 @@ msgstr "Verwendung der Voreinstellung im raw Modus wird nicht empfohlen."
|
||||
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr ""
|
||||
"Die genauen Optionen der Voreinstellung können zwischen Software Versionen "
|
||||
"variieren."
|
||||
msgstr "Die genauen Optionen der Voreinstellung können zwischen Software Versionen variieren."
|
||||
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
@ -73,12 +70,8 @@ msgstr "Dekompression wird %s MiB Speicher brauchen."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the "
|
||||
"memory usage limit of %s MiB"
|
||||
msgstr ""
|
||||
"Passte LZMA%c Wörterbuch Größe von %s MiB to %s MiB an, um nicht das "
|
||||
"Speicher Nutzungslimit von %s MiB zu übersteigen"
|
||||
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Passte LZMA%c Wörterbuch Größe von %s MiB to %s MiB an, um nicht das Speicher Nutzungslimit von %s MiB zu übersteigen"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
@ -93,8 +86,7 @@ msgstr ""
|
||||
#: src/xz/file_io.c:137
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr ""
|
||||
"%s: Datei scheint umbenannt worden zu sein, daher wird sie nicht gelöscht"
|
||||
msgstr "%s: Datei scheint umbenannt worden zu sein, daher wird sie nicht gelöscht"
|
||||
|
||||
#: src/xz/file_io.c:144 src/xz/file_io.c:590
|
||||
#, c-format
|
||||
@ -149,8 +141,7 @@ msgstr "%s: Eingabedatei hat mehr als einen hard link, überspringe"
|
||||
#: src/xz/file_io.c:714
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr ""
|
||||
"Fehler beim Wiederherstellen des O_APPEND flags bei Standard Output: %s"
|
||||
msgstr "Fehler beim Wiederherstellen des O_APPEND flags bei Standard Output: %s"
|
||||
|
||||
#: src/xz/file_io.c:726
|
||||
#, c-format
|
||||
@ -160,8 +151,7 @@ msgstr "%s: Fehler beim Schießen der Datei: %s"
|
||||
#: src/xz/file_io.c:762 src/xz/file_io.c:946
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr ""
|
||||
"%s: Positionierungsfehler beim Versuch eine sparse Datei zu erzeugen: %s"
|
||||
msgstr "%s: Positionierungsfehler beim Versuch eine sparse Datei zu erzeugen: %s"
|
||||
|
||||
#: src/xz/file_io.c:821
|
||||
#, c-format
|
||||
@ -212,7 +202,7 @@ msgstr "Kein"
|
||||
#. but the Check ID is known (here 2). This and other "Unknown-N"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter.
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Unbek.2"
|
||||
@ -320,12 +310,10 @@ msgstr " Strom Auffüllung: %s\n"
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize "
|
||||
"UncompSize Ratio Check Padding"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
" Ströme:\n"
|
||||
" Strom Blöcke KompOffset UnkompOffset KompGröße "
|
||||
"UnkompGröße Verh. Check Auffüllung"
|
||||
" Strom Blöcke KompOffset UnkompOffset KompGröße UnkompGröße Verh. Check Auffüllung"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
@ -333,12 +321,10 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize "
|
||||
"UncompSize Ratio Check"
|
||||
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
" Blöcke:\n"
|
||||
" Strom Block KompOffset UnkompOffset TotalGröße "
|
||||
"UnkompGröße Verh. Check"
|
||||
" Strom Block KompOffset UnkompOffset TotalGröße UnkompGröße Verh. Check"
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
@ -390,8 +376,7 @@ msgstr " Anzahl Dateien: %s\n"
|
||||
|
||||
#: src/xz/list.c:1072
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr ""
|
||||
"--list funktioniert nur mit .xz Dateien (--format=xz oder --format=auto)"
|
||||
msgstr "--list funktioniert nur mit .xz Dateien (--format=xz oder --format=auto)"
|
||||
|
||||
#: src/xz/list.c:1078
|
||||
msgid "--list does not support reading from standard input"
|
||||
@ -409,79 +394,69 @@ msgstr "%s: Unerwartetes Ende beim Lesen der Dateinamen"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: Null character found when reading filenames; maybe you meant to use `--"
|
||||
"files0' instead of `--files'?"
|
||||
msgstr ""
|
||||
"%s: Null Charakter gefunden beim Lesen der Dateinamen; Meinten Sie `--"
|
||||
"files0' statt `--files'?"
|
||||
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
|
||||
msgstr "%s: Null Charakter gefunden beim Lesen der Dateinamen; Meinten Sie `--files0' statt `--files'?"
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "Kompression und Dekompression mit --robot ist noch nicht unterstützt."
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid ""
|
||||
"Cannot read data from standard input when reading filenames from standard "
|
||||
"input"
|
||||
msgstr ""
|
||||
"Lesen der Standardeingabe ist nicht möglich, wenn die Dateinamen auch von "
|
||||
"der Standardeingabe gelesen werden"
|
||||
msgid "Cannot read data from standard input when reading filenames from standard input"
|
||||
msgstr "Lesen der Standardeingabe ist nicht möglich, wenn die Dateinamen auch von der Standardeingabe gelesen werden"
|
||||
|
||||
#: src/xz/message.c:800 src/xz/message.c:844
|
||||
#: src/xz/message.c:792 src/xz/message.c:842
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Interner Fehler (Bug)"
|
||||
|
||||
#: src/xz/message.c:807
|
||||
#: src/xz/message.c:799
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Kann Signal Routine nicht setzen"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
#: src/xz/message.c:808
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr "Kein Integritäts-Check; werde Datei-Integrität nicht überprüfen"
|
||||
|
||||
#: src/xz/message.c:819
|
||||
#: src/xz/message.c:811
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Typ des Integritäts-Checks nicht unterstützt; werde Datei-Integrität nicht "
|
||||
"überprüfen"
|
||||
msgstr "Typ des Integritäts-Checks nicht unterstützt; werde Datei-Integrität nicht überprüfen"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
#: src/xz/message.c:818
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Speicher-Limit erreicht"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
#: src/xz/message.c:821
|
||||
msgid "File format not recognized"
|
||||
msgstr "Datei Format nicht erkannt"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
#: src/xz/message.c:824
|
||||
msgid "Unsupported options"
|
||||
msgstr "Optionen nicht unterstützt"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
#: src/xz/message.c:827
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "Komprimierte Daten sind korrupt"
|
||||
|
||||
#: src/xz/message.c:838
|
||||
#: src/xz/message.c:830
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Unerwartetes Eingabe Ende"
|
||||
|
||||
#: src/xz/message.c:886
|
||||
#: src/xz/message.c:881
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB Speicher wird benötigt. Limit ist %s."
|
||||
|
||||
#: src/xz/message.c:1053
|
||||
#: src/xz/message.c:1048
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: Filter Kette: %s\n"
|
||||
|
||||
#: src/xz/message.c:1063
|
||||
#: src/xz/message.c:1058
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Versuchen Sie `%s --help' für mehr Informationen."
|
||||
|
||||
#: src/xz/message.c:1089
|
||||
#: src/xz/message.c:1084
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@ -492,18 +467,17 @@ msgstr ""
|
||||
"Komprimiert oder dekomprimiert .xz DATEI(EN).\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1096
|
||||
msgid ""
|
||||
"Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
#: src/xz/message.c:1091
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Obligatorische Argumente für lange Optionen sind auch für kurze Optionen\n"
|
||||
"zwingend.\n"
|
||||
|
||||
#: src/xz/message.c:1100
|
||||
#: src/xz/message.c:1095
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Operationsmodus:\n"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
#: src/xz/message.c:1098
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@ -515,7 +489,7 @@ msgstr ""
|
||||
" -t, --test überprüfe Datei Integrität\n"
|
||||
" -l, --list liste Datei Informationen"
|
||||
|
||||
#: src/xz/message.c:1109
|
||||
#: src/xz/message.c:1104
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@ -523,7 +497,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Operationsmodifikatoren:\n"
|
||||
|
||||
#: src/xz/message.c:1112
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
@ -535,14 +509,13 @@ msgstr ""
|
||||
" -c, --stdout schreibe nach Standard Output und lösche nicht die\n"
|
||||
" Eingabedateien"
|
||||
|
||||
#: src/xz/message.c:1118
|
||||
#: src/xz/message.c:1113
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline "
|
||||
"character\n"
|
||||
" filenames must be terminated with the newline character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
" --no-sparse erzeuge keine sparse Datei beim Dekomprimieren\n"
|
||||
@ -551,10 +524,9 @@ msgstr ""
|
||||
" DATEI nicht angegeben wurde, werden Dateinamen\n"
|
||||
" von Standard Input gelesen. Dateinamen müssen mit\n"
|
||||
" einem Zeilenumbruch voneinander getrennt werden\n"
|
||||
" --files0=[DATEI] wie --files, aber benutze den Null Charakter als "
|
||||
"Trenner"
|
||||
" --files0=[DATEI] wie --files, aber benutze den Null Charakter als Trenner"
|
||||
|
||||
#: src/xz/message.c:1126
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@ -562,76 +534,62 @@ msgstr ""
|
||||
"\n"
|
||||
" Grundlegende Optionen für Dateiformat und Kompression:\n"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
#: src/xz/message.c:1123
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=FMT Dateiformat zur Kodierung oder Dekodierung; "
|
||||
"mögliche\n"
|
||||
" Werte sind `auto' (Voreinstellung), `xz', `lzma' "
|
||||
"und\n"
|
||||
" -F, --format=FMT Dateiformat zur Kodierung oder Dekodierung; mögliche\n"
|
||||
" Werte sind `auto' (Voreinstellung), `xz', `lzma' und\n"
|
||||
" `raw'\n"
|
||||
" -C, --check=CHECK Typ des Integritätschecks: `none' (Vorsicht), "
|
||||
"`crc32',\n"
|
||||
" -C, --check=CHECK Typ des Integritätschecks: `none' (Vorsicht), `crc32',\n"
|
||||
" `crc64' (Voreinstellung), oder `sha256'"
|
||||
|
||||
#: src/xz/message.c:1135
|
||||
#: src/xz/message.c:1130
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor "
|
||||
"*and*\n"
|
||||
" decompressor memory usage into account before using 7-"
|
||||
"9!"
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
msgstr ""
|
||||
" -0 .. -9 Kompressionseinstellung; Voreinstellung is 6. "
|
||||
"Beachten\n"
|
||||
" Sie den Speicherverbrauch des Komprimieres *und* "
|
||||
"des\n"
|
||||
" -0 .. -9 Kompressionseinstellung; Voreinstellung is 6. Beachten\n"
|
||||
" Sie den Speicherverbrauch des Komprimieres *und* des\n"
|
||||
" Dekomprimierers, wenn Sie 7-9 benutzen!"
|
||||
|
||||
#: src/xz/message.c:1139
|
||||
#: src/xz/message.c:1134
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU "
|
||||
"time;\n"
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
" -e, --extreme Versuche durch stärkere CPU Nutzung das "
|
||||
"Kompressions-\n"
|
||||
" -e, --extreme Versuche durch stärkere CPU Nutzung das Kompressions-\n"
|
||||
" verhältnis zu verbessern. Das beeinflusst nicht den\n"
|
||||
" Speicherbedarf des Dekomprimierers."
|
||||
|
||||
#: src/xz/message.c:1144
|
||||
#: src/xz/message.c:1139
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, "
|
||||
"decompression,\n"
|
||||
" set memory usage limit for compression, decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT Setze Speicher Nutzungslimit für Kompression,\n"
|
||||
" Dekompression, oder beides; LIMIT ist in bytes, % "
|
||||
"RAM,\n"
|
||||
" Dekompression, oder beides; LIMIT ist in bytes, % RAM,\n"
|
||||
" oder 0 für Grundeinstellungen."
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
#: src/xz/message.c:1146
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage "
|
||||
"limit,\n"
|
||||
" give an error instead of adjusting the settings "
|
||||
"downwards"
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
msgstr ""
|
||||
" --no-adjust Wenn die Kompressionseinstellungen das Speicher\n"
|
||||
" Nutzungslimit übersteigen, erzeuge einen Fehler "
|
||||
"statt\n"
|
||||
" Nutzungslimit übersteigen, erzeuge einen Fehler statt\n"
|
||||
" die Einstellungen nach unten anzupassen."
|
||||
|
||||
#: src/xz/message.c:1157
|
||||
#: src/xz/message.c:1152
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@ -639,13 +597,11 @@ msgstr ""
|
||||
"\n"
|
||||
" User-definierte Filter Kette für Kompression (alternativ zu Voreinstellung):"
|
||||
|
||||
#: src/xz/message.c:1166
|
||||
#: src/xz/message.c:1161
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
|
||||
"or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; "
|
||||
"default):\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
@ -653,37 +609,28 @@ msgid ""
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; "
|
||||
"bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic "
|
||||
"(default)"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic (default)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --lzma1[=OPTIONEN] LZMA1 oder LZMA2; OPTIONEN ist eine durch Kommata\n"
|
||||
" --lzma2[=OPTIONEN] getrennte Liste bestehend aus den folgenden "
|
||||
"Optionen\n"
|
||||
" --lzma2[=OPTIONEN] getrennte Liste bestehend aus den folgenden Optionen\n"
|
||||
" (zulässige Werte; Voreinstellung):\n"
|
||||
" preset=NUM Setze Optionen zurück zu "
|
||||
"Voreinstellung\n"
|
||||
" preset=NUM Setze Optionen zurück zu Voreinstellung\n"
|
||||
" (0-9[e])\n"
|
||||
" dict=NUM Wörterbuch Größe (4 KiB - 1536 MiB; 8 "
|
||||
"MiB)\n"
|
||||
" lc=NUM Anzahl der Literal Kontext Bits (0-4; "
|
||||
"3)\n"
|
||||
" lp=NUM Anzahl der Literal Positionsbits (0-4; "
|
||||
"0)\n"
|
||||
" dict=NUM Wörterbuch Größe (4 KiB - 1536 MiB; 8 MiB)\n"
|
||||
" lc=NUM Anzahl der Literal Kontext Bits (0-4; 3)\n"
|
||||
" lp=NUM Anzahl der Literal Positionsbits (0-4; 0)\n"
|
||||
" pb=NUM Anzahl der Positionsbits (0-4; 2)\n"
|
||||
" mode=MODUS Kompressionsmodus (fast, normal; "
|
||||
"normal)\n"
|
||||
" mode=MODUS Kompressionsmodus (fast, normal; normal)\n"
|
||||
" nice=NUM Nice-Länge eines Treffers (2-273; 64)\n"
|
||||
" mf=NAME Algorithmus zum Auffinden von\n"
|
||||
" Übereinstimmungen (hc3, hc4, bt2, bt3, "
|
||||
"bt4;\n"
|
||||
" Übereinstimmungen (hc3, hc4, bt2, bt3, bt4;\n"
|
||||
" bt4)\n"
|
||||
" depth=NUM Maximale Suchtiefe; 0=automatisch\n"
|
||||
" (Voreinstellung)"
|
||||
|
||||
#: src/xz/message.c:1181
|
||||
#: src/xz/message.c:1176
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -706,7 +653,7 @@ msgstr ""
|
||||
" start=NUM Start-Offset für Konversion\n"
|
||||
" (Voreinstellung=0)"
|
||||
|
||||
#: src/xz/message.c:1193
|
||||
#: src/xz/message.c:1188
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@ -716,11 +663,10 @@ msgstr ""
|
||||
"\n"
|
||||
" --delta[=OPTIONEN] Delta Filter; zulässige Optionen (gültige Werte;\n"
|
||||
" Voreinstellung):\n"
|
||||
" dist=NUM Abstand zwischen den Bytes, die "
|
||||
"voneinander\n"
|
||||
" dist=NUM Abstand zwischen den Bytes, die voneinander\n"
|
||||
" subtrahiert werden (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1201
|
||||
#: src/xz/message.c:1196
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@ -728,37 +674,33 @@ msgstr ""
|
||||
"\n"
|
||||
" Andere Optionen:\n"
|
||||
|
||||
#: src/xz/message.c:1204
|
||||
#: src/xz/message.c:1199
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors "
|
||||
"too\n"
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
" -q, --quiet unterdrücke Warnungen; benutze diese Option zweimal\n"
|
||||
" um auch Fehlermeldungen zu unterdrücken\n"
|
||||
" -v, --verbose sei gesprächig; benutze diese Option zweimal um "
|
||||
"noch\n"
|
||||
" -v, --verbose sei gesprächig; benutze diese Option zweimal um noch\n"
|
||||
" gesprächiger zu sein"
|
||||
|
||||
#: src/xz/message.c:1209
|
||||
#: src/xz/message.c:1204
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn Warnungen verändern nicht den exit status"
|
||||
|
||||
#: src/xz/message.c:1211
|
||||
msgid ""
|
||||
" --robot use machine-parsable messages (useful for scripts)"
|
||||
#: src/xz/message.c:1206
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
" --robot benutze Maschinen-lesbare Meldungen (nützlich für\n"
|
||||
" Skripte)"
|
||||
|
||||
#: src/xz/message.c:1214
|
||||
#: src/xz/message.c:1209
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently "
|
||||
"active\n"
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr " --info-memory zeige Speicherlimit an und terminiere"
|
||||
|
||||
#: src/xz/message.c:1217
|
||||
#: src/xz/message.c:1212
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@ -767,21 +709,20 @@ msgstr ""
|
||||
" Optionen)\n"
|
||||
" -H, --long-help zeige diese lange Hilfe an und terminiere"
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
#: src/xz/message.c:1216
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
msgstr ""
|
||||
" -h, --help zeige diese kurze Hilfe an und terminiere\n"
|
||||
" -H, --long-help zeige die lange Hilfe an (zeigt auch "
|
||||
"fortgeschrittene\n"
|
||||
" -H, --long-help zeige die lange Hilfe an (zeigt auch fortgeschrittene\n"
|
||||
" Optionen an)"
|
||||
|
||||
#: src/xz/message.c:1226
|
||||
#: src/xz/message.c:1221
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version zeige Versionsnummer an und terminiere"
|
||||
|
||||
#: src/xz/message.c:1228
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@ -794,15 +735,14 @@ msgstr ""
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1234
|
||||
#: src/xz/message.c:1229
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Melde Bugs an <%s> (in englisch oder finnisch).\n"
|
||||
"Melde Übersetzungsfehler an <maan@systemlinux.org> (in englisch oder "
|
||||
"deutsch).\n"
|
||||
"Melde Übersetzungsfehler an <maan@systemlinux.org> (in englisch oder deutsch).\n"
|
||||
|
||||
#: src/xz/message.c:1236
|
||||
#: src/xz/message.c:1231
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "%s Homepage: <%s>\n"
|
||||
@ -810,9 +750,7 @@ msgstr "%s Homepage: <%s>\n"
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr ""
|
||||
"%s: Optionen müssen in der Form `Name=Wert` gegeben werden, getrennt durch "
|
||||
"Kommata"
|
||||
msgstr "%s: Optionen müssen in der Form `Name=Wert` gegeben werden, getrennt durch Kommata"
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
@ -836,17 +774,12 @@ msgstr "Die Summe aus lc und lp darf höchstens 4 sein"
|
||||
#: src/xz/options.c:359
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr ""
|
||||
"Der ausgewählte Algorithmus zum Auffinden von Übereinstimmungen braucht "
|
||||
"mindestens nice=%<PRIu32>"
|
||||
msgstr "Der ausgewählte Algorithmus zum Auffinden von Übereinstimmungen braucht mindestens nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:79 src/xz/suffix.c:164
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr ""
|
||||
"%s: Mit --format=raw ist --sufix=.SUF notwendig, falls nicht nach stdout "
|
||||
"geschrieben wird"
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s: Mit --format=raw ist --sufix=.SUF notwendig, falls nicht nach stdout geschrieben wird"
|
||||
|
||||
#: src/xz/suffix.c:99
|
||||
#, c-format
|
||||
|
@ -7,10 +7,11 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-utils\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2010-09-10 14:50+0300\n"
|
||||
"POT-Creation-Date: 2010-10-23 17:48+0300\n"
|
||||
"PO-Revision-Date: 2010-09-16 21:32+0200\n"
|
||||
"Last-Translator: Milo Casagrande <milo@ubuntu.com>\n"
|
||||
"Language-Team: Italian <tp@lists.linux.it>\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@ -43,9 +44,7 @@ msgstr "Il numero massimo di filtri è quattro"
|
||||
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr ""
|
||||
"Il limite dell'uso della memoria è troppo basso per l'impostazione del "
|
||||
"filtro dato."
|
||||
msgstr "Il limite dell'uso della memoria è troppo basso per l'impostazione del filtro dato."
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
@ -53,8 +52,7 @@ msgstr "Non è consigliato usare un preset nella modalità raw."
|
||||
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr ""
|
||||
"Le opzioni esatte per i preset possono variare tra le versioni del software."
|
||||
msgstr "Le opzioni esatte per i preset possono variare tra le versioni del software."
|
||||
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
@ -75,12 +73,8 @@ msgstr "L'estrazione necessita di %s MiB di memoria."
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the "
|
||||
"memory usage limit of %s MiB"
|
||||
msgstr ""
|
||||
"Regolata la dimensione del dizionario LZMA%c da %s MiB a %s MiB per non "
|
||||
"superare il limite dell'uso della memoria di %s MiB"
|
||||
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr "Regolata la dimensione del dizionario LZMA%c da %s MiB a %s MiB per non superare il limite dell'uso della memoria di %s MiB"
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
@ -160,8 +154,7 @@ msgstr "%s: chiusura del file non riuscita: %s"
|
||||
#: src/xz/file_io.c:762 src/xz/file_io.c:946
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr ""
|
||||
"%s: posizionamento non riuscito nel tentativo di creare un file sparso: %s"
|
||||
msgstr "%s: posizionamento non riuscito nel tentativo di creare un file sparso: %s"
|
||||
|
||||
#: src/xz/file_io.c:821
|
||||
#, c-format
|
||||
@ -212,7 +205,7 @@ msgstr "Nessuno"
|
||||
#. but the Check ID is known (here 2). This and other "Unknown-N"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter.
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr "Sconosc2"
|
||||
@ -320,12 +313,10 @@ msgstr " Padding dello stream: %s\n"
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize "
|
||||
"UncompSize Ratio Check Padding"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
"Stream:\n"
|
||||
" Stream Blocc. Offset comp. Offset estr. Dim. comp. Dim. "
|
||||
"estratto Rapp. Contr Padding"
|
||||
" Stream Blocc. Offset comp. Offset estr. Dim. comp. Dim. estratto Rapp. Contr Padding"
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
@ -333,12 +324,10 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize "
|
||||
"UncompSize Ratio Check"
|
||||
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
" Blocchi:\n"
|
||||
" Stream Blocc. Offset comp. Offset estratto Dim. tot. Dim. "
|
||||
"estratto Rapp. Contr"
|
||||
" Stream Blocc. Offset comp. Offset estratto Dim. tot. Dim. estratto Rapp. Contr"
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
@ -408,80 +397,69 @@ msgstr "%s: fine dell'input durante la lettura dei nomi dei file non attesa"
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: Null character found when reading filenames; maybe you meant to use `--"
|
||||
"files0' instead of `--files'?"
|
||||
msgstr ""
|
||||
"%s: nessun carattere trovato durante la lettura dei nomi dei file; forse si "
|
||||
"intendeva usare \"--files0\" invece di \"--files\"?"
|
||||
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
|
||||
msgstr "%s: nessun carattere trovato durante la lettura dei nomi dei file; forse si intendeva usare \"--files0\" invece di \"--files\"?"
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr "La compressione e l'estrazione con --robot non sono ancora supportate."
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid ""
|
||||
"Cannot read data from standard input when reading filenames from standard "
|
||||
"input"
|
||||
msgstr ""
|
||||
"Impossibile leggere i dati dallo standard input durante la lettura dei nomi "
|
||||
"dei file dallo standard input"
|
||||
msgid "Cannot read data from standard input when reading filenames from standard input"
|
||||
msgstr "Impossibile leggere i dati dallo standard input durante la lettura dei nomi dei file dallo standard input"
|
||||
|
||||
#: src/xz/message.c:800 src/xz/message.c:844
|
||||
#: src/xz/message.c:792 src/xz/message.c:842
|
||||
msgid "Internal error (bug)"
|
||||
msgstr "Errore interno (bug)"
|
||||
|
||||
#: src/xz/message.c:807
|
||||
#: src/xz/message.c:799
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr "Impossibile stabilire i gestori dei segnali"
|
||||
|
||||
#: src/xz/message.c:816
|
||||
#: src/xz/message.c:808
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Nessun controllo d'integrità; l'integrità del file non viene verificata"
|
||||
msgstr "Nessun controllo d'integrità; l'integrità del file non viene verificata"
|
||||
|
||||
#: src/xz/message.c:819
|
||||
#: src/xz/message.c:811
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
"Tipo di controllo di integrità non supportato; l'integrità del file non "
|
||||
"viene verificata"
|
||||
msgstr "Tipo di controllo di integrità non supportato; l'integrità del file non viene verificata"
|
||||
|
||||
#: src/xz/message.c:826
|
||||
#: src/xz/message.c:818
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr "Limite di utilizzo della memoria raggiunto"
|
||||
|
||||
#: src/xz/message.c:829
|
||||
#: src/xz/message.c:821
|
||||
msgid "File format not recognized"
|
||||
msgstr "Formato di file non riconosciuto"
|
||||
|
||||
#: src/xz/message.c:832
|
||||
#: src/xz/message.c:824
|
||||
msgid "Unsupported options"
|
||||
msgstr "Opzioni non supportate"
|
||||
|
||||
#: src/xz/message.c:835
|
||||
#: src/xz/message.c:827
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr "I dati compressi sono danneggiati"
|
||||
|
||||
#: src/xz/message.c:838
|
||||
#: src/xz/message.c:830
|
||||
msgid "Unexpected end of input"
|
||||
msgstr "Fine dell'input non attesa"
|
||||
|
||||
#: src/xz/message.c:886
|
||||
#: src/xz/message.c:881
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr "%s MiB di memoria sono richiesti. Il limite è %s."
|
||||
|
||||
#: src/xz/message.c:1053
|
||||
#: src/xz/message.c:1048
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr "%s: catena di filtri: %s\n"
|
||||
|
||||
#: src/xz/message.c:1063
|
||||
#: src/xz/message.c:1058
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr "Provare \"%s --help\" per maggiori informazioni."
|
||||
|
||||
#: src/xz/message.c:1089
|
||||
#: src/xz/message.c:1084
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
@ -492,18 +470,15 @@ msgstr ""
|
||||
"Comprime o estrae i FILE nel formato .xz.\n"
|
||||
"\n"
|
||||
|
||||
#: src/xz/message.c:1096
|
||||
msgid ""
|
||||
"Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
"Gli argomenti obbligatori per le opzioni lunghe lo sono anche per quelle "
|
||||
"brevi.\n"
|
||||
#: src/xz/message.c:1091
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr "Gli argomenti obbligatori per le opzioni lunghe lo sono anche per quelle brevi.\n"
|
||||
|
||||
#: src/xz/message.c:1100
|
||||
#: src/xz/message.c:1095
|
||||
msgid " Operation mode:\n"
|
||||
msgstr " Modalità di operazione:\n"
|
||||
|
||||
#: src/xz/message.c:1103
|
||||
#: src/xz/message.c:1098
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
@ -515,7 +490,7 @@ msgstr ""
|
||||
" -t, --test Verifica l'integrità dei file compressi\n"
|
||||
" -l, --list Elenca informazioni sui file .xz"
|
||||
|
||||
#: src/xz/message.c:1109
|
||||
#: src/xz/message.c:1104
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
@ -523,40 +498,35 @@ msgstr ""
|
||||
"\n"
|
||||
" Modificatori di operazioni:\n"
|
||||
|
||||
#: src/xz/message.c:1112
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files"
|
||||
msgstr ""
|
||||
" -k, --keep Mantiene (non elimina) i file di input\n"
|
||||
" -f, --force Forza la sovrascrittura dell'output e comprime/estrae "
|
||||
"i\n"
|
||||
" -f, --force Forza la sovrascrittura dell'output e comprime/estrae i\n"
|
||||
" collegamenti\n"
|
||||
" -c, --stdout Scrive sullo standard output e non elimina i file di "
|
||||
"input"
|
||||
" -c, --stdout Scrive sullo standard output e non elimina i file di input"
|
||||
|
||||
#: src/xz/message.c:1118
|
||||
#: src/xz/message.c:1113
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline "
|
||||
"character\n"
|
||||
" filenames must be terminated with the newline character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
" --no-sparse Non crea file sparsi durante l'estrazione\n"
|
||||
" -S, --suffix=.SUF Usa il suffisso \".SUF\" sui file compressi\n"
|
||||
" --files=[FILE] Legge i nomi dei file da elaborare da FILE; se FILE è\n"
|
||||
" omesso, i nomi dei file sono letti dallo standard "
|
||||
"input;\n"
|
||||
" i nomi dei file devono essere terminati con un "
|
||||
"carattere\n"
|
||||
" omesso, i nomi dei file sono letti dallo standard input;\n"
|
||||
" i nomi dei file devono essere terminati con un carattere\n"
|
||||
" di newline\n"
|
||||
" --files0=[FILE] Come --files ma usa il carattere null come terminatore"
|
||||
|
||||
#: src/xz/message.c:1126
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
@ -564,76 +534,62 @@ msgstr ""
|
||||
"\n"
|
||||
" Formato file di base e opzioni di compressione:\n"
|
||||
|
||||
#: src/xz/message.c:1128
|
||||
#: src/xz/message.c:1123
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
" -F, --format=FMT Formato file per codificare o decodificare; i "
|
||||
"possibili\n"
|
||||
" valori sono \"auto\" (predefinito) \"xz\", \"lzma\" e "
|
||||
"\"raw\"\n"
|
||||
" -C, --check=CHECK Tipo di verifica integrità: \"none\" (usare con "
|
||||
"attenzione),\n"
|
||||
" -F, --format=FMT Formato file per codificare o decodificare; i possibili\n"
|
||||
" valori sono \"auto\" (predefinito) \"xz\", \"lzma\" e \"raw\"\n"
|
||||
" -C, --check=CHECK Tipo di verifica integrità: \"none\" (usare con attenzione),\n"
|
||||
" \"crc32\", \"crc64\" (predefinito) o \"sha256\""
|
||||
|
||||
#: src/xz/message.c:1135
|
||||
#: src/xz/message.c:1130
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor "
|
||||
"*and*\n"
|
||||
" decompressor memory usage into account before using 7-"
|
||||
"9!"
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
msgstr ""
|
||||
" -0 ... -9 Preset di compressione; predefinito è 6; tenere a "
|
||||
"mente\n"
|
||||
" l'utilizzo di memoria per comprimere ed estrarre "
|
||||
"prima\n"
|
||||
" -0 ... -9 Preset di compressione; predefinito è 6; tenere a mente\n"
|
||||
" l'utilizzo di memoria per comprimere ed estrarre prima\n"
|
||||
" di usare 7-9"
|
||||
|
||||
#: src/xz/message.c:1139
|
||||
#: src/xz/message.c:1134
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU "
|
||||
"time;\n"
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
" -e, --extreme Tenta di migliorare il rapporto di compressione\n"
|
||||
" utilizzando più tempo di CPU; non cambia i requisiti "
|
||||
"di\n"
|
||||
" utilizzando più tempo di CPU; non cambia i requisiti di\n"
|
||||
" memoria in fase di estrazione"
|
||||
|
||||
#: src/xz/message.c:1144
|
||||
#: src/xz/message.c:1139
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, "
|
||||
"decompression,\n"
|
||||
" set memory usage limit for compression, decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" Imposta il limite di utilizzo della memoria per la\n"
|
||||
" compressione, l'estrazione o entrambe; LIMIT è in "
|
||||
"byte,\n"
|
||||
" compressione, l'estrazione o entrambe; LIMIT è in byte,\n"
|
||||
" % della memoria RAM oppure 0 per il valore predefinito"
|
||||
|
||||
#: src/xz/message.c:1151
|
||||
#: src/xz/message.c:1146
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage "
|
||||
"limit,\n"
|
||||
" give an error instead of adjusting the settings "
|
||||
"downwards"
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
msgstr ""
|
||||
" --no-adjust Se le impostazioni di compressione eccedono il limite "
|
||||
"di\n"
|
||||
" --no-adjust Se le impostazioni di compressione eccedono il limite di\n"
|
||||
" utilizzo della memoria, lancia un errore invece di\n"
|
||||
" utilizzare valori più piccoli"
|
||||
|
||||
#: src/xz/message.c:1157
|
||||
#: src/xz/message.c:1152
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
@ -642,13 +598,11 @@ msgstr ""
|
||||
" Catena di filtri personalizzati per la compressione (alternative per\n"
|
||||
" l'utilizzo di preset):"
|
||||
|
||||
#: src/xz/message.c:1166
|
||||
#: src/xz/message.c:1161
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero "
|
||||
"or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; "
|
||||
"default):\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
@ -656,24 +610,17 @@ msgid ""
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; "
|
||||
"bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic "
|
||||
"(default)"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic (default)"
|
||||
msgstr ""
|
||||
"\n"
|
||||
" --lzma1[=OPZ] LZMA1 o LZMA2; OPZ è un elenco separato da virgole di "
|
||||
"zero\n"
|
||||
" --lzma2[=OPZ] o più delle seguenti opzioni (valori validi; "
|
||||
"predefinito):\n"
|
||||
" preset=NUM Reimposta le opzioni al preset NUM (0-9"
|
||||
"[e])\n"
|
||||
" --lzma1[=OPZ] LZMA1 o LZMA2; OPZ è un elenco separato da virgole di zero\n"
|
||||
" --lzma2[=OPZ] o più delle seguenti opzioni (valori validi; predefinito):\n"
|
||||
" preset=NUM Reimposta le opzioni al preset NUM (0-9[e])\n"
|
||||
" dict=NUM Dimensione del dizionario\n"
|
||||
" (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM Numero di bit letterali di contesto (0-4; "
|
||||
"3)\n"
|
||||
" lp=NUM Numero di bit letterali di posizione (0-"
|
||||
"4; 0)\n"
|
||||
" lc=NUM Numero di bit letterali di contesto (0-4; 3)\n"
|
||||
" lp=NUM Numero di bit letterali di posizione (0-4; 0)\n"
|
||||
" pb=NUM Numero di bit di posizione (0-4; 2)\n"
|
||||
" mode=MODE Modalità di compressione\n"
|
||||
" (fast, normal; normal)\n"
|
||||
@ -681,11 +628,10 @@ msgstr ""
|
||||
" (2-273; 64)\n"
|
||||
" mf=NAME Strumento per cercare corrispondenze\n"
|
||||
" (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM Profondità massima di ricerca; "
|
||||
"0=automatica\n"
|
||||
" depth=NUM Profondità massima di ricerca; 0=automatica\n"
|
||||
" (predefinito)"
|
||||
|
||||
#: src/xz/message.c:1181
|
||||
#: src/xz/message.c:1176
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
@ -708,7 +654,7 @@ msgstr ""
|
||||
" start=NUM Offset iniziale per le conversioni\n"
|
||||
" (predefinito=0)"
|
||||
|
||||
#: src/xz/message.c:1193
|
||||
#: src/xz/message.c:1188
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
@ -720,7 +666,7 @@ msgstr ""
|
||||
" dist=NUM Distanza tra byte sottratti\n"
|
||||
" gli uni dagli altri (1-256; 1)"
|
||||
|
||||
#: src/xz/message.c:1201
|
||||
#: src/xz/message.c:1196
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
@ -728,39 +674,33 @@ msgstr ""
|
||||
"\n"
|
||||
" Altre opzioni:\n"
|
||||
|
||||
#: src/xz/message.c:1204
|
||||
#: src/xz/message.c:1199
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors "
|
||||
"too\n"
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
" -q, --quiet Sopprime gli avvisi; specificare due volte per "
|
||||
"sopprimere\n"
|
||||
" -q, --quiet Sopprime gli avvisi; specificare due volte per sopprimere\n"
|
||||
" anche gli errori\n"
|
||||
" -v, --verbose Output prolisso; specificare due volte per output "
|
||||
"ancora\n"
|
||||
" -v, --verbose Output prolisso; specificare due volte per output ancora\n"
|
||||
" più prolisso"
|
||||
|
||||
#: src/xz/message.c:1209
|
||||
#: src/xz/message.c:1204
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr " -Q, --no-warn Gli avvisi non influenzano lo stato d'uscita"
|
||||
|
||||
#: src/xz/message.c:1211
|
||||
msgid ""
|
||||
" --robot use machine-parsable messages (useful for scripts)"
|
||||
#: src/xz/message.c:1206
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr " --robot Usa messaggi analizzabili (utile per gli script)"
|
||||
|
||||
#: src/xz/message.c:1214
|
||||
#: src/xz/message.c:1209
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently "
|
||||
"active\n"
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr ""
|
||||
" --info-memory Visualizza la quantità totale di RAM, il limite "
|
||||
"attuale\n"
|
||||
" --info-memory Visualizza la quantità totale di RAM, il limite attuale\n"
|
||||
" attivo di utilizzo della memore ed esce"
|
||||
|
||||
#: src/xz/message.c:1217
|
||||
#: src/xz/message.c:1212
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
@ -768,7 +708,7 @@ msgstr ""
|
||||
" -h, --help Stampa l'aiuto breve (elenca solo le opzioni di base)\n"
|
||||
" -H, --long-help Stampa questo lungo aiuto ed esce"
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
#: src/xz/message.c:1216
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
@ -776,11 +716,11 @@ msgstr ""
|
||||
" -h, --help Stampa questo breve aiuto ed esce\n"
|
||||
" -H, --long-help Stampa l'aiuto lungo (elenca anche le opzioni avanzate)"
|
||||
|
||||
#: src/xz/message.c:1226
|
||||
#: src/xz/message.c:1221
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr " -V, --version Stampa il numero della versione ed esce"
|
||||
|
||||
#: src/xz/message.c:1228
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
@ -792,14 +732,14 @@ msgstr ""
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1234
|
||||
#: src/xz/message.c:1229
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
"Segnalare i bug a <%s> (in inglese o finlandese).\n"
|
||||
"Segnalare i bug di traduzione a <tp@lists.linux.it>.\n"
|
||||
|
||||
#: src/xz/message.c:1236
|
||||
#: src/xz/message.c:1231
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr "Sito web di %s: <%s>\n"
|
||||
@ -807,8 +747,7 @@ msgstr "Sito web di %s: <%s>\n"
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr ""
|
||||
"%s: le opzioni devono essere coppie \"nome=valore\" separate da virgole"
|
||||
msgstr "%s: le opzioni devono essere coppie \"nome=valore\" separate da virgole"
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
@ -832,17 +771,12 @@ msgstr "La somma di lc e lp non deve superare 4"
|
||||
#: src/xz/options.c:359
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr ""
|
||||
"Lo strumento per cercare corrispondenze selezionato richiede almeno nice=%"
|
||||
"<PRIu32>"
|
||||
msgstr "Lo strumento per cercare corrispondenze selezionato richiede almeno nice=%<PRIu32>"
|
||||
|
||||
#: src/xz/suffix.c:79 src/xz/suffix.c:164
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr ""
|
||||
"%s: con --format=raw, --suffix=.SUF è richiesto a meno che non si scriva "
|
||||
"sullo stdout"
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr "%s: con --format=raw, --suffix=.SUF è richiesto a meno che non si scriva sullo stdout"
|
||||
|
||||
#: src/xz/suffix.c:99
|
||||
#, c-format
|
||||
@ -871,15 +805,12 @@ msgstr "%s: suffisso del moltiplicatore non valido"
|
||||
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr ""
|
||||
"I suffissi validi sono \"KiB\" (2^10), \"MiB\" (2^20), e \"GiB\" (2^30)."
|
||||
msgstr "I suffissi validi sono \"KiB\" (2^10), \"MiB\" (2^20), e \"GiB\" (2^30)."
|
||||
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr ""
|
||||
"Il valore dell'opzione \"%s\" deve essere nell'intervallo [%<PRIu64>, %"
|
||||
"<PRIu64>]"
|
||||
msgstr "Il valore dell'opzione \"%s\" deve essere nell'intervallo [%<PRIu64>, %<PRIu64>]"
|
||||
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
|
736
contrib/xz/po/xz.pot
Normal file
736
contrib/xz/po/xz.pot
Normal file
@ -0,0 +1,736 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# This file is put in the public domain.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
|
||||
"POT-Creation-Date: 2010-10-23 17:48+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#: src/xz/args.c:333
|
||||
#, c-format
|
||||
msgid "%s: Unknown file format type"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/args.c:356 src/xz/args.c:364
|
||||
#, c-format
|
||||
msgid "%s: Unsupported integrity check type"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/args.c:382
|
||||
msgid "Only one file can be specified with `--files' or `--files0'."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/args.c:445
|
||||
#, c-format
|
||||
msgid "The environment variable %s contains too many arguments"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:95
|
||||
msgid "Maximum number of filters is four"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:108
|
||||
msgid "Memory usage limit is too low for the given filter setup."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:129
|
||||
msgid "Using a preset in raw mode is discouraged."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:131
|
||||
msgid "The exact options of the presets may vary between software versions."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:157
|
||||
msgid "The .lzma format supports only the LZMA1 filter"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:165
|
||||
msgid "LZMA1 cannot be used with the .xz format"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:182
|
||||
msgid "Unsupported filter chain or filter options"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:190
|
||||
#, c-format
|
||||
msgid "Decompression will need %s MiB of memory."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/coder.c:247
|
||||
#, c-format
|
||||
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: When compression or decompression finishes,
|
||||
#. and xz is going to remove the source file, xz first checks
|
||||
#. if the source file still exists, and if it does, does its
|
||||
#. device and inode numbers match what xz saw when it opened
|
||||
#. the source file. If these checks fail, this message is
|
||||
#. shown, %s being the filename, and the file is not deleted.
|
||||
#. The check for device and inode numbers is there, because
|
||||
#. it is possible that the user has put a new file in place
|
||||
#. of the original file, and in that case it obviously
|
||||
#. shouldn't be removed.
|
||||
#: src/xz/file_io.c:137
|
||||
#, c-format
|
||||
msgid "%s: File seems to have been moved, not removing"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:144 src/xz/file_io.c:590
|
||||
#, c-format
|
||||
msgid "%s: Cannot remove: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:169
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file owner: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:175
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file group: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:194
|
||||
#, c-format
|
||||
msgid "%s: Cannot set the file permissions: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:337 src/xz/file_io.c:420
|
||||
#, c-format
|
||||
msgid "%s: Is a symbolic link, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:455
|
||||
#, c-format
|
||||
msgid "%s: Is a directory, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:462
|
||||
#, c-format
|
||||
msgid "%s: Not a regular file, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:479
|
||||
#, c-format
|
||||
msgid "%s: File has setuid or setgid bit set, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:486
|
||||
#, c-format
|
||||
msgid "%s: File has sticky bit set, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:493
|
||||
#, c-format
|
||||
msgid "%s: Input file has more than one hard link, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:714
|
||||
#, c-format
|
||||
msgid "Error restoring the O_APPEND flag to standard output: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:726
|
||||
#, c-format
|
||||
msgid "%s: Closing the file failed: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:762 src/xz/file_io.c:946
|
||||
#, c-format
|
||||
msgid "%s: Seeking failed when trying to create a sparse file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:821
|
||||
#, c-format
|
||||
msgid "%s: Read error: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:844
|
||||
#, c-format
|
||||
msgid "%s: Error seeking the file: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:854
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of file"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/file_io.c:904
|
||||
#, c-format
|
||||
msgid "%s: Write error: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/hardware.c:100
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: Test with "xz --info-memory" to see if
|
||||
#. the alignment looks nice.
|
||||
#: src/xz/hardware.c:119
|
||||
msgid "Total amount of physical memory (RAM): "
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/hardware.c:121
|
||||
msgid "Memory usage limit for compression: "
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/hardware.c:123
|
||||
msgid "Memory usage limit for decompression: "
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: Indicates that there is no integrity check.
|
||||
#. This string is used in tables, so the width must not
|
||||
#. exceed ten columns with a fixed-width font.
|
||||
#: src/xz/list.c:62
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: Indicates that integrity check name is not known,
|
||||
#. but the Check ID is known (here 2). This and other "Unknown-N"
|
||||
#. strings are used in tables, so the width must not exceed ten
|
||||
#. columns with a fixed-width font. It's OK to omit the dash if
|
||||
#. you need space for one extra letter, but don't use spaces.
|
||||
#: src/xz/list.c:69
|
||||
msgid "Unknown-2"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:70
|
||||
msgid "Unknown-3"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:72
|
||||
msgid "Unknown-5"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:73
|
||||
msgid "Unknown-6"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:74
|
||||
msgid "Unknown-7"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:75
|
||||
msgid "Unknown-8"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:76
|
||||
msgid "Unknown-9"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:78
|
||||
msgid "Unknown-11"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:79
|
||||
msgid "Unknown-12"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:80
|
||||
msgid "Unknown-13"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:81
|
||||
msgid "Unknown-14"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:82
|
||||
msgid "Unknown-15"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:126
|
||||
#, c-format
|
||||
msgid "%s: File is empty"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:131
|
||||
#, c-format
|
||||
msgid "%s: Too small to be a valid .xz file"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: These are column headings. From Strms (Streams)
|
||||
#. to Ratio, the columns are right aligned. Check and Filename
|
||||
#. are left aligned. If you need longer words, it's OK to
|
||||
#. use two lines here. Test with "xz -l foo.xz".
|
||||
#: src/xz/list.c:612
|
||||
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:652
|
||||
#, c-format
|
||||
msgid " Streams: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:654
|
||||
#, c-format
|
||||
msgid " Blocks: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:656
|
||||
#, c-format
|
||||
msgid " Compressed size: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:659
|
||||
#, c-format
|
||||
msgid " Uncompressed size: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:662
|
||||
#, c-format
|
||||
msgid " Ratio: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:664
|
||||
#, c-format
|
||||
msgid " Check: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:665
|
||||
#, c-format
|
||||
msgid " Stream padding: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All except
|
||||
#. Check are right aligned; Check is left aligned. Test with
|
||||
#. "xz -lv foo.xz".
|
||||
#: src/xz/list.c:693
|
||||
msgid ""
|
||||
" Streams:\n"
|
||||
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: The second line is column headings. All
|
||||
#. except Check are right aligned; Check is left aligned.
|
||||
#: src/xz/list.c:748
|
||||
#, c-format
|
||||
msgid ""
|
||||
" Blocks:\n"
|
||||
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: These are additional column headings
|
||||
#. for the most verbose listing mode. CheckVal
|
||||
#. (Check value), Flags, and Filters are left aligned.
|
||||
#. Header (Block Header Size), CompSize, and MemUsage
|
||||
#. are right aligned. %*s is replaced with 0-120
|
||||
#. spaces to make the CheckVal column wide enough.
|
||||
#. Test with "xz -lvv foo.xz".
|
||||
#: src/xz/list.c:760
|
||||
#, c-format
|
||||
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:838 src/xz/list.c:1007
|
||||
#, c-format
|
||||
msgid " Memory needed: %s MiB\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:840 src/xz/list.c:1009
|
||||
#, c-format
|
||||
msgid " Sizes in headers: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:841 src/xz/list.c:1010
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: %s is an integer. Only the plural form of this
|
||||
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
|
||||
#: src/xz/list.c:986
|
||||
#, c-format
|
||||
msgid "%s file\n"
|
||||
msgid_plural "%s files\n"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: src/xz/list.c:999
|
||||
msgid "Totals:"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:1000
|
||||
#, c-format
|
||||
msgid " Number of files: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:1072
|
||||
msgid "--list works only on .xz files (--format=xz or --format=auto)"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/list.c:1078
|
||||
msgid "--list does not support reading from standard input"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/main.c:89
|
||||
#, c-format
|
||||
msgid "%s: Error reading filenames: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/main.c:96
|
||||
#, c-format
|
||||
msgid "%s: Unexpected end of input when reading filenames"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/main.c:120
|
||||
#, c-format
|
||||
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/main.c:174
|
||||
msgid "Compression and decompression with --robot are not supported yet."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/main.c:231
|
||||
msgid "Cannot read data from standard input when reading filenames from standard input"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:792 src/xz/message.c:842
|
||||
msgid "Internal error (bug)"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:799
|
||||
msgid "Cannot establish signal handlers"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:808
|
||||
msgid "No integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:811
|
||||
msgid "Unsupported type of integrity check; not verifying file integrity"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:818
|
||||
msgid "Memory usage limit reached"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:821
|
||||
msgid "File format not recognized"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:824
|
||||
msgid "Unsupported options"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:827
|
||||
msgid "Compressed data is corrupt"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:830
|
||||
msgid "Unexpected end of input"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:881
|
||||
#, c-format
|
||||
msgid "%s MiB of memory is required. The limit is %s."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1048
|
||||
#, c-format
|
||||
msgid "%s: Filter chain: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1058
|
||||
#, c-format
|
||||
msgid "Try `%s --help' for more information."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1084
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage: %s [OPTION]... [FILE]...\n"
|
||||
"Compress or decompress FILEs in the .xz format.\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1091
|
||||
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1095
|
||||
msgid " Operation mode:\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1098
|
||||
msgid ""
|
||||
" -z, --compress force compression\n"
|
||||
" -d, --decompress force decompression\n"
|
||||
" -t, --test test compressed file integrity\n"
|
||||
" -l, --list list information about .xz files"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1104
|
||||
msgid ""
|
||||
"\n"
|
||||
" Operation modifiers:\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1107
|
||||
msgid ""
|
||||
" -k, --keep keep (don't delete) input files\n"
|
||||
" -f, --force force overwrite of output file and (de)compress links\n"
|
||||
" -c, --stdout write to standard output and don't delete input files"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1113
|
||||
msgid ""
|
||||
" --no-sparse do not create sparse files when decompressing\n"
|
||||
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
|
||||
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
|
||||
" omitted, filenames are read from the standard input;\n"
|
||||
" filenames must be terminated with the newline character\n"
|
||||
" --files0[=FILE] like --files but use the null character as terminator"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1121
|
||||
msgid ""
|
||||
"\n"
|
||||
" Basic file format and compression options:\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1123
|
||||
msgid ""
|
||||
" -F, --format=FMT file format to encode or decode; possible values are\n"
|
||||
" `auto' (default), `xz', `lzma', and `raw'\n"
|
||||
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
|
||||
" `crc32', `crc64' (default), or `sha256'"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1130
|
||||
msgid ""
|
||||
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
|
||||
" decompressor memory usage into account before using 7-9!"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1134
|
||||
msgid ""
|
||||
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
|
||||
" does not affect decompressor memory requirements"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1139
|
||||
#, no-c-format
|
||||
msgid ""
|
||||
" --memlimit-compress=LIMIT\n"
|
||||
" --memlimit-decompress=LIMIT\n"
|
||||
" -M, --memlimit=LIMIT\n"
|
||||
" set memory usage limit for compression, decompression,\n"
|
||||
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1146
|
||||
msgid ""
|
||||
" --no-adjust if compression settings exceed the memory usage limit,\n"
|
||||
" give an error instead of adjusting the settings downwards"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1152
|
||||
msgid ""
|
||||
"\n"
|
||||
" Custom filter chain for compression (alternative for using presets):"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1161
|
||||
msgid ""
|
||||
"\n"
|
||||
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
|
||||
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
|
||||
" preset=PRE reset options to a preset (0-9[e])\n"
|
||||
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
|
||||
" lc=NUM number of literal context bits (0-4; 3)\n"
|
||||
" lp=NUM number of literal position bits (0-4; 0)\n"
|
||||
" pb=NUM number of position bits (0-4; 2)\n"
|
||||
" mode=MODE compression mode (fast, normal; normal)\n"
|
||||
" nice=NUM nice length of a match (2-273; 64)\n"
|
||||
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
|
||||
" depth=NUM maximum search depth; 0=automatic (default)"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1176
|
||||
msgid ""
|
||||
"\n"
|
||||
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
|
||||
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
|
||||
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
|
||||
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
|
||||
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
|
||||
" --sparc[=OPTS] SPARC BCJ filter\n"
|
||||
" Valid OPTS for all BCJ filters:\n"
|
||||
" start=NUM start offset for conversions (default=0)"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1188
|
||||
msgid ""
|
||||
"\n"
|
||||
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
|
||||
" dist=NUM distance between bytes being subtracted\n"
|
||||
" from each other (1-256; 1)"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1196
|
||||
msgid ""
|
||||
"\n"
|
||||
" Other options:\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1199
|
||||
msgid ""
|
||||
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
|
||||
" -v, --verbose be verbose; specify twice for even more verbose"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1204
|
||||
msgid " -Q, --no-warn make warnings not affect the exit status"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1206
|
||||
msgid " --robot use machine-parsable messages (useful for scripts)"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1209
|
||||
msgid ""
|
||||
" --info-memory display the total amount of RAM and the currently active\n"
|
||||
" memory usage limits, and exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1212
|
||||
msgid ""
|
||||
" -h, --help display the short help (lists only the basic options)\n"
|
||||
" -H, --long-help display this long help and exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1216
|
||||
msgid ""
|
||||
" -h, --help display this short help and exit\n"
|
||||
" -H, --long-help display the long help (lists also the advanced options)"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1221
|
||||
msgid " -V, --version display the version number and exit"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1223
|
||||
msgid ""
|
||||
"\n"
|
||||
"With no FILE, or when FILE is -, read standard input.\n"
|
||||
msgstr ""
|
||||
|
||||
#. TRANSLATORS: This message indicates the bug reporting address
|
||||
#. for this package. Please add _another line_ saying
|
||||
#. "Report translation bugs to <...>\n" with the email or WWW
|
||||
#. address for translation bugs. Thanks.
|
||||
#: src/xz/message.c:1229
|
||||
#, c-format
|
||||
msgid "Report bugs to <%s> (in English or Finnish).\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/message.c:1231
|
||||
#, c-format
|
||||
msgid "%s home page: <%s>\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/options.c:86
|
||||
#, c-format
|
||||
msgid "%s: Options must be `name=value' pairs separated with commas"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/options.c:93
|
||||
#, c-format
|
||||
msgid "%s: Invalid option name"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/options.c:113
|
||||
#, c-format
|
||||
msgid "%s: Invalid option value"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/options.c:247
|
||||
#, c-format
|
||||
msgid "Unsupported LZMA1/LZMA2 preset: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/options.c:355
|
||||
msgid "The sum of lc and lp must not exceed 4"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/options.c:359
|
||||
#, c-format
|
||||
msgid "The selected match finder requires at least nice=%<PRIu32>"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/suffix.c:79 src/xz/suffix.c:164
|
||||
#, c-format
|
||||
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/suffix.c:99
|
||||
#, c-format
|
||||
msgid "%s: Filename has an unknown suffix, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/suffix.c:154
|
||||
#, c-format
|
||||
msgid "%s: File already has `%s' suffix, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/suffix.c:205
|
||||
#, c-format
|
||||
msgid "%s: Invalid filename suffix"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/util.c:61
|
||||
#, c-format
|
||||
msgid "%s: Value is not a non-negative decimal integer"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/util.c:103
|
||||
#, c-format
|
||||
msgid "%s: Invalid multiplier suffix"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/util.c:105
|
||||
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/util.c:122
|
||||
#, c-format
|
||||
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/util.c:247
|
||||
msgid "Empty filename, skipping"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/util.c:261
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
msgstr ""
|
||||
|
||||
#: src/xz/util.c:274
|
||||
msgid "Compressed data cannot be written to a terminal"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/tuklib_exit.c:39
|
||||
msgid "Writing to standard output failed"
|
||||
msgstr ""
|
||||
|
||||
#: src/common/tuklib_exit.c:42
|
||||
msgid "Unknown error"
|
||||
msgstr ""
|
@ -24,6 +24,11 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
// Get standard-compliant stdio functions under MinGW and MinGW-w64.
|
||||
#ifdef __MINGW32__
|
||||
# define __USE_MINGW_ANSI_STDIO 1
|
||||
#endif
|
||||
|
||||
// size_t and NULL
|
||||
#include <stddef.h>
|
||||
|
||||
|
@ -60,8 +60,8 @@
|
||||
*
|
||||
* Some could argue that liblzma API should provide all the required types,
|
||||
* for example lzma_uint64, LZMA_UINT64_C(n), and LZMA_UINT64_MAX. This was
|
||||
* seen unnecessary mess, since most systems already provide all the necessary
|
||||
* types and macros in the standard headers.
|
||||
* seen as an unnecessary mess, since most systems already provide all the
|
||||
* necessary types and macros in the standard headers.
|
||||
*
|
||||
* Note that liblzma API still has lzma_bool, because using stdbool.h would
|
||||
* break C89 and C++ programs on many systems. sizeof(bool) in C99 isn't
|
||||
|
@ -281,21 +281,21 @@ typedef enum {
|
||||
* Using LZMA_SYNC_FLUSH very often can dramatically reduce
|
||||
* the compression ratio. With some filters (for example,
|
||||
* LZMA2), fine-tuning the compression options may help
|
||||
* mitigate this problem significantly.
|
||||
* mitigate this problem significantly (for example,
|
||||
* match finder with LZMA2).
|
||||
*
|
||||
* Decoders don't support LZMA_SYNC_FLUSH.
|
||||
*/
|
||||
|
||||
LZMA_FULL_FLUSH = 2,
|
||||
/**<
|
||||
* \brief Make all the input available at output
|
||||
* \brief Finish encoding of the current Block
|
||||
*
|
||||
* Finish encoding of the current Block. All the input
|
||||
* data going to the current Block must have been given
|
||||
* to the encoder (the last bytes can still be pending in
|
||||
* next_in). Call lzma_code() with LZMA_FULL_FLUSH until
|
||||
* it returns LZMA_STREAM_END. Then continue normally with
|
||||
* LZMA_RUN or finish the Stream with LZMA_FINISH.
|
||||
* All the input data going to the current Block must have
|
||||
* been given to the encoder (the last bytes can still be
|
||||
* pending in* next_in). Call lzma_code() with LZMA_FULL_FLUSH
|
||||
* until it returns LZMA_STREAM_END. Then continue normally
|
||||
* with LZMA_RUN or finish the Stream with LZMA_FINISH.
|
||||
*
|
||||
* This action is currently supported only by Stream encoder
|
||||
* and easy encoder (which uses Stream encoder). If there is
|
||||
@ -306,12 +306,12 @@ typedef enum {
|
||||
/**<
|
||||
* \brief Finish the coding operation
|
||||
*
|
||||
* Finishes the coding operation. All the input data must
|
||||
* have been given to the encoder (the last bytes can still
|
||||
* be pending in next_in). Call lzma_code() with LZMA_FINISH
|
||||
* until it returns LZMA_STREAM_END. Once LZMA_FINISH has
|
||||
* been used, the amount of input must no longer be changed
|
||||
* by the application.
|
||||
* All the input data must have been given to the encoder
|
||||
* (the last bytes can still be pending in next_in).
|
||||
* Call lzma_code() with LZMA_FINISH until it returns
|
||||
* LZMA_STREAM_END. Once LZMA_FINISH has been used,
|
||||
* the amount of input must no longer be changed by
|
||||
* the application.
|
||||
*
|
||||
* When decoding, using LZMA_FINISH is optional unless the
|
||||
* LZMA_CONCATENATED flag was used when the decoder was
|
||||
@ -478,8 +478,12 @@ typedef struct {
|
||||
*/
|
||||
void *reserved_ptr1;
|
||||
void *reserved_ptr2;
|
||||
void *reserved_ptr3;
|
||||
void *reserved_ptr4;
|
||||
uint64_t reserved_int1;
|
||||
uint64_t reserved_int2;
|
||||
size_t reserved_int3;
|
||||
size_t reserved_int4;
|
||||
lzma_reserved_enum reserved_enum1;
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
|
||||
@ -506,7 +510,8 @@ typedef struct {
|
||||
*/
|
||||
#define LZMA_STREAM_INIT \
|
||||
{ NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
|
||||
NULL, NULL, 0, 0, LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
|
||||
NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
|
||||
LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
|
||||
|
||||
|
||||
/**
|
||||
@ -554,11 +559,11 @@ extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
|
||||
* this may give misleading information if decoding .xz Streams that have
|
||||
* multiple Blocks, because each Block can have different memory requirements.
|
||||
*
|
||||
* \return Rough estimate of how much memory is currently allocated
|
||||
* for the filter decoders. If no filter chain is currently
|
||||
* allocated, some non-zero value is still returned, which is
|
||||
* less than or equal to what any filter chain would indicate
|
||||
* as its memory requirement.
|
||||
* \return How much memory is currently allocated for the filter
|
||||
* decoders. If no filter chain is currently allocated,
|
||||
* some non-zero value is still returned, which is less than
|
||||
* or equal to what any filter chain would indicate as its
|
||||
* memory requirement.
|
||||
*
|
||||
* If this function isn't supported by *strm or some other error
|
||||
* occurs, zero is returned.
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
|
||||
/**<
|
||||
* Filter for IA64 (Itanium) binaries.
|
||||
* Filter for IA-64 (Itanium) binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)
|
||||
/**<
|
||||
* Filter for ARMThumb binaries.
|
||||
* Filter for ARM-Thumb binaries.
|
||||
*/
|
||||
|
||||
#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)
|
||||
|
@ -318,8 +318,8 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
|
||||
* The size of the Block Header must have already been decoded with
|
||||
* lzma_block_header_size_decode() macro and stored to block->header_size.
|
||||
*
|
||||
* block->filters must have been allocated, but not necessarily initialized.
|
||||
* Possible existing filter options are _not_ freed.
|
||||
* block->filters must have been allocated, but they don't need to be
|
||||
* initialized (possible existing filter options are not freed).
|
||||
*
|
||||
* \param block Destination for Block options.
|
||||
* \param allocator lzma_allocator for custom allocator functions.
|
||||
|
@ -55,13 +55,13 @@
|
||||
*
|
||||
* This flag doesn't affect the memory usage requirements of the decoder (at
|
||||
* least not significantly). The memory usage of the encoder may be increased
|
||||
* a little but only at the lowest preset levels (0-2).
|
||||
* a little but only at the lowest preset levels (0-3).
|
||||
*/
|
||||
#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate rough memory usage of easy encoder
|
||||
* \brief Calculate approximate memory usage of easy encoder
|
||||
*
|
||||
* This function is a wrapper for lzma_raw_encoder_memusage().
|
||||
*
|
||||
@ -72,7 +72,7 @@ extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate rough decoder memory usage of a preset
|
||||
* \brief Calculate approximate decoder memory usage of a preset
|
||||
*
|
||||
* This function is a wrapper for lzma_raw_decoder_memusage().
|
||||
*
|
||||
@ -93,16 +93,19 @@ extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
|
||||
* \param preset Compression preset to use. A preset consist of level
|
||||
* number and zero or more flags. Usually flags aren't
|
||||
* used, so preset is simply a number [0, 9] which match
|
||||
* the options -0 .. -9 of the xz command line tool.
|
||||
* the options -0 ... -9 of the xz command line tool.
|
||||
* Additional flags can be be set using bitwise-or with
|
||||
* the preset level number, e.g. 6 | LZMA_PRESET_EXTREME.
|
||||
* \param check Integrity check type to use. See check.h for available
|
||||
* checks. If you are unsure, use LZMA_CHECK_CRC32.
|
||||
* checks. The xz command line tool defaults to
|
||||
* LZMA_CHECK_CRC64, which is a good choice if you are
|
||||
* unsure. LZMA_CHECK_CRC32 is good too as long as the
|
||||
* uncompressed file is not many gigabytes.
|
||||
*
|
||||
* \return - LZMA_OK: Initialization succeeded. Use lzma_code() to
|
||||
* encode your data.
|
||||
* - LZMA_MEM_ERROR: Memory allocation failed.
|
||||
* - LZMA_OPTIONS_ERROR: The given compression level is not
|
||||
* - LZMA_OPTIONS_ERROR: The given compression preset is not
|
||||
* supported by this build of liblzma.
|
||||
* - LZMA_UNSUPPORTED_CHECK: The given check type is not
|
||||
* supported by this liblzma build.
|
||||
@ -310,7 +313,8 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
|
||||
* \brief Initialize .xz Stream decoder
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param memlimit Rough memory usage limit as bytes
|
||||
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX
|
||||
* to effectively disable the limiter.
|
||||
* \param flags Bitwise-or of zero or more of the decoder flags:
|
||||
* LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
|
||||
* LZMA_TELL_ANY_CHECK, LZMA_CONCATENATED
|
||||
@ -318,6 +322,7 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR: Cannot allocate memory.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported flags
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_stream_decoder(
|
||||
lzma_stream *strm, uint64_t memlimit, uint32_t flags)
|
||||
@ -332,12 +337,14 @@ extern LZMA_API(lzma_ret) lzma_stream_decoder(
|
||||
* of the input file has been detected.
|
||||
*
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param memlimit Rough memory usage limit as bytes
|
||||
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX
|
||||
* to effectively disable the limiter.
|
||||
* \param flags Bitwise-or of flags, or zero for no flags.
|
||||
*
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR: Cannot allocate memory.
|
||||
* - LZMA_OPTIONS_ERROR: Unsupported flags
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_auto_decoder(
|
||||
lzma_stream *strm, uint64_t memlimit, uint32_t flags)
|
||||
@ -353,6 +360,7 @@ extern LZMA_API(lzma_ret) lzma_auto_decoder(
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_alone_decoder(
|
||||
lzma_stream *strm, uint64_t memlimit)
|
||||
@ -379,7 +387,7 @@ extern LZMA_API(lzma_ret) lzma_alone_decoder(
|
||||
* won't be read is in[in_size].
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* *out_pos is updated only if encoding succeeds.
|
||||
* *out_pos is updated only if decoding succeeds.
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
* which no data is written to is out[out_size].
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* \file lzma/filter.h
|
||||
* \brief Common filter related types
|
||||
* \brief Common filter related types and functions
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -59,11 +59,6 @@ typedef struct {
|
||||
* If the filter doesn't need options, set this to NULL. If id is
|
||||
* set to LZMA_VLI_UNKNOWN, options is ignored, and thus
|
||||
* doesn't need be initialized.
|
||||
*
|
||||
* Some filters support changing the options in the middle of
|
||||
* the encoding process. These filters store the pointer of the
|
||||
* options structure and communicate with the application via
|
||||
* modifications of the options structure.
|
||||
*/
|
||||
void *options;
|
||||
|
||||
@ -126,15 +121,16 @@ extern LZMA_API(lzma_ret) lzma_filters_copy(const lzma_filter *src,
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate rough memory requirements for raw encoder
|
||||
* \brief Calculate approximate memory requirements for raw encoder
|
||||
*
|
||||
* Because the calculation is rough, this function can be used to calculate
|
||||
* the memory requirements for Block and Stream encoders too.
|
||||
* This function can be used to calculate the memory requirements for
|
||||
* Block and Stream encoders too because Block and Stream encoders don't
|
||||
* need significantly more memory than raw encoder.
|
||||
*
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Rough number of bytes of memory required for the given
|
||||
* \return Number of bytes of memory required for the given
|
||||
* filter chain when encoding.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
|
||||
@ -142,15 +138,16 @@ extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
|
||||
|
||||
|
||||
/**
|
||||
* \brief Calculate rough memory requirements for raw decoder
|
||||
* \brief Calculate approximate memory requirements for raw decoder
|
||||
*
|
||||
* Because the calculation is rough, this function can be used to calculate
|
||||
* the memory requirements for Block and Stream decoders too.
|
||||
* This function can be used to calculate the memory requirements for
|
||||
* Block and Stream decoders too because Block and Stream decoders don't
|
||||
* need significantly more memory than raw decoder.
|
||||
*
|
||||
* \param filters Array of filters terminated with
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Rough number of bytes of memory required for the given
|
||||
* \return Number of bytes of memory required for the given
|
||||
* filter chain when decoding.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
|
||||
@ -251,7 +248,8 @@ extern LZMA_API(lzma_ret) lzma_filters_update(
|
||||
*
|
||||
* \note There is no function to calculate how big output buffer
|
||||
* would surely be big enough. (lzma_stream_buffer_bound()
|
||||
* works only for lzma_stream_buffer_encode().)
|
||||
* works only for lzma_stream_buffer_encode(); raw encoder
|
||||
* won't necessarily meet that bound.)
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
|
||||
const lzma_filter *filters, lzma_allocator *allocator,
|
||||
@ -323,9 +321,10 @@ extern LZMA_API(lzma_ret) lzma_properties_size(
|
||||
* succeeds but using the same options to initialize the encoder
|
||||
* will fail.
|
||||
*
|
||||
* \note It is OK to skip calling this function if
|
||||
* lzma_properties_size() indicated that the size
|
||||
* of the Filter Properties field is zero.
|
||||
* \note If lzma_properties_size() indicated that the size
|
||||
* of the Filter Properties field is zero, calling
|
||||
* lzma_properties_encode() is not required, but it
|
||||
* won't do any harm either.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_properties_encode(
|
||||
const lzma_filter *filter, uint8_t *props) lzma_nothrow;
|
||||
@ -364,11 +363,11 @@ extern LZMA_API(lzma_ret) lzma_properties_decode(
|
||||
* memory to hold the encoded Filter Flags.
|
||||
*
|
||||
* \param size Pointer to integer to hold the calculated size
|
||||
* \param filters Filter ID and associated options whose encoded
|
||||
* \param filter Filter ID and associated options whose encoded
|
||||
* size is to be calculated
|
||||
*
|
||||
* \return - LZMA_OK: *size set successfully. Note that this doesn't
|
||||
* guarantee that filters->options is valid, thus
|
||||
* guarantee that filter->options is valid, thus
|
||||
* lzma_filter_flags_encode() may still fail.
|
||||
* - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options.
|
||||
* - LZMA_PROG_ERROR: Invalid options
|
||||
@ -377,7 +376,7 @@ extern LZMA_API(lzma_ret) lzma_properties_decode(
|
||||
* you need to loop over every lzma_filter entry.
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_filter_flags_size(
|
||||
uint32_t *size, const lzma_filter *filters)
|
||||
uint32_t *size, const lzma_filter *filter)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
|
||||
@ -387,7 +386,7 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_size(
|
||||
* In contrast to some functions, this doesn't allocate the needed buffer.
|
||||
* This is due to how this function is used internally by liblzma.
|
||||
*
|
||||
* \param filters Filter ID and options to be encoded
|
||||
* \param filter Filter ID and options to be encoded
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos out[*out_pos] is the next write position. This
|
||||
* is updated by the encoder.
|
||||
@ -399,7 +398,7 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_size(
|
||||
* buffer space (you should have checked it with
|
||||
* lzma_filter_flags_size()).
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filters,
|
||||
extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
||||
@ -407,8 +406,8 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filters,
|
||||
/**
|
||||
* \brief Decode Filter Flags from given buffer
|
||||
*
|
||||
* The decoded result is stored into *filters. filters->options is
|
||||
* initialized but the old value is NOT free()d.
|
||||
* The decoded result is stored into *filter. The old value of
|
||||
* filter->options is not free()d.
|
||||
*
|
||||
* \return - LZMA_OK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
@ -416,6 +415,6 @@ extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filters,
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
|
||||
lzma_filter *filters, lzma_allocator *allocator,
|
||||
lzma_filter *filter, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t *in_pos, size_t in_size)
|
||||
lzma_nothrow lzma_attr_warn_unused_result;
|
||||
|
@ -39,8 +39,7 @@
|
||||
*
|
||||
* This function may be useful when determining a reasonable memory
|
||||
* usage limit for decompressing or how much memory it is OK to use
|
||||
* for compressing. For example, the default limit used by the xz
|
||||
* command line tool is 40 % of RAM.
|
||||
* for compressing.
|
||||
*
|
||||
* \return On success, the total amount of physical memory in bytes
|
||||
* is returned. If the amount of RAM cannot be determined,
|
||||
|
@ -136,6 +136,13 @@ typedef struct {
|
||||
*
|
||||
* This offset is relative to the beginning of the lzma_index
|
||||
* (i.e. usually the beginning of the .xz file).
|
||||
*
|
||||
* When doing random-access reading, it is possible that
|
||||
* the target offset is not exactly at Block boundary. One
|
||||
* will need to compare the target offset against
|
||||
* uncompressed_file_offset or uncompressed_stream_offset,
|
||||
* and possibly decode and throw away some amount of data
|
||||
* before reaching the target offset.
|
||||
*/
|
||||
lzma_vli uncompressed_file_offset;
|
||||
|
||||
@ -166,14 +173,8 @@ typedef struct {
|
||||
* \brief Uncompressed size of this Block
|
||||
*
|
||||
* You should pass this to the Block decoder if you will
|
||||
* decode this Block.
|
||||
*
|
||||
* When doing random-access reading, it is possible that
|
||||
* the target offset is not exactly at Block boundary. One
|
||||
* will need to compare the target offset against
|
||||
* uncompressed_file_offset or uncompressed_stream_offset,
|
||||
* and possibly decode and throw away some amount of data
|
||||
* before reaching the target offset.
|
||||
* decode this Block. It will allow the Block decoder to
|
||||
* validate the uncompressed size.
|
||||
*/
|
||||
lzma_vli uncompressed_size;
|
||||
|
||||
@ -181,7 +182,8 @@ typedef struct {
|
||||
* \brief Unpadded size of this Block
|
||||
*
|
||||
* You should pass this to the Block decoder if you will
|
||||
* decode this Block.
|
||||
* decode this Block. It will allow the Block decoder to
|
||||
* validate the unpadded size.
|
||||
*/
|
||||
lzma_vli unpadded_size;
|
||||
|
||||
@ -583,7 +585,9 @@ extern LZMA_API(lzma_index *) lzma_index_dup(
|
||||
* \param strm Pointer to properly prepared lzma_stream
|
||||
* \param i Pointer to lzma_index which should be encoded.
|
||||
*
|
||||
* The only valid action value for lzma_code() is LZMA_RUN.
|
||||
* The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* It is enough to use only one of them (you can choose freely; use LZMA_RUN
|
||||
* to support liblzma versions older than 5.0.0).
|
||||
*
|
||||
* \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
|
||||
* - LZMA_MEM_ERROR
|
||||
@ -608,7 +612,9 @@ extern LZMA_API(lzma_ret) lzma_index_encoder(
|
||||
* \param memlimit How much memory the resulting lzma_index is
|
||||
* allowed to require.
|
||||
*
|
||||
* The only valid action value for lzma_code() is LZMA_RUN.
|
||||
* The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
|
||||
* It is enough to use only one of them (you can choose freely; use LZMA_RUN
|
||||
* to support liblzma versions older than 5.0.0).
|
||||
*
|
||||
* \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
|
||||
* - LZMA_MEM_ERROR
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* \file lzma/index_hash.h
|
||||
* \brief Validates Index by using a hash function
|
||||
* \brief Validate Index by using a hash function
|
||||
*
|
||||
* Hashing makes it possible to use constant amount of memory to validate
|
||||
* Index of arbitrary size.
|
||||
|
@ -46,6 +46,10 @@
|
||||
* Match finder has major effect on both speed and compression ratio.
|
||||
* Usually hash chains are faster than binary trees.
|
||||
*
|
||||
* If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better
|
||||
* choice, because binary trees get much higher compression ratio penalty
|
||||
* with LZMA_SYNC_FLUSH.
|
||||
*
|
||||
* The memory usage formulas are only rough estimates, which are closest to
|
||||
* reality when dict_size is a power of two. The formulas are more complex
|
||||
* in reality, and can also change a little between liblzma versions. Use
|
||||
@ -173,6 +177,7 @@ extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
|
||||
* Since LZMA1 and LZMA2 share most of the code, it's simplest to share
|
||||
* the options structure too. For encoding, all but the reserved variables
|
||||
* need to be initialized unless specifically mentioned otherwise.
|
||||
* lzma_lzma_preset() can be used to get a good starting point.
|
||||
*
|
||||
* For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and
|
||||
* preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
|
||||
@ -255,7 +260,13 @@ typedef struct {
|
||||
* eight-bit byte (also known as `literal') are taken into
|
||||
* account when predicting the bits of the next literal.
|
||||
*
|
||||
* \todo Example
|
||||
* E.g. in typical English text, an upper-case letter is
|
||||
* often followed by a lower-case letter, and a lower-case
|
||||
* letter is usually followed by another lower-case letter.
|
||||
* In the US-ASCII character set, the highest three bits are 010
|
||||
* for upper-case letters and 011 for lower-case letters.
|
||||
* When lc is at least 3, the literal coding can take advantage of
|
||||
* this property in the uncompressed data.
|
||||
*
|
||||
* There is a limit that applies to literal context bits and literal
|
||||
* position bits together: lc + lp <= 4. Without this limit the
|
||||
@ -275,12 +286,9 @@ typedef struct {
|
||||
/**
|
||||
* \brief Number of literal position bits
|
||||
*
|
||||
* How many of the lowest bits of the current position (number
|
||||
* of bytes from the beginning of the uncompressed data) in the
|
||||
* uncompressed data is taken into account when predicting the
|
||||
* bits of the next literal (a single eight-bit byte).
|
||||
*
|
||||
* \todo Example
|
||||
* lp affects what kind of alignment in the uncompressed data is
|
||||
* assumed when encoding literals. A literal is a single 8-bit byte.
|
||||
* See pb below for more information about alignment.
|
||||
*/
|
||||
uint32_t lp;
|
||||
# define LZMA_LP_DEFAULT 0
|
||||
@ -288,14 +296,22 @@ typedef struct {
|
||||
/**
|
||||
* \brief Number of position bits
|
||||
*
|
||||
* How many of the lowest bits of the current position in the
|
||||
* uncompressed data is taken into account when estimating
|
||||
* probabilities of matches. A match is a sequence of bytes for
|
||||
* which a matching sequence is found from the dictionary and
|
||||
* thus can be stored as distance-length pair.
|
||||
* pb affects what kind of alignment in the uncompressed data is
|
||||
* assumed in general. The default means four-byte alignment
|
||||
* (2^ pb =2^2=4), which is often a good choice when there's
|
||||
* no better guess.
|
||||
*
|
||||
* Example: If most of the matches occur at byte positions of
|
||||
* 8 * n + 3, that is, 3, 11, 19, ... set pb to 3, because 2**3 == 8.
|
||||
* When the aligment is known, setting pb accordingly may reduce
|
||||
* the file size a little. E.g. with text files having one-byte
|
||||
* alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
|
||||
* improve compression slightly. For UTF-16 text, pb=1 is a good
|
||||
* choice. If the alignment is an odd number like 3 bytes, pb=0
|
||||
* might be the best choice.
|
||||
*
|
||||
* Even though the assumed alignment can be adjusted with pb and
|
||||
* lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
|
||||
* It might be worth taking into account when designing file formats
|
||||
* that are likely to be often compressed with LZMA1 or LZMA2.
|
||||
*/
|
||||
uint32_t pb;
|
||||
# define LZMA_PB_MIN 0
|
||||
@ -346,7 +362,7 @@ typedef struct {
|
||||
*
|
||||
* Setting depth to zero tells liblzma to use an automatic default
|
||||
* value, that depends on the selected match finder and nice_len.
|
||||
* The default is in the range [10, 200] or so (it may vary between
|
||||
* The default is in the range [4, 200] or so (it may vary between
|
||||
* liblzma versions).
|
||||
*
|
||||
* Using a bigger depth value than the default can increase
|
||||
@ -365,8 +381,6 @@ typedef struct {
|
||||
* with the currently supported options, so it is safe to leave these
|
||||
* uninitialized.
|
||||
*/
|
||||
void *reserved_ptr1;
|
||||
void *reserved_ptr2;
|
||||
uint32_t reserved_int1;
|
||||
uint32_t reserved_int2;
|
||||
uint32_t reserved_int3;
|
||||
@ -379,6 +393,8 @@ typedef struct {
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
lzma_reserved_enum reserved_enum4;
|
||||
void *reserved_ptr1;
|
||||
void *reserved_ptr2;
|
||||
|
||||
} lzma_options_lzma;
|
||||
|
||||
|
@ -91,8 +91,6 @@ typedef struct {
|
||||
lzma_reserved_enum reserved_enum2;
|
||||
lzma_reserved_enum reserved_enum3;
|
||||
lzma_reserved_enum reserved_enum4;
|
||||
lzma_reserved_enum reserved_enum5;
|
||||
lzma_reserved_enum reserved_enum6;
|
||||
lzma_bool reserved_bool1;
|
||||
lzma_bool reserved_bool2;
|
||||
lzma_bool reserved_bool3;
|
||||
@ -103,8 +101,6 @@ typedef struct {
|
||||
lzma_bool reserved_bool8;
|
||||
uint32_t reserved_int1;
|
||||
uint32_t reserved_int2;
|
||||
uint32_t reserved_int3;
|
||||
uint32_t reserved_int4;
|
||||
|
||||
} lzma_stream_flags;
|
||||
|
||||
@ -148,7 +144,7 @@ extern LZMA_API(lzma_ret) lzma_stream_footer_encode(
|
||||
/**
|
||||
* \brief Decode Stream Header
|
||||
*
|
||||
* \param options Stream Header options to be encoded.
|
||||
* \param options Target for the decoded Stream Header options.
|
||||
* \param in Beginning of the input buffer of
|
||||
* LZMA_STREAM_HEADER_SIZE bytes.
|
||||
*
|
||||
@ -183,7 +179,7 @@ extern LZMA_API(lzma_ret) lzma_stream_header_decode(
|
||||
/**
|
||||
* \brief Decode Stream Footer
|
||||
*
|
||||
* \param options Stream Header options to be encoded.
|
||||
* \param options Target for the decoded Stream Header options.
|
||||
* \param in Beginning of the input buffer of
|
||||
* LZMA_STREAM_HEADER_SIZE bytes.
|
||||
*
|
||||
|
@ -20,10 +20,10 @@
|
||||
/*
|
||||
* Version number split into components
|
||||
*/
|
||||
#define LZMA_VERSION_MAJOR 4
|
||||
#define LZMA_VERSION_MINOR 999
|
||||
#define LZMA_VERSION_PATCH 9
|
||||
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_BETA
|
||||
#define LZMA_VERSION_MAJOR 5
|
||||
#define LZMA_VERSION_MINOR 0
|
||||
#define LZMA_VERSION_PATCH 0
|
||||
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
|
||||
|
||||
#ifndef LZMA_VERSION_COMMIT
|
||||
# define LZMA_VERSION_COMMIT ""
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* \brief Maximum supported value of variable-length integer
|
||||
* \brief Maximum supported value of a variable-length integer
|
||||
*/
|
||||
#define LZMA_VLI_MAX (UINT64_MAX / 2)
|
||||
|
||||
@ -39,11 +39,10 @@
|
||||
#define LZMA_VLI_UNKNOWN UINT64_MAX
|
||||
|
||||
/**
|
||||
* \brief Maximum supported length of variable length integers
|
||||
* \brief Maximum supported encoded length of variable length integers
|
||||
*/
|
||||
#define LZMA_VLI_BYTES_MAX 9
|
||||
|
||||
|
||||
/**
|
||||
* \brief VLI constant suffix
|
||||
*/
|
||||
@ -53,19 +52,19 @@
|
||||
/**
|
||||
* \brief Variable-length integer type
|
||||
*
|
||||
* This will always be unsigned integer. Valid VLI values are in the range
|
||||
* [0, LZMA_VLI_MAX]. Unknown value is indicated with LZMA_VLI_UNKNOWN,
|
||||
* which is the maximum value of the underlaying integer type.
|
||||
* Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is
|
||||
* indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the
|
||||
* underlaying integer type.
|
||||
*
|
||||
* In future, even if lzma_vli is defined to be something other than uint64_t,
|
||||
* it is guaranteed that 2 * LZMA_VLI_MAX will not overflow lzma_vli.
|
||||
* This simplifies integer overflow detection.
|
||||
* lzma_vli will be uint64_t for the foreseeable future. If a bigger size
|
||||
* is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will
|
||||
* not overflow lzma_vli. This simplifies integer overflow detection.
|
||||
*/
|
||||
typedef uint64_t lzma_vli;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Simple macro to validate variable-length integer
|
||||
* \brief Validate a variable-length integer
|
||||
*
|
||||
* This is useful to test that application has given acceptable values
|
||||
* for example in the uncompressed_size and compressed_size variables.
|
||||
@ -88,9 +87,9 @@ typedef uint64_t lzma_vli;
|
||||
*
|
||||
* \param vli Integer to be encoded
|
||||
* \param vli_pos How many VLI-encoded bytes have already been written
|
||||
* out. When starting to encode a new integer, *vli_pos
|
||||
* must be set to zero. To use single-call encoding,
|
||||
* set vli_pos to NULL.
|
||||
* out. When starting to encode a new integer in
|
||||
* multi-call mode, *vli_pos must be set to zero.
|
||||
* To use single-call encoding, set vli_pos to NULL.
|
||||
* \param out Beginning of the output buffer
|
||||
* \param out_pos The next byte will be written to out[*out_pos].
|
||||
* \param out_size Size of the out buffer; the first byte into
|
||||
@ -126,9 +125,9 @@ extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
|
||||
* initialize it to zero when *vli_pos == 0, so
|
||||
* application isn't required to initialize *vli.
|
||||
* \param vli_pos How many bytes have already been decoded. When
|
||||
* starting to decode a new integer, *vli_pos must
|
||||
* be initialized to zero. To use single-call decoding,
|
||||
* set this to NULL.
|
||||
* starting to decode a new integer in multi-call
|
||||
* mode, *vli_pos must be initialized to zero. To
|
||||
* use single-call decoding, set vli_pos to NULL.
|
||||
* \param in Beginning of the input buffer
|
||||
* \param in_pos The next byte will be read from in[*in_pos].
|
||||
* \param in_size Size of the input buffer; the first byte that
|
||||
|
@ -182,6 +182,20 @@ lzma_code(lzma_stream *strm, lzma_action action)
|
||||
|| !strm->internal->supported_actions[action])
|
||||
return LZMA_PROG_ERROR;
|
||||
|
||||
// Check if unsupported members have been set to non-zero or non-NULL,
|
||||
// which would indicate that some new feature is wanted.
|
||||
if (strm->reserved_ptr1 != NULL
|
||||
|| strm->reserved_ptr2 != NULL
|
||||
|| strm->reserved_ptr3 != NULL
|
||||
|| strm->reserved_ptr4 != NULL
|
||||
|| strm->reserved_int1 != 0
|
||||
|| strm->reserved_int2 != 0
|
||||
|| strm->reserved_int3 != 0
|
||||
|| strm->reserved_int4 != 0
|
||||
|| strm->reserved_enum1 != LZMA_RESERVED_ENUM
|
||||
|| strm->reserved_enum2 != LZMA_RESERVED_ENUM)
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
switch (strm->internal->sequence) {
|
||||
case ISEQ_RUN:
|
||||
switch (action) {
|
||||
|
@ -226,6 +226,7 @@ lzma_raw_encoder_memusage(const lzma_filter *filters)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
extern LZMA_API(lzma_vli)
|
||||
lzma_chunk_size(const lzma_filter *filters)
|
||||
{
|
||||
@ -247,6 +248,7 @@ lzma_chunk_size(const lzma_filter *filters)
|
||||
|
||||
return max;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
extern LZMA_API(lzma_ret)
|
||||
|
@ -16,8 +16,8 @@
|
||||
#include "common.h"
|
||||
|
||||
|
||||
// FIXME !!! Public API
|
||||
extern lzma_vli lzma_chunk_size(const lzma_filter *filters);
|
||||
// FIXME: Might become a part of the public API once finished.
|
||||
// extern lzma_vli lzma_chunk_size(const lzma_filter *filters);
|
||||
|
||||
|
||||
extern lzma_ret lzma_raw_encoder_init(
|
||||
|
@ -18,7 +18,7 @@
|
||||
///
|
||||
/// This should be big enough to avoid making lots of tiny allocations
|
||||
/// but small enough to avoid too much unused memory at once.
|
||||
#define INDEX_GROUP_SIZE 500
|
||||
#define INDEX_GROUP_SIZE 512
|
||||
|
||||
|
||||
/// \brief How many Records can be allocated at once at maximum
|
||||
|
@ -291,6 +291,7 @@ lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
|
||||
lzma_next_strm_init(index_decoder_init, strm, i, memlimit);
|
||||
|
||||
strm->internal->supported_actions[LZMA_RUN] = true;
|
||||
strm->internal->supported_actions[LZMA_FINISH] = true;
|
||||
|
||||
return LZMA_OK;
|
||||
}
|
||||
|
@ -209,6 +209,7 @@ lzma_index_encoder(lzma_stream *strm, const lzma_index *i)
|
||||
lzma_next_strm_init(lzma_index_encoder_init, strm, i);
|
||||
|
||||
strm->internal->supported_actions[LZMA_RUN] = true;
|
||||
strm->internal->supported_actions[LZMA_FINISH] = true;
|
||||
|
||||
return LZMA_OK;
|
||||
}
|
||||
|
@ -191,7 +191,6 @@ lzma2_decode(lzma_coder *restrict coder, lzma_dict *restrict dict,
|
||||
|
||||
case SEQ_COPY: {
|
||||
// Copy from input to the dictionary as is.
|
||||
// FIXME Can copy too much?
|
||||
dict_write(dict, in, in_pos, in_size, &coder->compressed_size);
|
||||
if (coder->compressed_size != 0)
|
||||
return LZMA_OK;
|
||||
|
@ -656,7 +656,8 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
|
||||
}
|
||||
|
||||
case SEQ_EOPM:
|
||||
// TODO Comment
|
||||
// LZMA1 stream with
|
||||
// end-of-payload marker.
|
||||
rc_normalize(SEQ_EOPM);
|
||||
ret = LZMA_STREAM_END;
|
||||
goto out;
|
||||
@ -856,7 +857,6 @@ lzma_decoder_reset(lzma_coder *coder, const void *opt)
|
||||
|
||||
// NOTE: We assume that lc/lp/pb are valid since they were
|
||||
// successfully decoded with lzma_lzma_decode_properties().
|
||||
// FIXME?
|
||||
|
||||
// Calculate pos_mask. We don't need pos_bits as is for anything.
|
||||
coder->pos_mask = (1U << options->pb) - 1;
|
||||
|
@ -334,7 +334,7 @@ lzma_lzma_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
|
||||
|
||||
// With LZMA2 we need to take care that compressed size of
|
||||
// a chunk doesn't get too big.
|
||||
// TODO
|
||||
// FIXME? Check if this could be improved.
|
||||
if (limit != UINT32_MAX
|
||||
&& (mf->read_pos - mf->read_ahead >= limit
|
||||
|| *out_pos + rc_pending(&coder->rc)
|
||||
|
@ -77,6 +77,17 @@ static uint64_t start_time;
|
||||
// gettimeofday().
|
||||
#ifdef SIGALRM
|
||||
|
||||
const int message_progress_sigs[] = {
|
||||
SIGALRM,
|
||||
#ifdef SIGINFO
|
||||
SIGINFO,
|
||||
#endif
|
||||
#ifdef SIGUSR1
|
||||
SIGUSR1,
|
||||
#endif
|
||||
0
|
||||
};
|
||||
|
||||
/// The signal handler for SIGALRM sets this to true. It is set back to false
|
||||
/// once the progress message has been updated.
|
||||
static volatile sig_atomic_t progress_needs_updating = false;
|
||||
@ -142,34 +153,15 @@ message_init(void)
|
||||
*/
|
||||
|
||||
#ifdef SIGALRM
|
||||
// DJGPP lacks SA_RESTART, but it shouldn't give EINTR
|
||||
// in most places either.
|
||||
# if defined(__DJGPP__) && !defined(SA_RESTART)
|
||||
# define SA_RESTART 0
|
||||
# endif
|
||||
|
||||
// Establish the signal handlers which set a flag to tell us that
|
||||
// progress info should be updated. Since these signals don't
|
||||
// require any quick action, we set SA_RESTART. That way we don't
|
||||
// need to block them either in signals_block() to keep stdio
|
||||
// functions from getting EINTR.
|
||||
static const int sigs[] = {
|
||||
SIGALRM,
|
||||
#ifdef SIGINFO
|
||||
SIGINFO,
|
||||
#endif
|
||||
#ifdef SIGUSR1
|
||||
SIGUSR1,
|
||||
#endif
|
||||
};
|
||||
|
||||
// progress info should be updated.
|
||||
struct sigaction sa;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sa.sa_flags = 0;
|
||||
sa.sa_handler = &progress_signal_handler;
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i)
|
||||
if (sigaction(sigs[i], &sa, NULL))
|
||||
for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
|
||||
if (sigaction(message_progress_sigs[i], &sa, NULL))
|
||||
message_signal_handler();
|
||||
#endif
|
||||
|
||||
@ -841,10 +833,13 @@ message_strm(lzma_ret code)
|
||||
case LZMA_STREAM_END:
|
||||
case LZMA_GET_CHECK:
|
||||
case LZMA_PROG_ERROR:
|
||||
return _("Internal error (bug)");
|
||||
// Without "default", compiler will warn if new constants
|
||||
// are added to lzma_ret, it is not too easy to forget to
|
||||
// add the new constants to this function.
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return _("Internal error (bug)");
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,10 +16,14 @@ enum message_verbosity {
|
||||
V_ERROR, ///< Only error messages
|
||||
V_WARNING, ///< Errors and warnings
|
||||
V_VERBOSE, ///< Errors, warnings, and verbose statistics
|
||||
V_DEBUG, ///< Debugging, FIXME remove?
|
||||
V_DEBUG, ///< Very verbose
|
||||
};
|
||||
|
||||
|
||||
/// \brief Signals used for progress message handling
|
||||
extern const int message_progress_sigs[];
|
||||
|
||||
|
||||
/// \brief Initializes the message functions
|
||||
///
|
||||
/// If an error occurs, this function doesn't return.
|
||||
|
@ -71,6 +71,12 @@ signals_init(void)
|
||||
for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i)
|
||||
sigaddset(&hooked_signals, sigs[i]);
|
||||
|
||||
#ifdef SIGALRM
|
||||
// Add also the signals from message.c to hooked_signals.
|
||||
for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
|
||||
sigaddset(&hooked_signals, message_progress_sigs[i]);
|
||||
#endif
|
||||
|
||||
struct sigaction sa;
|
||||
|
||||
// All the signals that we handle we also blocked while the signal
|
||||
@ -142,7 +148,7 @@ signals_exit(void)
|
||||
const int sig = exit_signal;
|
||||
|
||||
if (sig != 0) {
|
||||
#ifdef TUKLIB_DOSLIKE
|
||||
#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
|
||||
// Don't raise(), set only exit status. This avoids
|
||||
// printing unwanted message about SIGINT when the user
|
||||
// presses C-c.
|
||||
|
@ -15,6 +15,10 @@ MK_SSP= no
|
||||
|
||||
.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt"
|
||||
|
||||
.if ${TARGET_CPUARCH} == "sparc64"
|
||||
LIB= gcc
|
||||
.endif
|
||||
|
||||
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}/config ${GCCDIR}
|
||||
|
||||
CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
|
||||
|
@ -184,15 +184,18 @@ The following options are recognized in
|
||||
.It Dv SO_LISTENQLIMIT Ta "get backlog limit of the socket (get only)"
|
||||
.It Dv SO_LISTENQLEN Ta "get complete queue length of the socket (get only)"
|
||||
.It Dv SO_LISTENINCQLEN Ta "get incomplete queue length of the socket (get only)"
|
||||
.It Dv SO_USER_COOKIE Ta "set the 'so_user_cookie' value for the socket (uint32_t, set only)"
|
||||
.El
|
||||
.Pp
|
||||
.Dv SO_DEBUG
|
||||
enables debugging in the underlying protocol modules.
|
||||
.Pp
|
||||
.Dv SO_REUSEADDR
|
||||
indicates that the rules used in validating addresses supplied
|
||||
in a
|
||||
.Xr bind 2
|
||||
system call should allow reuse of local addresses.
|
||||
.Pp
|
||||
.Dv SO_REUSEPORT
|
||||
allows completely duplicate bindings by multiple processes
|
||||
if they all set
|
||||
@ -200,6 +203,7 @@ if they all set
|
||||
before binding the port.
|
||||
This option permits multiple instances of a program to each
|
||||
receive UDP/IP multicast or broadcast datagrams destined for the bound port.
|
||||
.Pp
|
||||
.Dv SO_KEEPALIVE
|
||||
enables the
|
||||
periodic transmission of messages on a connected socket.
|
||||
@ -208,6 +212,7 @@ connected party fail to respond to these messages, the connection is
|
||||
considered broken and processes using the socket are notified via a
|
||||
.Dv SIGPIPE
|
||||
signal when attempting to send data.
|
||||
.Pp
|
||||
.Dv SO_DONTROUTE
|
||||
indicates that outgoing messages should
|
||||
bypass the standard routing facilities.
|
||||
@ -244,6 +249,7 @@ The option
|
||||
requests permission to send broadcast datagrams
|
||||
on the socket.
|
||||
Broadcast was a privileged operation in earlier versions of the system.
|
||||
.Pp
|
||||
With protocols that support out-of-band data, the
|
||||
.Dv SO_OOBINLINE
|
||||
option
|
||||
@ -256,6 +262,7 @@ calls without the
|
||||
.Dv MSG_OOB
|
||||
flag.
|
||||
Some protocols always behave as if this option is set.
|
||||
.Pp
|
||||
.Dv SO_SNDBUF
|
||||
and
|
||||
.Dv SO_RCVBUF
|
||||
@ -285,6 +292,7 @@ only if the low water mark amount could be processed.
|
||||
The default value for
|
||||
.Dv SO_SNDLOWAT
|
||||
is set to a convenient size for network efficiency, often 1024.
|
||||
.Pp
|
||||
.Dv SO_RCVLOWAT
|
||||
is an option to set the minimum count for input operations.
|
||||
In general, receive calls will block until any (non-zero) amount of data
|
||||
@ -317,6 +325,7 @@ In the current implementation, this timer is restarted each time additional
|
||||
data are delivered to the protocol,
|
||||
implying that the limit applies to output portions ranging in size
|
||||
from the low water mark to the high water mark for output.
|
||||
.Pp
|
||||
.Dv SO_RCVTIMEO
|
||||
is an option to set a timeout value for input operations.
|
||||
It accepts a
|
||||
@ -338,6 +347,15 @@ The value must be from 0 to one less than the number returned from
|
||||
the sysctl
|
||||
.Em net.fibs .
|
||||
.Pp
|
||||
.Dv SO_USER_COOKIE
|
||||
can be used to set the uint32_t so_user_cookie field in the socket.
|
||||
The value is an uint32_t, and can be used in the kernel code that
|
||||
manipulates traffic related to the socket.
|
||||
The default value for the field is 0.
|
||||
As an example, the value can be used as the skipto target or
|
||||
pipe number in
|
||||
.Nm ipfw/dummynet .
|
||||
.Pp
|
||||
.Dv SO_ACCEPTFILTER
|
||||
places an
|
||||
.Xr accept_filter 9
|
||||
|
@ -147,11 +147,13 @@ SRCS+= ${file}.c
|
||||
. endif
|
||||
.endfor
|
||||
|
||||
.if ${MK_INSTALLLIB} != "no"
|
||||
.if ${MACHINE_CPUARCH} != "sparc64"
|
||||
. if ${MK_INSTALLLIB} != "no"
|
||||
SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a
|
||||
.endif
|
||||
.if ${MK_PROFILE} != "no"
|
||||
. endif
|
||||
. if ${MK_PROFILE} != "no"
|
||||
SYMLINKS+=libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
@ -59,13 +59,14 @@
|
||||
#define PACKAGE "xz"
|
||||
#define PACKAGE_BUGREPORT "lasse.collin@tukaani.org"
|
||||
#define PACKAGE_NAME "XZ Utils"
|
||||
#define PACKAGE_STRING "XZ Utils 4.999.9beta"
|
||||
#define PACKAGE_STRING "XZ Utils 5.0.0"
|
||||
#define PACKAGE_TARNAME "xz"
|
||||
#define PACKAGE_URL "http://tukaani.org/xz/"
|
||||
#define PACKAGE_VERSION "4.999.9beta"
|
||||
#define PACKAGE_VERSION "5.0.0"
|
||||
#define SIZEOF_SIZE_T 8
|
||||
#define STDC_HEADERS 1
|
||||
#define TUKLIB_CPUCORES_SYSCTL 1
|
||||
#define TUKLIB_FAST_UNALIGNED_ACCESS 1
|
||||
#define TUKLIB_PHYSMEM_SYSCONF 1
|
||||
#ifndef _ALL_SOURCE
|
||||
# define _ALL_SOURCE 1
|
||||
@ -82,7 +83,7 @@
|
||||
#ifndef __EXTENSIONS__
|
||||
# define __EXTENSIONS__ 1
|
||||
#endif
|
||||
#define VERSION "4.999.9beta"
|
||||
#define VERSION "5.0.0"
|
||||
#if defined(__FreeBSD__)
|
||||
#include <machine/endian.h>
|
||||
#if _BYTE_ORDER == _BIG_ENDIAN
|
||||
|
@ -29,7 +29,12 @@ SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG}
|
||||
MLINKS= rtld.1 ld-elf.so.1.1 \
|
||||
rtld.1 ld.so.1
|
||||
|
||||
CFLAGS+= -fPIC -DPIC
|
||||
.if ${MACHINE_CPUARCH} == "sparc64"
|
||||
CFLAGS+= -fPIC
|
||||
.else
|
||||
CFLAGS+= -fpic
|
||||
.endif
|
||||
CFLAGS+= -DPIC
|
||||
LDFLAGS+= -shared -Wl,-Bsymbolic
|
||||
DPADD= ${LIBC_PIC}
|
||||
LDADD= -lc_pic -lssp_nonshared
|
||||
|
@ -297,11 +297,6 @@ build_image() {
|
||||
PICO_OBJ=${l_objtree}/picobsd/${THETYPE}
|
||||
log "PICO_OBJ is ${PICO_OBJ}"
|
||||
|
||||
if [ ${OSVERSION} -ge 500035 ] ; then
|
||||
export MAKEOBJDIRPREFIX=${l_objtree}
|
||||
eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\""
|
||||
eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV`
|
||||
fi
|
||||
# create build directory and subtree
|
||||
mkdir -p ${BUILDDIR}/crunch
|
||||
# remove any old stuff
|
||||
@ -979,10 +974,17 @@ set_build_parameters() {
|
||||
l_usrtree=${USR:-${SRC}/../usr}
|
||||
fi
|
||||
l_objtree=${l_usrtree}/obj-pico
|
||||
|
||||
PICO_TREE=${PICO_TREE:-${SRC}/release/picobsd}
|
||||
set `grep "#define[\t ]__FreeBSD_version" ${SRC}/sys/sys/param.h`
|
||||
OSVERSION=$3
|
||||
log "OSVERSION is ${OSVERSION}"
|
||||
if [ ${OSVERSION} -ge 500035 ] ; then
|
||||
export MAKEOBJDIRPREFIX=${l_objtree}
|
||||
eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\""
|
||||
eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV`
|
||||
fi
|
||||
|
||||
if [ "${o_init_src}" != "" ] ; then
|
||||
if [ ${OSVERSION} -lt 500035 ] ; then
|
||||
create_includes_and_libraries
|
||||
|
@ -1510,6 +1510,17 @@ interface.
|
||||
Matches TCP packets that have the SYN bit set but no ACK bit.
|
||||
This is the short form of
|
||||
.Dq Li tcpflags\ syn,!ack .
|
||||
.It Cm sockarg
|
||||
Matches packets that are associated to a local socket and
|
||||
for which the SO_USER_COOKIE socket option has been set
|
||||
to a non-zero value. As a side effect, the value of the
|
||||
option is made available as
|
||||
.Cm tablearg
|
||||
value, which in turn can be used as
|
||||
.Cm skipto
|
||||
or
|
||||
.Cm pipe
|
||||
number.
|
||||
.It Cm src-ip Ar ip-address
|
||||
Matches IPv4 packets whose source IP is one of the address(es)
|
||||
specified as an argument.
|
||||
|
@ -266,6 +266,7 @@ static struct _s_x rule_options[] = {
|
||||
{ "estab", TOK_ESTAB },
|
||||
{ "established", TOK_ESTAB },
|
||||
{ "setup", TOK_SETUP },
|
||||
{ "sockarg", TOK_SOCKARG },
|
||||
{ "tcpdatalen", TOK_TCPDATALEN },
|
||||
{ "tcpflags", TOK_TCPFLAGS },
|
||||
{ "tcpflgs", TOK_TCPFLAGS },
|
||||
@ -1338,6 +1339,9 @@ show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth)
|
||||
case O_FIB:
|
||||
printf(" fib %u", cmd->arg1 );
|
||||
break;
|
||||
case O_SOCKARG:
|
||||
printf(" sockarg");
|
||||
break;
|
||||
|
||||
case O_IN:
|
||||
printf(cmd->len & F_NOT ? " out" : " in");
|
||||
@ -3531,6 +3535,9 @@ ipfw_add(char *av[])
|
||||
fill_cmd(cmd, O_FIB, 0, strtoul(*av, NULL, 0));
|
||||
av++;
|
||||
break;
|
||||
case TOK_SOCKARG:
|
||||
fill_cmd(cmd, O_SOCKARG, 0, 0);
|
||||
break;
|
||||
|
||||
case TOK_LOOKUP: {
|
||||
ipfw_insn_u32 *c = (ipfw_insn_u32 *)cmd;
|
||||
|
@ -199,6 +199,7 @@ enum tokens {
|
||||
TOK_FIB,
|
||||
TOK_SETFIB,
|
||||
TOK_LOOKUP,
|
||||
TOK_SOCKARG,
|
||||
};
|
||||
/*
|
||||
* the following macro returns an error message if we run out of
|
||||
|
@ -30,7 +30,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd September 25, 2010
|
||||
.Dd November 12, 2010
|
||||
.Dt SIFTR 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -610,7 +610,9 @@ and the FreeBSD Foundation.
|
||||
.Sh HISTORY
|
||||
.Nm
|
||||
first appeared in
|
||||
.Fx 9.0 .
|
||||
.Fx 7.4
|
||||
and
|
||||
.Fx 8.2 .
|
||||
.Pp
|
||||
.Nm
|
||||
was first released in 2007 by Lawrence Stewart and James Healy whilst working on
|
||||
|
@ -1318,7 +1318,6 @@ MLINKS+=vfs_getopt.9 vfs_copyopt.9 \
|
||||
vfs_getopt.9 vfs_setopt_part.9 \
|
||||
vfs_getopt.9 vfs_setopts.9
|
||||
MLINKS+=VFS_LOCK_GIANT.9 VFS_UNLOCK_GIANT.9
|
||||
MLINKS+=vgone.9 vgonel.9
|
||||
MLINKS+=vhold.9 vdrop.9 \
|
||||
vhold.9 vdropl.9 \
|
||||
vhold.9 vholdl.9
|
||||
|
@ -75,7 +75,6 @@ A value of 0 is returned if the flush is successful; otherwise,
|
||||
will be returned.
|
||||
.Sh SEE ALSO
|
||||
.Xr vgone 9 ,
|
||||
.Xr vgonel 9 ,
|
||||
.Xr vrele 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
|
@ -26,24 +26,21 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd November 21, 2001
|
||||
.Dd November 12, 2010
|
||||
.Dt VGONE 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm vgone , vgonel
|
||||
.Nm vgone
|
||||
.Nd "prepare a vnode for reuse"
|
||||
.Sh SYNOPSIS
|
||||
.In sys/param.h
|
||||
.In sys/vnode.h
|
||||
.Ft void
|
||||
.Fn vgone "struct vnode *vp"
|
||||
.Ft void
|
||||
.Fn vgonel "struct vnode *vp" "struct thread *td"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Fn vgone
|
||||
and
|
||||
.Fn vgonel
|
||||
prepare a vnode for reuse by another file system.
|
||||
function prepares the vnode to be destroyed.
|
||||
The preparation includes the cleaning of all file system specific data and
|
||||
the removal from its mount point vnode list.
|
||||
.Pp
|
||||
@ -55,17 +52,12 @@ flag is not set, it is moved to the head of the free list
|
||||
as in most cases the vnode
|
||||
is about to be reused, or its file system is being unmounted.
|
||||
.Pp
|
||||
The difference between
|
||||
The
|
||||
.Fn vgone
|
||||
and
|
||||
.Fn vgonel
|
||||
is that
|
||||
.Fn vgone
|
||||
locks the vnode interlock and then calls
|
||||
.Fn vgonel
|
||||
while
|
||||
.Fn vgonel
|
||||
expects the interlock to already be locked.
|
||||
function takes an exclusively locked vnode, and returns with the vnode
|
||||
exclusively locked.
|
||||
.Sh SEE ALSO
|
||||
.Xr vnode 9
|
||||
.Sh AUTHORS
|
||||
This manual page was written by
|
||||
.An Chad David Aq davidc@acns.ab.ca .
|
||||
|
@ -7,11 +7,11 @@ unix ?= We run FreeBSD, not UNIX.
|
||||
.if !defined(%POSIX)
|
||||
#
|
||||
# MACHINE_CPUARCH defines a collection of MACHINE_ARCH. Machines with
|
||||
# the same MACHINE_ARCH can run reach-other's binaries, so it
|
||||
# necessarily has word size and endian swizzled in. However, support
|
||||
# files for these machines often are shared amongst all combinations
|
||||
# of size and/or endian. This is called MACHINE_CPU in NetBSD, but
|
||||
# that's used for something different in FreeBSD.
|
||||
# the same MACHINE_ARCH can run each other's binaries, so it necessarily
|
||||
# has word size and endian swizzled in. However, support files for
|
||||
# these machines often are shared amongst all combinations of size
|
||||
# and/or endian. This is called MACHINE_CPU in NetBSD, but that's used
|
||||
# for something different in FreeBSD.
|
||||
#
|
||||
MACHINE_CPUARCH=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
||||
.endif
|
||||
|
@ -90,6 +90,10 @@ device ad7418 # AD7418 on I2C bus
|
||||
device cambria_fled # Font Panel LED on I2C bus
|
||||
device cambria_led # 8-LED latch
|
||||
|
||||
device gpio
|
||||
device gpioled
|
||||
device cambria_gpio # GPIO pins on J11
|
||||
|
||||
device ata
|
||||
device atadisk # ATA disk drives
|
||||
device avila_ata # Gateworks CF/IDE support
|
||||
|
@ -54,6 +54,10 @@ hint.fled.0.addr=0x5a
|
||||
# Octal LED Latch
|
||||
hint.led_cambria.0.at="ixp0"
|
||||
|
||||
# GPIO pins
|
||||
hint.gpio_cambria.0.at="iicbus0"
|
||||
hint.gpio_cambria.0.addr=0x56
|
||||
|
||||
# Analog Devices AD7418 temperature sensor
|
||||
hint.ad7418.0.at="iicbus0"
|
||||
hint.ad7418.0.addr=0x50
|
||||
|
471
sys/arm/xscale/ixp425/cambria_gpio.c
Normal file
471
sys/arm/xscale/ixp425/cambria_gpio.c
Normal file
@ -0,0 +1,471 @@
|
||||
/*-
|
||||
* Copyright (c) 2010, Andrew Thompson <thompsa@FreeBSD.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice unmodified, this list of conditions, and the following
|
||||
* disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* GPIO driver for Gateworks Cambria
|
||||
*
|
||||
* Note:
|
||||
* The Cambria PLD does not set the i2c ack bit after each write, if we used the
|
||||
* regular iicbus interface it would abort the xfer after the address byte
|
||||
* times out and not write our latch. To get around this we grab the iicbus and
|
||||
* then do our own bit banging. This is a comprimise to changing all the iicbb
|
||||
* device methods to allow a flag to be passed down and is similir to how Linux
|
||||
* does it.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/rman.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/gpio.h>
|
||||
|
||||
#include <arm/xscale/ixp425/ixp425reg.h>
|
||||
#include <arm/xscale/ixp425/ixp425var.h>
|
||||
#include <arm/xscale/ixp425/ixdp425reg.h>
|
||||
|
||||
#include <dev/iicbus/iiconf.h>
|
||||
#include <dev/iicbus/iicbus.h>
|
||||
|
||||
#include "iicbb_if.h"
|
||||
#include "gpio_if.h"
|
||||
|
||||
#define IIC_M_WR 0 /* write operation */
|
||||
#define PLD_ADDR 0xac /* slave address */
|
||||
|
||||
#define I2C_DELAY 10
|
||||
|
||||
#define GPIO_CONF_CLR(sc, reg, mask) \
|
||||
GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, reg) &~ (mask))
|
||||
#define GPIO_CONF_SET(sc, reg, mask) \
|
||||
GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, reg) | (mask))
|
||||
|
||||
#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
|
||||
#define GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
|
||||
#define GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED)
|
||||
|
||||
#define GPIO_PINS 5
|
||||
struct cambria_gpio_softc {
|
||||
device_t sc_dev;
|
||||
bus_space_tag_t sc_iot;
|
||||
bus_space_handle_t sc_gpio_ioh;
|
||||
struct mtx sc_mtx;
|
||||
struct gpio_pin sc_pins[GPIO_PINS];
|
||||
uint8_t sc_latch;
|
||||
};
|
||||
|
||||
struct cambria_gpio_pin {
|
||||
const char *name;
|
||||
int pin;
|
||||
int flags;
|
||||
};
|
||||
|
||||
extern struct ixp425_softc *ixp425_softc;
|
||||
|
||||
static struct cambria_gpio_pin cambria_gpio_pins[GPIO_PINS] = {
|
||||
{ "GPIO0", 0, GPIO_PIN_OUTPUT },
|
||||
{ "GPIO1", 1, GPIO_PIN_OUTPUT },
|
||||
{ "GPIO2", 2, GPIO_PIN_OUTPUT },
|
||||
{ "GPIO3", 3, GPIO_PIN_OUTPUT },
|
||||
{ "GPIO4", 4, GPIO_PIN_OUTPUT },
|
||||
};
|
||||
|
||||
/*
|
||||
* Helpers
|
||||
*/
|
||||
static int cambria_gpio_read(struct cambria_gpio_softc *, uint32_t, unsigned int *);
|
||||
static int cambria_gpio_write(struct cambria_gpio_softc *);
|
||||
|
||||
/*
|
||||
* Driver stuff
|
||||
*/
|
||||
static int cambria_gpio_probe(device_t dev);
|
||||
static int cambria_gpio_attach(device_t dev);
|
||||
static int cambria_gpio_detach(device_t dev);
|
||||
|
||||
/*
|
||||
* GPIO interface
|
||||
*/
|
||||
static int cambria_gpio_pin_max(device_t dev, int *maxpin);
|
||||
static int cambria_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps);
|
||||
static int cambria_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t
|
||||
*flags);
|
||||
static int cambria_gpio_pin_getname(device_t dev, uint32_t pin, char *name);
|
||||
static int cambria_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags);
|
||||
static int cambria_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value);
|
||||
static int cambria_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val);
|
||||
static int cambria_gpio_pin_toggle(device_t dev, uint32_t pin);
|
||||
|
||||
static int
|
||||
i2c_getsda(struct cambria_gpio_softc *sc)
|
||||
{
|
||||
uint32_t reg;
|
||||
|
||||
mtx_lock(&Giant);
|
||||
GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT);
|
||||
|
||||
reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR);
|
||||
mtx_unlock(&Giant);
|
||||
return (reg & GPIO_I2C_SDA_BIT);
|
||||
}
|
||||
|
||||
static void
|
||||
i2c_setsda(struct cambria_gpio_softc *sc, int val)
|
||||
{
|
||||
|
||||
mtx_lock(&Giant);
|
||||
GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT);
|
||||
if (val)
|
||||
GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT);
|
||||
else
|
||||
GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT);
|
||||
mtx_unlock(&Giant);
|
||||
DELAY(I2C_DELAY);
|
||||
}
|
||||
|
||||
static void
|
||||
i2c_setscl(struct cambria_gpio_softc *sc, int val)
|
||||
{
|
||||
|
||||
mtx_lock(&Giant);
|
||||
GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT);
|
||||
if (val)
|
||||
GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT);
|
||||
else
|
||||
GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT);
|
||||
mtx_unlock(&Giant);
|
||||
DELAY(I2C_DELAY);
|
||||
}
|
||||
|
||||
static void
|
||||
i2c_sendstart(struct cambria_gpio_softc *sc)
|
||||
{
|
||||
i2c_setsda(sc, 1);
|
||||
i2c_setscl(sc, 1);
|
||||
i2c_setsda(sc, 0);
|
||||
i2c_setscl(sc, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
i2c_sendstop(struct cambria_gpio_softc *sc)
|
||||
{
|
||||
i2c_setscl(sc, 1);
|
||||
i2c_setsda(sc, 1);
|
||||
i2c_setscl(sc, 0);
|
||||
i2c_setsda(sc, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
i2c_sendbyte(struct cambria_gpio_softc *sc, u_char data)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=7; i>=0; i--) {
|
||||
i2c_setsda(sc, data & (1<<i));
|
||||
i2c_setscl(sc, 1);
|
||||
i2c_setscl(sc, 0);
|
||||
}
|
||||
i2c_setscl(sc, 1);
|
||||
i2c_getsda(sc);
|
||||
i2c_setscl(sc, 0);
|
||||
}
|
||||
|
||||
static u_char
|
||||
i2c_readbyte(struct cambria_gpio_softc *sc)
|
||||
{
|
||||
int i;
|
||||
unsigned char data=0;
|
||||
|
||||
for (i=7; i>=0; i--)
|
||||
{
|
||||
i2c_setscl(sc, 1);
|
||||
if (i2c_getsda(sc))
|
||||
data |= (1<<i);
|
||||
i2c_setscl(sc, 0);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_read(struct cambria_gpio_softc *sc, uint32_t pin, unsigned int *val)
|
||||
{
|
||||
device_t dev = sc->sc_dev;
|
||||
int error;
|
||||
|
||||
error = iicbus_request_bus(device_get_parent(dev), dev,
|
||||
IIC_DONTWAIT);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
i2c_sendstart(sc);
|
||||
i2c_sendbyte(sc, PLD_ADDR | LSB);
|
||||
*val = (i2c_readbyte(sc) & (1 << pin)) != 0;
|
||||
i2c_sendstop(sc);
|
||||
|
||||
iicbus_release_bus(device_get_parent(dev), dev);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_write(struct cambria_gpio_softc *sc)
|
||||
{
|
||||
device_t dev = sc->sc_dev;
|
||||
int error;
|
||||
|
||||
error = iicbus_request_bus(device_get_parent(dev), dev,
|
||||
IIC_DONTWAIT);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
i2c_sendstart(sc);
|
||||
i2c_sendbyte(sc, PLD_ADDR & ~LSB);
|
||||
i2c_sendbyte(sc, sc->sc_latch);
|
||||
i2c_sendstop(sc);
|
||||
|
||||
iicbus_release_bus(device_get_parent(dev), dev);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_pin_max(device_t dev, int *maxpin)
|
||||
{
|
||||
|
||||
*maxpin = GPIO_PINS - 1;
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (pin >= GPIO_PINS)
|
||||
return (EINVAL);
|
||||
|
||||
*caps = sc->sc_pins[pin].gp_caps;
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (pin >= GPIO_PINS)
|
||||
return (EINVAL);
|
||||
|
||||
*flags = sc->sc_pins[pin].gp_flags;
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_pin_getname(device_t dev, uint32_t pin, char *name)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
|
||||
if (pin >= GPIO_PINS)
|
||||
return (EINVAL);
|
||||
|
||||
memcpy(name, sc->sc_pins[pin].gp_name, GPIOMAXNAME);
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
int error;
|
||||
|
||||
if (pin >= GPIO_PINS)
|
||||
return (EINVAL);
|
||||
|
||||
/* Filter out unwanted flags */
|
||||
if ((flags &= sc->sc_pins[pin].gp_caps) != flags)
|
||||
return (EINVAL);
|
||||
|
||||
/* Can't mix input/output together */
|
||||
if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) ==
|
||||
(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT))
|
||||
return (EINVAL);
|
||||
|
||||
GPIO_LOCK(sc);
|
||||
sc->sc_pins[pin].gp_flags = flags;
|
||||
|
||||
sc->sc_latch |= (1 << pin);
|
||||
error = cambria_gpio_write(sc);
|
||||
GPIO_UNLOCK(sc);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
int error;
|
||||
|
||||
if (pin >= GPIO_PINS || sc->sc_pins[pin].gp_flags != GPIO_PIN_OUTPUT)
|
||||
return (EINVAL);
|
||||
|
||||
GPIO_LOCK(sc);
|
||||
if (value)
|
||||
sc->sc_latch |= (1 << pin);
|
||||
else
|
||||
sc->sc_latch &= ~(1 << pin);
|
||||
error = cambria_gpio_write(sc);
|
||||
GPIO_UNLOCK(sc);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
int error = 0;
|
||||
|
||||
if (pin >= GPIO_PINS)
|
||||
return (EINVAL);
|
||||
|
||||
GPIO_LOCK(sc);
|
||||
if (sc->sc_pins[pin].gp_flags == GPIO_PIN_OUTPUT)
|
||||
*val = (sc->sc_latch & (1 << pin)) ? 1 : 0;
|
||||
else
|
||||
error = cambria_gpio_read(sc, pin, val);
|
||||
GPIO_UNLOCK(sc);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_pin_toggle(device_t dev, uint32_t pin)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
int error;
|
||||
|
||||
if (pin >= GPIO_PINS || sc->sc_pins[pin].gp_flags != GPIO_PIN_OUTPUT)
|
||||
return (EINVAL);
|
||||
|
||||
GPIO_LOCK(sc);
|
||||
sc->sc_latch ^= (1 << pin);
|
||||
error = cambria_gpio_write(sc);
|
||||
GPIO_UNLOCK(sc);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_probe(device_t dev)
|
||||
{
|
||||
|
||||
device_set_desc(dev, "Gateworks Cambria GPIO driver");
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_attach(device_t dev)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
int pin;
|
||||
|
||||
sc->sc_dev = dev;
|
||||
sc->sc_iot = ixp425_softc->sc_iot;
|
||||
sc->sc_gpio_ioh = ixp425_softc->sc_gpio_ioh;
|
||||
|
||||
mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
|
||||
MTX_DEF);
|
||||
|
||||
for (pin = 0; pin < GPIO_PINS; pin++) {
|
||||
struct cambria_gpio_pin *p = &cambria_gpio_pins[pin];
|
||||
|
||||
strncpy(sc->sc_pins[pin].gp_name, p->name, GPIOMAXNAME);
|
||||
sc->sc_pins[pin].gp_pin = pin;
|
||||
sc->sc_pins[pin].gp_caps = GPIO_PIN_INPUT|GPIO_PIN_OUTPUT;
|
||||
sc->sc_pins[pin].gp_flags = 0;
|
||||
cambria_gpio_pin_setflags(dev, pin, p->flags);
|
||||
}
|
||||
|
||||
device_add_child(dev, "gpioc", device_get_unit(dev));
|
||||
device_add_child(dev, "gpiobus", device_get_unit(dev));
|
||||
return (bus_generic_attach(dev));
|
||||
}
|
||||
|
||||
static int
|
||||
cambria_gpio_detach(device_t dev)
|
||||
{
|
||||
struct cambria_gpio_softc *sc = device_get_softc(dev);
|
||||
|
||||
KASSERT(mtx_initialized(&sc->sc_mtx), ("gpio mutex not initialized"));
|
||||
|
||||
bus_generic_detach(dev);
|
||||
|
||||
mtx_destroy(&sc->sc_mtx);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static device_method_t cambria_gpio_methods[] = {
|
||||
DEVMETHOD(device_probe, cambria_gpio_probe),
|
||||
DEVMETHOD(device_attach, cambria_gpio_attach),
|
||||
DEVMETHOD(device_detach, cambria_gpio_detach),
|
||||
|
||||
/* GPIO protocol */
|
||||
DEVMETHOD(gpio_pin_max, cambria_gpio_pin_max),
|
||||
DEVMETHOD(gpio_pin_getname, cambria_gpio_pin_getname),
|
||||
DEVMETHOD(gpio_pin_getflags, cambria_gpio_pin_getflags),
|
||||
DEVMETHOD(gpio_pin_getcaps, cambria_gpio_pin_getcaps),
|
||||
DEVMETHOD(gpio_pin_setflags, cambria_gpio_pin_setflags),
|
||||
DEVMETHOD(gpio_pin_get, cambria_gpio_pin_get),
|
||||
DEVMETHOD(gpio_pin_set, cambria_gpio_pin_set),
|
||||
DEVMETHOD(gpio_pin_toggle, cambria_gpio_pin_toggle),
|
||||
{0, 0},
|
||||
};
|
||||
|
||||
static driver_t cambria_gpio_driver = {
|
||||
"gpio_cambria",
|
||||
cambria_gpio_methods,
|
||||
sizeof(struct cambria_gpio_softc),
|
||||
};
|
||||
static devclass_t cambria_gpio_devclass;
|
||||
extern devclass_t gpiobus_devclass, gpioc_devclass;
|
||||
extern driver_t gpiobus_driver, gpioc_driver;
|
||||
|
||||
DRIVER_MODULE(gpio_cambria, iicbus, cambria_gpio_driver, cambria_gpio_devclass, 0, 0);
|
||||
DRIVER_MODULE(gpiobus, gpio_cambria, gpiobus_driver, gpiobus_devclass, 0, 0);
|
||||
DRIVER_MODULE(gpioc, gpio_cambria, gpioc_driver, gpioc_devclass, 0, 0);
|
||||
MODULE_VERSION(gpio_cambria, 1);
|
||||
MODULE_DEPEND(gpio_cambria, iicbus, 1, 1, 1);
|
@ -6,4 +6,5 @@ arm/xscale/ixp425/avila_gpio.c optional avila_gpio
|
||||
arm/xscale/ixp425/cambria_exp_space.c standard
|
||||
arm/xscale/ixp425/cambria_fled.c optional cambria_fled
|
||||
arm/xscale/ixp425/cambria_led.c optional cambria_led
|
||||
arm/xscale/ixp425/cambria_gpio.c optional cambria_gpio
|
||||
arm/xscale/ixp425/ixdp425_pci.c optional pci
|
||||
|
@ -2598,6 +2598,8 @@ netinet/ip_mroute.c optional mrouting inet | mrouting inet6
|
||||
netinet/ip_options.c optional inet
|
||||
netinet/ip_output.c optional inet
|
||||
netinet/raw_ip.c optional inet
|
||||
netinet/cc/cc.c optional inet
|
||||
netinet/cc/cc_newreno.c optional inet
|
||||
netinet/sctp_asconf.c optional inet sctp
|
||||
netinet/sctp_auth.c optional inet sctp
|
||||
netinet/sctp_bsd_addr.c optional inet sctp
|
||||
|
@ -85,7 +85,6 @@ powerpc/aim/mmu_oea.c optional aim powerpc
|
||||
powerpc/aim/mmu_oea64.c optional aim
|
||||
powerpc/aim/mp_cpudep.c optional aim smp
|
||||
powerpc/aim/nexus.c optional aim
|
||||
powerpc/aim/ofw_machdep.c optional aim
|
||||
powerpc/aim/ofwmagic.S optional aim
|
||||
powerpc/aim/slb.c optional aim powerpc64
|
||||
powerpc/aim/swtch32.S optional aim powerpc
|
||||
@ -131,6 +130,7 @@ powerpc/mpc85xx/nexus.c optional mpc85xx
|
||||
powerpc/mpc85xx/openpic_fdt.c optional fdt
|
||||
powerpc/mpc85xx/pci_fdt.c optional pci mpc85xx
|
||||
powerpc/ofw/ofw_cpu.c optional aim
|
||||
powerpc/ofw/ofw_machdep.c optional aim
|
||||
powerpc/ofw/ofw_pcibus.c optional pci aim
|
||||
powerpc/ofw/ofw_pcib_pci.c optional pci aim
|
||||
powerpc/ofw/ofw_real.c optional aim
|
||||
|
@ -668,9 +668,19 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *sc)
|
||||
count = MAX_CX_STATES;
|
||||
}
|
||||
|
||||
/* Set up all valid states. */
|
||||
sc->cpu_non_c3 = 0;
|
||||
sc->cpu_cx_count = 0;
|
||||
cx_ptr = sc->cpu_cx_states;
|
||||
|
||||
/*
|
||||
* C1 has been required since just after ACPI 1.0.
|
||||
* Reserve the first slot for it.
|
||||
*/
|
||||
cx_ptr->type = ACPI_STATE_C0;
|
||||
cx_ptr++;
|
||||
sc->cpu_cx_count++;
|
||||
|
||||
/* Set up all valid states. */
|
||||
for (i = 0; i < count; i++) {
|
||||
pkg = &top->Package.Elements[i + 1];
|
||||
if (!ACPI_PKG_VALID(pkg, 4) ||
|
||||
@ -685,9 +695,14 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *sc)
|
||||
/* Validate the state to see if we should use it. */
|
||||
switch (cx_ptr->type) {
|
||||
case ACPI_STATE_C1:
|
||||
sc->cpu_non_c3 = i;
|
||||
cx_ptr++;
|
||||
sc->cpu_cx_count++;
|
||||
if (sc->cpu_cx_states[0].type == ACPI_STATE_C0) {
|
||||
/* This is the first C1 state. Use the reserved slot. */
|
||||
sc->cpu_cx_states[0] = *cx_ptr;
|
||||
} else {
|
||||
sc->cpu_non_c3 = i;
|
||||
cx_ptr++;
|
||||
sc->cpu_cx_count++;
|
||||
}
|
||||
continue;
|
||||
case ACPI_STATE_C2:
|
||||
sc->cpu_non_c3 = i;
|
||||
@ -726,6 +741,13 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *sc)
|
||||
}
|
||||
AcpiOsFree(buf.Pointer);
|
||||
|
||||
/* If C1 state was not found, we need one now. */
|
||||
cx_ptr = sc->cpu_cx_states;
|
||||
if (cx_ptr->type == ACPI_STATE_C0) {
|
||||
cx_ptr->type = ACPI_STATE_C1;
|
||||
cx_ptr->trans_lat = 0;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -481,7 +481,7 @@ static device_method_t gpiobus_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t gpiobus_driver = {
|
||||
driver_t gpiobus_driver = {
|
||||
"gpiobus",
|
||||
gpiobus_methods,
|
||||
sizeof(struct gpiobus_softc)
|
||||
|
@ -188,7 +188,7 @@ static device_method_t gpioc_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t gpioc_driver = {
|
||||
driver_t gpioc_driver = {
|
||||
"gpioc",
|
||||
gpioc_methods,
|
||||
sizeof(struct gpioc_softc)
|
||||
|
@ -784,10 +784,10 @@ fill_kinfo_proc_only(struct proc *p, struct kinfo_proc *kp)
|
||||
calcru(p, &kp->ki_rusage.ru_utime, &kp->ki_rusage.ru_stime);
|
||||
PROC_SUNLOCK(p);
|
||||
calccru(p, &kp->ki_childutime, &kp->ki_childstime);
|
||||
|
||||
/* Some callers want child-times in a single value */
|
||||
/* Some callers want child times in a single value. */
|
||||
kp->ki_childtime = kp->ki_childstime;
|
||||
timevaladd(&kp->ki_childtime, &kp->ki_childutime);
|
||||
|
||||
tp = NULL;
|
||||
if (p->p_pgrp) {
|
||||
kp->ki_pgid = p->p_pgrp->pg_id;
|
||||
|
@ -2386,6 +2386,7 @@ sosetopt(struct socket *so, struct sockopt *sopt)
|
||||
struct linger l;
|
||||
struct timeval tv;
|
||||
u_long val;
|
||||
uint32_t val32;
|
||||
#ifdef MAC
|
||||
struct mac extmac;
|
||||
#endif
|
||||
@ -2461,6 +2462,15 @@ sosetopt(struct socket *so, struct sockopt *sopt)
|
||||
so->so_fibnum = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case SO_USER_COOKIE:
|
||||
error = sooptcopyin(sopt, &val32, sizeof val32,
|
||||
sizeof val32);
|
||||
if (error)
|
||||
goto bad;
|
||||
so->so_user_cookie = val32;
|
||||
break;
|
||||
|
||||
case SO_SNDBUF:
|
||||
case SO_RCVBUF:
|
||||
case SO_SNDLOWAT:
|
||||
|
161
sys/netinet/cc.h
Normal file
161
sys/netinet/cc.h
Normal file
@ -0,0 +1,161 @@
|
||||
/*-
|
||||
* Copyright (c) 2007-2008
|
||||
* Swinburne University of Technology, Melbourne, Australia.
|
||||
* Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org>
|
||||
* Copyright (c) 2010 The FreeBSD Foundation
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software was developed at the Centre for Advanced Internet
|
||||
* Architectures, Swinburne University, by Lawrence Stewart and James Healy,
|
||||
* made possible in part by a grant from the Cisco University Research Program
|
||||
* Fund at Community Foundation Silicon Valley.
|
||||
*
|
||||
* Portions of this software were developed at the Centre for Advanced
|
||||
* Internet Architectures, Swinburne University of Technology, Melbourne,
|
||||
* Australia by David Hayes under sponsorship from the FreeBSD Foundation.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
* This software was first released in 2007 by James Healy and Lawrence Stewart
|
||||
* whilst working on the NewTCP research project at Swinburne University's
|
||||
* Centre for Advanced Internet Architectures, Melbourne, Australia, which was
|
||||
* made possible in part by a grant from the Cisco University Research Program
|
||||
* Fund at Community Foundation Silicon Valley. More details are available at:
|
||||
* http://caia.swin.edu.au/urp/newtcp/
|
||||
*/
|
||||
|
||||
#ifndef _NETINET_CC_H_
|
||||
#define _NETINET_CC_H_
|
||||
|
||||
/* XXX: TCP_CA_NAME_MAX define lives in tcp.h for compat reasons. */
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
/* Global CC vars. */
|
||||
extern STAILQ_HEAD(cc_head, cc_algo) cc_list;
|
||||
extern const int tcprexmtthresh;
|
||||
extern struct cc_algo newreno_cc_algo;
|
||||
|
||||
/* Define the new net.inet.tcp.cc sysctl tree. */
|
||||
SYSCTL_DECL(_net_inet_tcp_cc);
|
||||
|
||||
/* CC housekeeping functions. */
|
||||
void cc_init(void);
|
||||
int cc_register_algo(struct cc_algo *add_cc);
|
||||
int cc_deregister_algo(struct cc_algo *remove_cc);
|
||||
|
||||
/*
|
||||
* Wrapper around transport structs that contain same-named congestion
|
||||
* control variables. Allows algos to be shared amongst multiple CC aware
|
||||
* transprots.
|
||||
*/
|
||||
struct cc_var {
|
||||
void *cc_data; /* Per-connection private CC algorithm data. */
|
||||
int bytes_this_ack; /* # bytes acked by the current ACK. */
|
||||
tcp_seq curack; /* Most recent ACK. */
|
||||
uint32_t flags; /* Flags for cc_var (see below) */
|
||||
int type; /* Indicates which ptr is valid in ccvc. */
|
||||
union ccv_container {
|
||||
struct tcpcb *tcp;
|
||||
struct sctp_nets *sctp;
|
||||
} ccvc;
|
||||
};
|
||||
|
||||
/* cc_var flags. */
|
||||
#define CCF_ABC_SENTAWND 0x0001 /* ABC counted cwnd worth of bytes? */
|
||||
#define CCF_CWND_LIMITED 0x0002 /* Are we currently cwnd limited? */
|
||||
|
||||
/* ACK types passed to the ack_received() hook. */
|
||||
#define CC_ACK 0x0001 /* Regular in sequence ACK. */
|
||||
#define CC_DUPACK 0x0002 /* Duplicate ACK. */
|
||||
#define CC_PARTIALACK 0x0004 /* Not yet. */
|
||||
#define CC_SACK 0x0008 /* Not yet. */
|
||||
|
||||
/*
|
||||
* Congestion signal types passed to the cong_signal() hook. The highest order 8
|
||||
* bits (0x01000000 - 0x80000000) are reserved for CC algos to declare their own
|
||||
* congestion signal types.
|
||||
*/
|
||||
#define CC_ECN 0x000001/* ECN marked packet received. */
|
||||
#define CC_RTO 0x000002/* RTO fired. */
|
||||
#define CC_RTO_ERR 0x000004/* RTO fired in error. */
|
||||
#define CC_NDUPACK 0x000008/* Threshold of dupack's reached. */
|
||||
|
||||
/*
|
||||
* Structure to hold data and function pointers that together represent a
|
||||
* congestion control algorithm.
|
||||
*/
|
||||
struct cc_algo {
|
||||
char name[TCP_CA_NAME_MAX];
|
||||
|
||||
/* Init global module state on kldload. */
|
||||
int (*mod_init)(void);
|
||||
|
||||
/* Cleanup global module state on kldunload. */
|
||||
int (*mod_destroy)(void);
|
||||
|
||||
/* Init CC state for a new control block. */
|
||||
int (*cb_init)(struct cc_var *ccv);
|
||||
|
||||
/* Cleanup CC state for a terminating control block. */
|
||||
void (*cb_destroy)(struct cc_var *ccv);
|
||||
|
||||
/* Init variables for a newly established connection. */
|
||||
void (*conn_init)(struct cc_var *ccv);
|
||||
|
||||
/* Called on receipt of an ack. */
|
||||
void (*ack_received)(struct cc_var *ccv, uint16_t type);
|
||||
|
||||
/* Called on detection of a congestion signal. */
|
||||
void (*cong_signal)(struct cc_var *ccv, uint32_t type);
|
||||
|
||||
/* Called after exiting congestion recovery. */
|
||||
void (*post_recovery)(struct cc_var *ccv);
|
||||
|
||||
/* Called when data transfer resumes after an idle period. */
|
||||
void (*after_idle)(struct cc_var *ccv);
|
||||
|
||||
STAILQ_ENTRY (cc_algo) entries;
|
||||
};
|
||||
|
||||
/* Macro to obtain the CC algo's struct ptr. */
|
||||
#define CC_ALGO(tp) ((tp)->cc_algo)
|
||||
|
||||
/* Macro to obtain the CC algo's data ptr. */
|
||||
#define CC_DATA(tp) ((tp)->ccv->cc_data)
|
||||
|
||||
/* Macro to obtain the system default CC algo's struct ptr. */
|
||||
#define CC_DEFAULT() STAILQ_FIRST(&cc_list)
|
||||
|
||||
extern struct rwlock cc_list_lock;
|
||||
#define CC_LIST_LOCK_INIT() rw_init(&cc_list_lock, "cc_list")
|
||||
#define CC_LIST_LOCK_DESTROY() rw_destroy(&cc_list_lock)
|
||||
#define CC_LIST_RLOCK() rw_rlock(&cc_list_lock)
|
||||
#define CC_LIST_RUNLOCK() rw_runlock(&cc_list_lock)
|
||||
#define CC_LIST_WLOCK() rw_wlock(&cc_list_lock)
|
||||
#define CC_LIST_WUNLOCK() rw_wunlock(&cc_list_lock)
|
||||
#define CC_LIST_WLOCK_ASSERT() rw_assert(&cc_list_lock, RA_WLOCKED)
|
||||
|
||||
#endif /* _NETINET_CC_H_ */
|
340
sys/netinet/cc/cc.c
Normal file
340
sys/netinet/cc/cc.c
Normal file
@ -0,0 +1,340 @@
|
||||
/*-
|
||||
* Copyright (c) 2007-2008
|
||||
* Swinburne University of Technology, Melbourne, Australia.
|
||||
* Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org>
|
||||
* Copyright (c) 2010 The FreeBSD Foundation
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software was developed at the Centre for Advanced Internet
|
||||
* Architectures, Swinburne University, by Lawrence Stewart and James Healy,
|
||||
* made possible in part by a grant from the Cisco University Research Program
|
||||
* Fund at Community Foundation Silicon Valley.
|
||||
*
|
||||
* Portions of this software were developed at the Centre for Advanced
|
||||
* Internet Architectures, Swinburne University of Technology, Melbourne,
|
||||
* Australia by David Hayes under sponsorship from the FreeBSD Foundation.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This software was first released in 2007 by James Healy and Lawrence Stewart
|
||||
* whilst working on the NewTCP research project at Swinburne University's
|
||||
* Centre for Advanced Internet Architectures, Melbourne, Australia, which was
|
||||
* made possible in part by a grant from the Cisco University Research Program
|
||||
* Fund at Community Foundation Silicon Valley. More details are available at:
|
||||
* http://caia.swin.edu.au/urp/newtcp/
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/libkern.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/rwlock.h>
|
||||
#include <sys/sbuf.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_var.h>
|
||||
|
||||
#include <netinet/cc.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_pcb.h>
|
||||
#include <netinet/tcp_var.h>
|
||||
|
||||
#include <netinet/cc/cc_module.h>
|
||||
|
||||
/*
|
||||
* List of available cc algorithms on the current system. First element
|
||||
* is used as the system default CC algorithm.
|
||||
*/
|
||||
struct cc_head cc_list = STAILQ_HEAD_INITIALIZER(cc_list);
|
||||
|
||||
/* Protects the cc_list TAILQ. */
|
||||
struct rwlock cc_list_lock;
|
||||
|
||||
/*
|
||||
* Set the default CC algorithm to new_default. The default is identified
|
||||
* by being the first element in the cc_list TAILQ.
|
||||
*/
|
||||
static void
|
||||
cc_set_default(struct cc_algo *new_default)
|
||||
{
|
||||
CC_LIST_WLOCK_ASSERT();
|
||||
|
||||
/*
|
||||
* Make the requested system default CC algorithm the first element in
|
||||
* the list if it isn't already.
|
||||
*/
|
||||
if (new_default != CC_DEFAULT()) {
|
||||
STAILQ_REMOVE(&cc_list, new_default, cc_algo, entries);
|
||||
STAILQ_INSERT_HEAD(&cc_list, new_default, entries);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Sysctl handler to show and change the default CC algorithm.
|
||||
*/
|
||||
static int
|
||||
cc_default_algo(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
struct cc_algo *funcs;
|
||||
int err, found;
|
||||
|
||||
err = found = 0;
|
||||
|
||||
if (req->newptr == NULL) {
|
||||
char default_cc[TCP_CA_NAME_MAX];
|
||||
|
||||
/* Just print the current default. */
|
||||
CC_LIST_RLOCK();
|
||||
strlcpy(default_cc, CC_DEFAULT()->name, TCP_CA_NAME_MAX);
|
||||
CC_LIST_RUNLOCK();
|
||||
err = sysctl_handle_string(oidp, default_cc, 1, req);
|
||||
} else {
|
||||
/* Find algo with specified name and set it to default. */
|
||||
CC_LIST_WLOCK();
|
||||
STAILQ_FOREACH(funcs, &cc_list, entries) {
|
||||
if (strncmp((char *)req->newptr, funcs->name,
|
||||
TCP_CA_NAME_MAX) == 0) {
|
||||
found = 1;
|
||||
cc_set_default(funcs);
|
||||
}
|
||||
}
|
||||
CC_LIST_WUNLOCK();
|
||||
|
||||
if (!found)
|
||||
err = ESRCH;
|
||||
}
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sysctl handler to display the list of available CC algorithms.
|
||||
*/
|
||||
static int
|
||||
cc_list_available(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
struct cc_algo *algo;
|
||||
struct sbuf *s;
|
||||
int err, first;
|
||||
|
||||
err = 0;
|
||||
first = 1;
|
||||
s = sbuf_new(NULL, NULL, TCP_CA_NAME_MAX, SBUF_AUTOEXTEND);
|
||||
|
||||
if (s == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
CC_LIST_RLOCK();
|
||||
STAILQ_FOREACH(algo, &cc_list, entries) {
|
||||
err = sbuf_printf(s, first ? "%s" : ", %s", algo->name);
|
||||
if (err)
|
||||
break;
|
||||
first = 0;
|
||||
}
|
||||
CC_LIST_RUNLOCK();
|
||||
|
||||
if (!err) {
|
||||
sbuf_finish(s);
|
||||
err = sysctl_handle_string(oidp, sbuf_data(s), 1, req);
|
||||
}
|
||||
|
||||
sbuf_delete(s);
|
||||
return (err);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialise CC subsystem on system boot.
|
||||
*/
|
||||
void
|
||||
cc_init()
|
||||
{
|
||||
CC_LIST_LOCK_INIT();
|
||||
STAILQ_INIT(&cc_list);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns non-zero on success, 0 on failure.
|
||||
*/
|
||||
int
|
||||
cc_deregister_algo(struct cc_algo *remove_cc)
|
||||
{
|
||||
struct cc_algo *funcs, *tmpfuncs;
|
||||
struct tcpcb *tp;
|
||||
struct inpcb *inp;
|
||||
int err;
|
||||
|
||||
err = ENOENT;
|
||||
|
||||
/* Never allow newreno to be deregistered. */
|
||||
if (&newreno_cc_algo == remove_cc)
|
||||
return (EPERM);
|
||||
|
||||
/* Remove algo from cc_list so that new connections can't use it. */
|
||||
CC_LIST_WLOCK();
|
||||
STAILQ_FOREACH_SAFE(funcs, &cc_list, entries, tmpfuncs) {
|
||||
if (funcs == remove_cc) {
|
||||
/*
|
||||
* If we're removing the current system default,
|
||||
* reset the default to newreno.
|
||||
*/
|
||||
if (strncmp(CC_DEFAULT()->name, remove_cc->name,
|
||||
TCP_CA_NAME_MAX) == 0)
|
||||
cc_set_default(&newreno_cc_algo);
|
||||
|
||||
STAILQ_REMOVE(&cc_list, funcs, cc_algo, entries);
|
||||
err = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
CC_LIST_WUNLOCK();
|
||||
|
||||
if (!err) {
|
||||
/*
|
||||
* Check all active control blocks and change any that are
|
||||
* using this algorithm back to newreno. If the algorithm that
|
||||
* was in use requires cleanup code to be run, call it.
|
||||
*
|
||||
* New connections already part way through being initialised
|
||||
* with the CC algo we're removing will not race with this code
|
||||
* because the INP_INFO_WLOCK is held during initialisation.
|
||||
* We therefore don't enter the loop below until the connection
|
||||
* list has stabilised.
|
||||
*/
|
||||
INP_INFO_RLOCK(&V_tcbinfo);
|
||||
LIST_FOREACH(inp, &V_tcb, inp_list) {
|
||||
INP_WLOCK(inp);
|
||||
/* Important to skip tcptw structs. */
|
||||
if (!(inp->inp_flags & INP_TIMEWAIT) &&
|
||||
(tp = intotcpcb(inp)) != NULL) {
|
||||
/*
|
||||
* By holding INP_WLOCK here, we are
|
||||
* assured that the connection is not
|
||||
* currently executing inside the CC
|
||||
* module's functions i.e. it is safe to
|
||||
* make the switch back to newreno.
|
||||
*/
|
||||
if (CC_ALGO(tp) == remove_cc) {
|
||||
tmpfuncs = CC_ALGO(tp);
|
||||
/* Newreno does not require any init. */
|
||||
CC_ALGO(tp) = &newreno_cc_algo;
|
||||
if (tmpfuncs->cb_destroy != NULL)
|
||||
tmpfuncs->cb_destroy(tp->ccv);
|
||||
}
|
||||
}
|
||||
INP_WUNLOCK(inp);
|
||||
}
|
||||
INP_INFO_RUNLOCK(&V_tcbinfo);
|
||||
}
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns 0 on success, non-zero on failure.
|
||||
*/
|
||||
int
|
||||
cc_register_algo(struct cc_algo *add_cc)
|
||||
{
|
||||
struct cc_algo *funcs;
|
||||
int err;
|
||||
|
||||
err = 0;
|
||||
|
||||
/*
|
||||
* Iterate over list of registered CC algorithms and make sure
|
||||
* we're not trying to add a duplicate.
|
||||
*/
|
||||
CC_LIST_WLOCK();
|
||||
STAILQ_FOREACH(funcs, &cc_list, entries) {
|
||||
if (funcs == add_cc || strncmp(funcs->name, add_cc->name,
|
||||
TCP_CA_NAME_MAX) == 0)
|
||||
err = EEXIST;
|
||||
}
|
||||
|
||||
if (!err)
|
||||
STAILQ_INSERT_TAIL(&cc_list, add_cc, entries);
|
||||
|
||||
CC_LIST_WUNLOCK();
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handles kld related events. Returns 0 on success, non-zero on failure.
|
||||
*/
|
||||
int
|
||||
cc_modevent(module_t mod, int event_type, void *data)
|
||||
{
|
||||
struct cc_algo *algo;
|
||||
int err;
|
||||
|
||||
err = 0;
|
||||
algo = (struct cc_algo *)data;
|
||||
|
||||
switch(event_type) {
|
||||
case MOD_LOAD:
|
||||
if (algo->mod_init != NULL)
|
||||
err = algo->mod_init();
|
||||
if (!err)
|
||||
err = cc_register_algo(algo);
|
||||
break;
|
||||
|
||||
case MOD_QUIESCE:
|
||||
case MOD_SHUTDOWN:
|
||||
case MOD_UNLOAD:
|
||||
err = cc_deregister_algo(algo);
|
||||
if (!err && algo->mod_destroy != NULL)
|
||||
algo->mod_destroy();
|
||||
if (err == ENOENT)
|
||||
err = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
err = EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
/* Declare sysctl tree and populate it. */
|
||||
SYSCTL_NODE(_net_inet_tcp, OID_AUTO, cc, CTLFLAG_RW, NULL,
|
||||
"congestion control related settings");
|
||||
|
||||
SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, CTLTYPE_STRING|CTLFLAG_RW,
|
||||
NULL, 0, cc_default_algo, "A", "default congestion control algorithm");
|
||||
|
||||
SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, available, CTLTYPE_STRING|CTLFLAG_RD,
|
||||
NULL, 0, cc_list_available, "A",
|
||||
"list available congestion control algorithms");
|
70
sys/netinet/cc/cc_module.h
Normal file
70
sys/netinet/cc/cc_module.h
Normal file
@ -0,0 +1,70 @@
|
||||
/*-
|
||||
* Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software was developed by Lawrence Stewart while studying at the Centre
|
||||
* for Advanced Internet Architectures, Swinburne University, made possible in
|
||||
* part by a grant from the Cisco University Research Program Fund at Community
|
||||
* Foundation Silicon Valley.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
* This software was first released in 2009 by Lawrence Stewart as part of the
|
||||
* NewTCP research project at Swinburne University's Centre for Advanced
|
||||
* Internet Architectures, Melbourne, Australia, which was made possible in part
|
||||
* by a grant from the Cisco University Research Program Fund at Community
|
||||
* Foundation Silicon Valley. More details are available at:
|
||||
* http://caia.swin.edu.au/urp/newtcp/
|
||||
*/
|
||||
|
||||
#ifndef _NETINET_CC_MODULE_H_
|
||||
#define _NETINET_CC_MODULE_H_
|
||||
|
||||
/*
|
||||
* Allows a CC algorithm to manipulate a commonly named CC variable regardless
|
||||
* of the transport protocol and associated C struct.
|
||||
* XXXLAS: Out of action until the work to support SCTP is done.
|
||||
*
|
||||
#define CCV(ccv, what) \
|
||||
(*( \
|
||||
(ccv)->type == IPPROTO_TCP ? &(ccv)->ccvc.tcp->what : \
|
||||
&(ccv)->ccvc.sctp->what \
|
||||
))
|
||||
*/
|
||||
#define CCV(ccv, what) (ccv)->ccvc.tcp->what
|
||||
|
||||
#define DECLARE_CC_MODULE(ccname, ccalgo) \
|
||||
static moduledata_t cc_##ccname = { \
|
||||
.name = #ccname, \
|
||||
.evhand = cc_modevent, \
|
||||
.priv = ccalgo \
|
||||
}; \
|
||||
DECLARE_MODULE(ccname, cc_##ccname, \
|
||||
SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY)
|
||||
|
||||
int cc_modevent(module_t mod, int type, void *data);
|
||||
|
||||
#endif /* _NETINET_CC_MODULE_H_ */
|
231
sys/netinet/cc/cc_newreno.c
Normal file
231
sys/netinet/cc/cc_newreno.c
Normal file
@ -0,0 +1,231 @@
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
|
||||
* The Regents of the University of California.
|
||||
* Copyright (c) 2007-2008,2010
|
||||
* Swinburne University of Technology, Melbourne, Australia.
|
||||
* Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org>
|
||||
* Copyright (c) 2010 The FreeBSD Foundation
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software was developed at the Centre for Advanced Internet
|
||||
* Architectures, Swinburne University, by Lawrence Stewart, James Healy and
|
||||
* David Hayes, made possible in part by a grant from the Cisco University
|
||||
* Research Program Fund at Community Foundation Silicon Valley.
|
||||
*
|
||||
* Portions of this software were developed at the Centre for Advanced
|
||||
* Internet Architectures, Swinburne University of Technology, Melbourne,
|
||||
* Australia by David Hayes under sponsorship from the FreeBSD Foundation.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This software was first released in 2007 by James Healy and Lawrence Stewart
|
||||
* whilst working on the NewTCP research project at Swinburne University's
|
||||
* Centre for Advanced Internet Architectures, Melbourne, Australia, which was
|
||||
* made possible in part by a grant from the Cisco University Research Program
|
||||
* Fund at Community Foundation Silicon Valley. More details are available at:
|
||||
* http://caia.swin.edu.au/urp/newtcp/
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_var.h>
|
||||
|
||||
#include <netinet/cc.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_pcb.h>
|
||||
#include <netinet/tcp_seq.h>
|
||||
#include <netinet/tcp_var.h>
|
||||
|
||||
#include <netinet/cc/cc_module.h>
|
||||
|
||||
void newreno_ack_received(struct cc_var *ccv, uint16_t type);
|
||||
void newreno_cong_signal(struct cc_var *ccv, uint32_t type);
|
||||
void newreno_post_recovery(struct cc_var *ccv);
|
||||
void newreno_after_idle(struct cc_var *ccv);
|
||||
|
||||
struct cc_algo newreno_cc_algo = {
|
||||
.name = "newreno",
|
||||
.ack_received = newreno_ack_received,
|
||||
.cong_signal = newreno_cong_signal,
|
||||
.post_recovery = newreno_post_recovery,
|
||||
.after_idle = newreno_after_idle
|
||||
};
|
||||
|
||||
/*
|
||||
* Increase cwnd on receipt of a successful ACK:
|
||||
* if cwnd <= ssthresh, increases by 1 MSS per ACK
|
||||
* if cwnd > ssthresh, increase by ~1 MSS per RTT
|
||||
*/
|
||||
void
|
||||
newreno_ack_received(struct cc_var *ccv, uint16_t type)
|
||||
{
|
||||
if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) &&
|
||||
(ccv->flags & CCF_CWND_LIMITED)) {
|
||||
u_int cw = CCV(ccv, snd_cwnd);
|
||||
u_int incr = CCV(ccv, t_maxseg);
|
||||
|
||||
/*
|
||||
* Regular in-order ACK, open the congestion window.
|
||||
* Method depends on which congestion control state we're
|
||||
* in (slow start or cong avoid) and if ABC (RFC 3465) is
|
||||
* enabled.
|
||||
*
|
||||
* slow start: cwnd <= ssthresh
|
||||
* cong avoid: cwnd > ssthresh
|
||||
*
|
||||
* slow start and ABC (RFC 3465):
|
||||
* Grow cwnd exponentially by the amount of data
|
||||
* ACKed capping the max increment per ACK to
|
||||
* (abc_l_var * maxseg) bytes.
|
||||
*
|
||||
* slow start without ABC (RFC 5681):
|
||||
* Grow cwnd exponentially by maxseg per ACK.
|
||||
*
|
||||
* cong avoid and ABC (RFC 3465):
|
||||
* Grow cwnd linearly by maxseg per RTT for each
|
||||
* cwnd worth of ACKed data.
|
||||
*
|
||||
* cong avoid without ABC (RFC 5681):
|
||||
* Grow cwnd linearly by approximately maxseg per RTT using
|
||||
* maxseg^2 / cwnd per ACK as the increment.
|
||||
* If cwnd > maxseg^2, fix the cwnd increment at 1 byte to
|
||||
* avoid capping cwnd.
|
||||
*/
|
||||
if (cw > CCV(ccv, snd_ssthresh)) {
|
||||
if (V_tcp_do_rfc3465) {
|
||||
if (ccv->flags & CCF_ABC_SENTAWND)
|
||||
ccv->flags &= ~CCF_ABC_SENTAWND;
|
||||
else
|
||||
incr = 0;
|
||||
} else
|
||||
incr = max((incr * incr / cw), 1);
|
||||
} else if (V_tcp_do_rfc3465) {
|
||||
/*
|
||||
* In slow-start with ABC enabled and no RTO in sight?
|
||||
* (Must not use abc_l_var > 1 if slow starting after
|
||||
* an RTO. On RTO, snd_nxt = snd_una, so the
|
||||
* snd_nxt == snd_max check is sufficient to
|
||||
* handle this).
|
||||
*
|
||||
* XXXLAS: Find a way to signal SS after RTO that
|
||||
* doesn't rely on tcpcb vars.
|
||||
*/
|
||||
if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max))
|
||||
incr = min(ccv->bytes_this_ack,
|
||||
V_tcp_abc_l_var * CCV(ccv, t_maxseg));
|
||||
else
|
||||
incr = min(ccv->bytes_this_ack, CCV(ccv, t_maxseg));
|
||||
}
|
||||
/* ABC is on by default, so incr equals 0 frequently. */
|
||||
if (incr > 0)
|
||||
CCV(ccv, snd_cwnd) = min(cw + incr,
|
||||
TCP_MAXWIN << CCV(ccv, snd_scale));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* manage congestion signals
|
||||
*/
|
||||
void
|
||||
newreno_cong_signal(struct cc_var *ccv, uint32_t type)
|
||||
{
|
||||
u_int win;
|
||||
|
||||
win = max(CCV(ccv, snd_cwnd) / 2 / CCV(ccv, t_maxseg), 2) *
|
||||
CCV(ccv, t_maxseg);
|
||||
|
||||
switch (type) {
|
||||
case CC_NDUPACK:
|
||||
if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) {
|
||||
if (!IN_CONGRECOVERY(CCV(ccv, t_flags)))
|
||||
CCV(ccv, snd_ssthresh) = win;
|
||||
ENTER_RECOVERY(CCV(ccv, t_flags));
|
||||
}
|
||||
break;
|
||||
case CC_ECN:
|
||||
if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) {
|
||||
CCV(ccv, snd_ssthresh) = win;
|
||||
CCV(ccv, snd_cwnd) = win;
|
||||
ENTER_CONGRECOVERY(CCV(ccv, t_flags));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* decrease the cwnd in response to packet loss or a transmit timeout.
|
||||
* th can be null, in which case cwnd will be set according to reno instead
|
||||
* of new reno.
|
||||
*/
|
||||
void
|
||||
newreno_post_recovery(struct cc_var *ccv)
|
||||
{
|
||||
if (IN_FASTRECOVERY(CCV(ccv, t_flags))) {
|
||||
/*
|
||||
* Fast recovery will conclude after returning from this
|
||||
* function. Window inflation should have left us with
|
||||
* approximately snd_ssthresh outstanding data. But in case we
|
||||
* would be inclined to send a burst, better to do it via the
|
||||
* slow start mechanism.
|
||||
*
|
||||
* XXXLAS: Find a way to do this without needing curack
|
||||
*/
|
||||
if (SEQ_GT(ccv->curack + CCV(ccv, snd_ssthresh),
|
||||
CCV(ccv, snd_max)))
|
||||
CCV(ccv, snd_cwnd) = CCV(ccv, snd_max) -
|
||||
ccv->curack + CCV(ccv, t_maxseg);
|
||||
else
|
||||
CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* if a connection has been idle for a while and more data is ready to be sent,
|
||||
* reset cwnd
|
||||
*/
|
||||
void
|
||||
newreno_after_idle(struct cc_var *ccv)
|
||||
{
|
||||
/*
|
||||
* We have been idle for "a while" and no acks are expected to clock out
|
||||
* any data we send -- slow start to get ack "clock" running again.
|
||||
*/
|
||||
if (V_tcp_do_rfc3390)
|
||||
CCV(ccv, snd_cwnd) = min(4 * CCV(ccv, t_maxseg),
|
||||
max(2 * CCV(ccv, t_maxseg), 4380));
|
||||
else
|
||||
CCV(ccv, snd_cwnd) = CCV(ccv, t_maxseg) * 2;
|
||||
}
|
||||
|
||||
|
||||
DECLARE_CC_MODULE(newreno, &newreno_cc_algo);
|
@ -193,9 +193,12 @@ enum ipfw_opcodes { /* arguments (4 byte each) */
|
||||
O_SETFIB, /* arg1=FIB number */
|
||||
O_FIB, /* arg1=FIB desired fib number */
|
||||
|
||||
O_SOCKARG, /* socket argument */
|
||||
|
||||
O_LAST_OPCODE /* not an opcode! */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* The extension header are filtered only for presence using a bit
|
||||
* vector with a flag for each header.
|
||||
|
@ -1801,6 +1801,39 @@ do { \
|
||||
match = 1;
|
||||
break;
|
||||
|
||||
case O_SOCKARG: {
|
||||
struct inpcb *inp = args->inp;
|
||||
struct inpcbinfo *pi;
|
||||
|
||||
if (is_ipv6) /* XXX can we remove this ? */
|
||||
break;
|
||||
|
||||
if (proto == IPPROTO_TCP)
|
||||
pi = &V_tcbinfo;
|
||||
else if (proto == IPPROTO_UDP)
|
||||
pi = &V_udbinfo;
|
||||
else
|
||||
break;
|
||||
|
||||
/* For incomming packet, lookup up the
|
||||
inpcb using the src/dest ip/port tuple */
|
||||
if (inp == NULL) {
|
||||
INP_INFO_RLOCK(pi);
|
||||
inp = in_pcblookup_hash(pi,
|
||||
src_ip, htons(src_port),
|
||||
dst_ip, htons(dst_port),
|
||||
0, NULL);
|
||||
INP_INFO_RUNLOCK(pi);
|
||||
}
|
||||
|
||||
if (inp && inp->inp_socket) {
|
||||
tablearg = inp->inp_socket->so_user_cookie;
|
||||
if (tablearg)
|
||||
match = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case O_TAGGED: {
|
||||
struct m_tag *mtag;
|
||||
uint32_t tag = (cmd->arg1 == IP_FW_TABLEARG) ?
|
||||
|
@ -572,6 +572,7 @@ check_ipfw_struct(struct ip_fw *rule, int size)
|
||||
case O_IPTOS:
|
||||
case O_IPPRECEDENCE:
|
||||
case O_IPVER:
|
||||
case O_SOCKARG:
|
||||
case O_TCPWIN:
|
||||
case O_TCPFLAGS:
|
||||
case O_TCPOPTS:
|
||||
|
@ -1,8 +1,6 @@
|
||||
/**
|
||||
* @file alias_sctp.c
|
||||
* Copyright (c) 2008, Centre for Advanced Internet Architectures
|
||||
* Swinburne University of Technology, Melbourne, Australia
|
||||
* (CRICOS number 00111D).
|
||||
/*-
|
||||
* Copyright (c) 2008
|
||||
* Swinburne University of Technology, Melbourne, Australia.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -12,10 +10,6 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The names of the authors, the "Centre for Advanced Internet Architectures"
|
||||
* and "Swinburne University of Technology" may not be used to endorse
|
||||
* or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
@ -28,7 +22,9 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Alias_sctp forms part of the libalias kernel module to handle
|
||||
* Network Address Translation (NAT) for the SCTP protocol.
|
||||
*
|
||||
|
@ -1,8 +1,6 @@
|
||||
/**
|
||||
* @file alias_sctp.h
|
||||
* Copyright (c) 2008, Centre for Advanced Internet Architectures
|
||||
* Swinburne University of Technology, Melbourne, Australia
|
||||
* (CRICOS number 00111D).
|
||||
/*-
|
||||
* Copyright (c) 2008
|
||||
* Swinburne University of Technology, Melbourne, Australia.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -12,10 +10,6 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The names of the authors, the "Centre for Advanced Internet Architectures"
|
||||
* and "Swinburne University of Technology" may not be used to endorse
|
||||
* or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
@ -28,7 +22,9 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Alias_sctp forms part of the libalias kernel module to handle
|
||||
* Network Address Translation (NAT) for the SCTP protocol.
|
||||
*
|
||||
|
@ -1,7 +1,6 @@
|
||||
/*-
|
||||
* Copyright (c) 2007-2009, Centre for Advanced Internet Architectures
|
||||
* Swinburne University of Technology, Melbourne, Australia
|
||||
* (CRICOS number 00111D).
|
||||
* Copyright (c) 2007-2009
|
||||
* Swinburne University of Technology, Melbourne, Australia.
|
||||
* Copyright (c) 2009-2010, The FreeBSD Foundation
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -1,6 +1,20 @@
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* Copyright (c) 2007-2008,2010
|
||||
* Swinburne University of Technology, Melbourne, Australia.
|
||||
* Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org>
|
||||
* Copyright (c) 2010 The FreeBSD Foundation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Portions of this software were developed at the Centre for Advanced Internet
|
||||
* Architectures, Swinburne University, by Lawrence Stewart, James Healy and
|
||||
* David Hayes, made possible in part by a grant from the Cisco University
|
||||
* Research Program Fund at Community Foundation Silicon Valley.
|
||||
*
|
||||
* Portions of this software were developed at the Centre for Advanced
|
||||
* Internet Architectures, Swinburne University of Technology, Melbourne,
|
||||
* Australia by David Hayes under sponsorship from the FreeBSD Foundation.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -61,6 +75,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#define TCPSTATES /* for logging */
|
||||
|
||||
#include <netinet/cc.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_pcb.h>
|
||||
#include <netinet/in_systm.h>
|
||||
@ -75,7 +90,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <netinet6/in6_pcb.h>
|
||||
#include <netinet6/ip6_var.h>
|
||||
#include <netinet6/nd6.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/tcp_fsm.h>
|
||||
#include <netinet/tcp_seq.h>
|
||||
#include <netinet/tcp_timer.h>
|
||||
@ -96,7 +110,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <security/mac/mac_framework.h>
|
||||
|
||||
static const int tcprexmtthresh = 3;
|
||||
const int tcprexmtthresh = 3;
|
||||
|
||||
VNET_DEFINE(struct tcpstat, tcpstat);
|
||||
SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW,
|
||||
@ -132,19 +146,16 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW,
|
||||
"Enable RFC 3042 (Limited Transmit)");
|
||||
|
||||
VNET_DEFINE(int, tcp_do_rfc3390) = 1;
|
||||
#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390)
|
||||
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW,
|
||||
&VNET_NAME(tcp_do_rfc3390), 0,
|
||||
"Enable RFC 3390 (Increasing TCP's Initial Congestion Window)");
|
||||
|
||||
VNET_DEFINE(int, tcp_do_rfc3465) = 1;
|
||||
#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465)
|
||||
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_RW,
|
||||
&VNET_NAME(tcp_do_rfc3465), 0,
|
||||
"Enable RFC 3465 (Appropriate Byte Counting)");
|
||||
|
||||
VNET_DEFINE(int, tcp_abc_l_var) = 2;
|
||||
#define V_tcp_abc_l_var VNET(tcp_abc_l_var)
|
||||
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, abc_l_var, CTLFLAG_RW,
|
||||
&VNET_NAME(tcp_abc_l_var), 2,
|
||||
"Cap the max cwnd increment during slow-start to this number of segments");
|
||||
@ -203,8 +214,10 @@ static void tcp_pulloutofband(struct socket *,
|
||||
struct tcphdr *, struct mbuf *, int);
|
||||
static void tcp_xmit_timer(struct tcpcb *, int);
|
||||
static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *);
|
||||
static void inline
|
||||
tcp_congestion_exp(struct tcpcb *);
|
||||
static void inline cc_ack_received(struct tcpcb *tp, struct tcphdr *th,
|
||||
uint16_t type);
|
||||
static void inline cc_conn_init(struct tcpcb *tp);
|
||||
static void inline cc_post_recovery(struct tcpcb *tp, struct tcphdr *th);
|
||||
|
||||
/*
|
||||
* Kernel module interface for updating tcpstat. The argument is an index
|
||||
@ -220,20 +233,188 @@ kmod_tcpstat_inc(int statnum)
|
||||
(*((u_long *)&V_tcpstat + statnum))++;
|
||||
}
|
||||
|
||||
/*
|
||||
* CC wrapper hook functions
|
||||
*/
|
||||
static void inline
|
||||
tcp_congestion_exp(struct tcpcb *tp)
|
||||
cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t type)
|
||||
{
|
||||
u_int win;
|
||||
INP_WLOCK_ASSERT(tp->t_inpcb);
|
||||
|
||||
win = min(tp->snd_wnd, tp->snd_cwnd) /
|
||||
2 / tp->t_maxseg;
|
||||
if (win < 2)
|
||||
win = 2;
|
||||
tp->snd_ssthresh = win * tp->t_maxseg;
|
||||
ENTER_FASTRECOVERY(tp);
|
||||
tp->snd_recover = tp->snd_max;
|
||||
if (tp->t_flags & TF_ECN_PERMIT)
|
||||
tp->t_flags |= TF_ECN_SND_CWR;
|
||||
tp->ccv->bytes_this_ack = BYTES_THIS_ACK(tp, th);
|
||||
if (tp->snd_cwnd == min(tp->snd_cwnd, tp->snd_wnd))
|
||||
tp->ccv->flags |= CCF_CWND_LIMITED;
|
||||
else
|
||||
tp->ccv->flags &= ~CCF_CWND_LIMITED;
|
||||
|
||||
if (type == CC_ACK) {
|
||||
if (tp->snd_cwnd > tp->snd_ssthresh) {
|
||||
tp->t_bytes_acked += min(tp->ccv->bytes_this_ack,
|
||||
V_tcp_abc_l_var * tp->t_maxseg);
|
||||
if (tp->t_bytes_acked >= tp->snd_cwnd) {
|
||||
tp->t_bytes_acked -= tp->snd_cwnd;
|
||||
tp->ccv->flags |= CCF_ABC_SENTAWND;
|
||||
}
|
||||
} else {
|
||||
tp->ccv->flags &= ~CCF_ABC_SENTAWND;
|
||||
tp->t_bytes_acked = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (CC_ALGO(tp)->ack_received != NULL) {
|
||||
/* XXXLAS: Find a way to live without this */
|
||||
tp->ccv->curack = th->th_ack;
|
||||
CC_ALGO(tp)->ack_received(tp->ccv, type);
|
||||
}
|
||||
}
|
||||
|
||||
static void inline
|
||||
cc_conn_init(struct tcpcb *tp)
|
||||
{
|
||||
struct hc_metrics_lite metrics;
|
||||
struct inpcb *inp = tp->t_inpcb;
|
||||
int rtt;
|
||||
#ifdef INET6
|
||||
int isipv6 = ((inp->inp_vflag & INP_IPV6) != 0) ? 1 : 0;
|
||||
#endif
|
||||
|
||||
INP_WLOCK_ASSERT(tp->t_inpcb);
|
||||
|
||||
tcp_hc_get(&inp->inp_inc, &metrics);
|
||||
|
||||
if (tp->t_srtt == 0 && (rtt = metrics.rmx_rtt)) {
|
||||
tp->t_srtt = rtt;
|
||||
tp->t_rttbest = tp->t_srtt + TCP_RTT_SCALE;
|
||||
TCPSTAT_INC(tcps_usedrtt);
|
||||
if (metrics.rmx_rttvar) {
|
||||
tp->t_rttvar = metrics.rmx_rttvar;
|
||||
TCPSTAT_INC(tcps_usedrttvar);
|
||||
} else {
|
||||
/* default variation is +- 1 rtt */
|
||||
tp->t_rttvar =
|
||||
tp->t_srtt * TCP_RTTVAR_SCALE / TCP_RTT_SCALE;
|
||||
}
|
||||
TCPT_RANGESET(tp->t_rxtcur,
|
||||
((tp->t_srtt >> 2) + tp->t_rttvar) >> 1,
|
||||
tp->t_rttmin, TCPTV_REXMTMAX);
|
||||
}
|
||||
if (metrics.rmx_ssthresh) {
|
||||
/*
|
||||
* There's some sort of gateway or interface
|
||||
* buffer limit on the path. Use this to set
|
||||
* the slow start threshhold, but set the
|
||||
* threshold to no less than 2*mss.
|
||||
*/
|
||||
tp->snd_ssthresh = max(2 * tp->t_maxseg, metrics.rmx_ssthresh);
|
||||
TCPSTAT_INC(tcps_usedssthresh);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the slow-start flight size depending on whether this
|
||||
* is a local network or not.
|
||||
*
|
||||
* Extend this so we cache the cwnd too and retrieve it here.
|
||||
* Make cwnd even bigger than RFC3390 suggests but only if we
|
||||
* have previous experience with the remote host. Be careful
|
||||
* not make cwnd bigger than remote receive window or our own
|
||||
* send socket buffer. Maybe put some additional upper bound
|
||||
* on the retrieved cwnd. Should do incremental updates to
|
||||
* hostcache when cwnd collapses so next connection doesn't
|
||||
* overloads the path again.
|
||||
*
|
||||
* XXXAO: Initializing the CWND from the hostcache is broken
|
||||
* and in its current form not RFC conformant. It is disabled
|
||||
* until fixed or removed entirely.
|
||||
*
|
||||
* RFC3390 says only do this if SYN or SYN/ACK didn't got lost.
|
||||
* We currently check only in syncache_socket for that.
|
||||
*/
|
||||
/* #define TCP_METRICS_CWND */
|
||||
#ifdef TCP_METRICS_CWND
|
||||
if (metrics.rmx_cwnd)
|
||||
tp->snd_cwnd = max(tp->t_maxseg, min(metrics.rmx_cwnd / 2,
|
||||
min(tp->snd_wnd, so->so_snd.sb_hiwat)));
|
||||
else
|
||||
#endif
|
||||
if (V_tcp_do_rfc3390)
|
||||
tp->snd_cwnd = min(4 * tp->t_maxseg,
|
||||
max(2 * tp->t_maxseg, 4380));
|
||||
#ifdef INET6
|
||||
else if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
|
||||
(!isipv6 && in_localaddr(inp->inp_faddr)))
|
||||
#else
|
||||
else if (in_localaddr(inp->inp_faddr))
|
||||
#endif
|
||||
tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local;
|
||||
else
|
||||
tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz;
|
||||
|
||||
if (CC_ALGO(tp)->conn_init != NULL)
|
||||
CC_ALGO(tp)->conn_init(tp->ccv);
|
||||
}
|
||||
|
||||
void inline
|
||||
cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type)
|
||||
{
|
||||
INP_WLOCK_ASSERT(tp->t_inpcb);
|
||||
|
||||
switch(type) {
|
||||
case CC_NDUPACK:
|
||||
if (!IN_FASTRECOVERY(tp->t_flags)) {
|
||||
tp->snd_recover = tp->snd_max;
|
||||
if (tp->t_flags & TF_ECN_PERMIT)
|
||||
tp->t_flags |= TF_ECN_SND_CWR;
|
||||
}
|
||||
break;
|
||||
case CC_ECN:
|
||||
if (!IN_CONGRECOVERY(tp->t_flags)) {
|
||||
TCPSTAT_INC(tcps_ecn_rcwnd);
|
||||
tp->snd_recover = tp->snd_max;
|
||||
if (tp->t_flags & TF_ECN_PERMIT)
|
||||
tp->t_flags |= TF_ECN_SND_CWR;
|
||||
}
|
||||
break;
|
||||
case CC_RTO:
|
||||
tp->t_dupacks = 0;
|
||||
tp->t_bytes_acked = 0;
|
||||
EXIT_RECOVERY(tp->t_flags);
|
||||
tp->snd_cwnd = tp->t_maxseg;
|
||||
break;
|
||||
case CC_RTO_ERR:
|
||||
TCPSTAT_INC(tcps_sndrexmitbad);
|
||||
/* RTO was unnecessary, so reset everything. */
|
||||
tp->snd_cwnd = tp->snd_cwnd_prev;
|
||||
tp->snd_ssthresh = tp->snd_ssthresh_prev;
|
||||
tp->snd_recover = tp->snd_recover_prev;
|
||||
if (tp->t_flags & TF_WASFRECOVERY)
|
||||
ENTER_FASTRECOVERY(tp->t_flags);
|
||||
if (tp->t_flags & TF_WASCRECOVERY)
|
||||
ENTER_CONGRECOVERY(tp->t_flags);
|
||||
tp->snd_nxt = tp->snd_max;
|
||||
tp->t_badrxtwin = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (CC_ALGO(tp)->cong_signal != NULL) {
|
||||
if (th != NULL)
|
||||
tp->ccv->curack = th->th_ack;
|
||||
CC_ALGO(tp)->cong_signal(tp->ccv, type);
|
||||
}
|
||||
}
|
||||
|
||||
static void inline
|
||||
cc_post_recovery(struct tcpcb *tp, struct tcphdr *th)
|
||||
{
|
||||
INP_WLOCK_ASSERT(tp->t_inpcb);
|
||||
|
||||
/* XXXLAS: KASSERT that we're in recovery? */
|
||||
|
||||
if (CC_ALGO(tp)->post_recovery != NULL) {
|
||||
tp->ccv->curack = th->th_ack;
|
||||
CC_ALGO(tp)->post_recovery(tp->ccv);
|
||||
}
|
||||
/* XXXLAS: EXIT_RECOVERY ? */
|
||||
tp->t_bytes_acked = 0;
|
||||
}
|
||||
|
||||
/* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */
|
||||
@ -1157,14 +1338,9 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
TCPSTAT_INC(tcps_ecn_ect1);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* Congestion experienced.
|
||||
* Ignore if we are already trying to recover.
|
||||
*/
|
||||
if ((thflags & TH_ECE) &&
|
||||
SEQ_LEQ(th->th_ack, tp->snd_recover)) {
|
||||
TCPSTAT_INC(tcps_ecn_rcwnd);
|
||||
tcp_congestion_exp(tp);
|
||||
/* Congestion experienced. */
|
||||
if (thflags & TH_ECE) {
|
||||
cc_cong_signal(tp, th, CC_ECN);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1259,15 +1435,9 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
if (tlen == 0) {
|
||||
if (SEQ_GT(th->th_ack, tp->snd_una) &&
|
||||
SEQ_LEQ(th->th_ack, tp->snd_max) &&
|
||||
tp->snd_cwnd >= tp->snd_wnd &&
|
||||
((!V_tcp_do_newreno &&
|
||||
!(tp->t_flags & TF_SACK_PERMIT) &&
|
||||
tp->t_dupacks < tcprexmtthresh) ||
|
||||
((V_tcp_do_newreno ||
|
||||
(tp->t_flags & TF_SACK_PERMIT)) &&
|
||||
!IN_FASTRECOVERY(tp) &&
|
||||
(to.to_flags & TOF_SACK) == 0 &&
|
||||
TAILQ_EMPTY(&tp->snd_holes)))) {
|
||||
!IN_RECOVERY(tp->t_flags) &&
|
||||
(to.to_flags & TOF_SACK) == 0 &&
|
||||
TAILQ_EMPTY(&tp->snd_holes)) {
|
||||
/*
|
||||
* This is a pure ack for outstanding data.
|
||||
*/
|
||||
@ -1287,15 +1457,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
*/
|
||||
if (tp->t_rxtshift == 1 &&
|
||||
(int)(ticks - tp->t_badrxtwin) < 0) {
|
||||
TCPSTAT_INC(tcps_sndrexmitbad);
|
||||
tp->snd_cwnd = tp->snd_cwnd_prev;
|
||||
tp->snd_ssthresh =
|
||||
tp->snd_ssthresh_prev;
|
||||
tp->snd_recover = tp->snd_recover_prev;
|
||||
if (tp->t_flags & TF_WASFRECOVERY)
|
||||
ENTER_FASTRECOVERY(tp);
|
||||
tp->snd_nxt = tp->snd_max;
|
||||
tp->t_badrxtwin = 0;
|
||||
cc_cong_signal(tp, th, CC_RTO_ERR);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1321,13 +1483,22 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
tcp_xmit_timer(tp,
|
||||
ticks - tp->t_rtttime);
|
||||
}
|
||||
acked = th->th_ack - tp->snd_una;
|
||||
acked = BYTES_THIS_ACK(tp, th);
|
||||
TCPSTAT_INC(tcps_rcvackpack);
|
||||
TCPSTAT_ADD(tcps_rcvackbyte, acked);
|
||||
sbdrop(&so->so_snd, acked);
|
||||
if (SEQ_GT(tp->snd_una, tp->snd_recover) &&
|
||||
SEQ_LEQ(th->th_ack, tp->snd_recover))
|
||||
tp->snd_recover = th->th_ack - 1;
|
||||
|
||||
/*
|
||||
* Let the congestion control algorithm update
|
||||
* congestion control related information. This
|
||||
* typically means increasing the congestion
|
||||
* window.
|
||||
*/
|
||||
cc_ack_received(tp, th, CC_ACK);
|
||||
|
||||
tp->snd_una = th->th_ack;
|
||||
/*
|
||||
* Pull snd_wl2 up to prevent seq wrap relative
|
||||
@ -1587,6 +1758,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
thflags &= ~TH_SYN;
|
||||
} else {
|
||||
tp->t_state = TCPS_ESTABLISHED;
|
||||
cc_conn_init(tp);
|
||||
tcp_timer_activate(tp, TT_KEEP, tcp_keepidle);
|
||||
}
|
||||
} else {
|
||||
@ -1990,6 +2162,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
tp->t_flags &= ~TF_NEEDFIN;
|
||||
} else {
|
||||
tp->t_state = TCPS_ESTABLISHED;
|
||||
cc_conn_init(tp);
|
||||
tcp_timer_activate(tp, TT_KEEP, tcp_keepidle);
|
||||
}
|
||||
/*
|
||||
@ -2058,11 +2231,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
th->th_ack != tp->snd_una)
|
||||
tp->t_dupacks = 0;
|
||||
else if (++tp->t_dupacks > tcprexmtthresh ||
|
||||
((V_tcp_do_newreno ||
|
||||
(tp->t_flags & TF_SACK_PERMIT)) &&
|
||||
IN_FASTRECOVERY(tp))) {
|
||||
IN_FASTRECOVERY(tp->t_flags)) {
|
||||
cc_ack_received(tp, th, CC_DUPACK);
|
||||
if ((tp->t_flags & TF_SACK_PERMIT) &&
|
||||
IN_FASTRECOVERY(tp)) {
|
||||
IN_FASTRECOVERY(tp->t_flags)) {
|
||||
int awnd;
|
||||
|
||||
/*
|
||||
@ -2093,19 +2265,20 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
* recovery.
|
||||
*/
|
||||
if (tp->t_flags & TF_SACK_PERMIT) {
|
||||
if (IN_FASTRECOVERY(tp)) {
|
||||
if (IN_FASTRECOVERY(tp->t_flags)) {
|
||||
tp->t_dupacks = 0;
|
||||
break;
|
||||
}
|
||||
} else if (V_tcp_do_newreno ||
|
||||
V_tcp_do_ecn) {
|
||||
} else {
|
||||
if (SEQ_LEQ(th->th_ack,
|
||||
tp->snd_recover)) {
|
||||
tp->t_dupacks = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
tcp_congestion_exp(tp);
|
||||
/* Congestion signal before ack. */
|
||||
cc_cong_signal(tp, th, CC_NDUPACK);
|
||||
cc_ack_received(tp, th, CC_DUPACK);
|
||||
tcp_timer_activate(tp, TT_REXMT, 0);
|
||||
tp->t_rtttime = 0;
|
||||
if (tp->t_flags & TF_SACK_PERMIT) {
|
||||
@ -2129,6 +2302,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
tp->snd_nxt = onxt;
|
||||
goto drop;
|
||||
} else if (V_tcp_do_rfc3042) {
|
||||
cc_ack_received(tp, th, CC_DUPACK);
|
||||
u_long oldcwnd = tp->snd_cwnd;
|
||||
tcp_seq oldsndmax = tp->snd_max;
|
||||
u_int sent;
|
||||
@ -2170,37 +2344,14 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
* If the congestion window was inflated to account
|
||||
* for the other side's cached packets, retract it.
|
||||
*/
|
||||
if (V_tcp_do_newreno || (tp->t_flags & TF_SACK_PERMIT)) {
|
||||
if (IN_FASTRECOVERY(tp)) {
|
||||
if (SEQ_LT(th->th_ack, tp->snd_recover)) {
|
||||
if (tp->t_flags & TF_SACK_PERMIT)
|
||||
tcp_sack_partialack(tp, th);
|
||||
else
|
||||
tcp_newreno_partial_ack(tp, th);
|
||||
} else {
|
||||
/*
|
||||
* Out of fast recovery.
|
||||
* Window inflation should have left us
|
||||
* with approximately snd_ssthresh
|
||||
* outstanding data.
|
||||
* But in case we would be inclined to
|
||||
* send a burst, better to do it via
|
||||
* the slow start mechanism.
|
||||
*/
|
||||
if (SEQ_GT(th->th_ack +
|
||||
tp->snd_ssthresh,
|
||||
tp->snd_max))
|
||||
tp->snd_cwnd = tp->snd_max -
|
||||
th->th_ack +
|
||||
tp->t_maxseg;
|
||||
else
|
||||
tp->snd_cwnd = tp->snd_ssthresh;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (tp->t_dupacks >= tcprexmtthresh &&
|
||||
tp->snd_cwnd > tp->snd_ssthresh)
|
||||
tp->snd_cwnd = tp->snd_ssthresh;
|
||||
if (IN_FASTRECOVERY(tp->t_flags)) {
|
||||
if (SEQ_LT(th->th_ack, tp->snd_recover)) {
|
||||
if (tp->t_flags & TF_SACK_PERMIT)
|
||||
tcp_sack_partialack(tp, th);
|
||||
else
|
||||
tcp_newreno_partial_ack(tp, th);
|
||||
} else
|
||||
cc_post_recovery(tp, th);
|
||||
}
|
||||
tp->t_dupacks = 0;
|
||||
/*
|
||||
@ -2231,7 +2382,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
("tcp_input: process_ACK ti_locked %d", ti_locked));
|
||||
INP_WLOCK_ASSERT(tp->t_inpcb);
|
||||
|
||||
acked = th->th_ack - tp->snd_una;
|
||||
acked = BYTES_THIS_ACK(tp, th);
|
||||
TCPSTAT_INC(tcps_rcvackpack);
|
||||
TCPSTAT_ADD(tcps_rcvackbyte, acked);
|
||||
|
||||
@ -2242,16 +2393,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
* original cwnd and ssthresh, and proceed to transmit where
|
||||
* we left off.
|
||||
*/
|
||||
if (tp->t_rxtshift == 1 && (int)(ticks - tp->t_badrxtwin) < 0) {
|
||||
TCPSTAT_INC(tcps_sndrexmitbad);
|
||||
tp->snd_cwnd = tp->snd_cwnd_prev;
|
||||
tp->snd_ssthresh = tp->snd_ssthresh_prev;
|
||||
tp->snd_recover = tp->snd_recover_prev;
|
||||
if (tp->t_flags & TF_WASFRECOVERY)
|
||||
ENTER_FASTRECOVERY(tp);
|
||||
tp->snd_nxt = tp->snd_max;
|
||||
tp->t_badrxtwin = 0; /* XXX probably not required */
|
||||
}
|
||||
if (tp->t_rxtshift == 1 && (int)(ticks - tp->t_badrxtwin) < 0)
|
||||
cc_cong_signal(tp, th, CC_RTO_ERR);
|
||||
|
||||
/*
|
||||
* If we have a timestamp reply, update smoothed
|
||||
@ -2298,61 +2441,12 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
goto step6;
|
||||
|
||||
/*
|
||||
* When new data is acked, open the congestion window.
|
||||
* Method depends on which congestion control state we're
|
||||
* in (slow start or cong avoid) and if ABC (RFC 3465) is
|
||||
* enabled.
|
||||
*
|
||||
* slow start: cwnd <= ssthresh
|
||||
* cong avoid: cwnd > ssthresh
|
||||
*
|
||||
* slow start and ABC (RFC 3465):
|
||||
* Grow cwnd exponentially by the amount of data
|
||||
* ACKed capping the max increment per ACK to
|
||||
* (abc_l_var * maxseg) bytes.
|
||||
*
|
||||
* slow start without ABC (RFC 2581):
|
||||
* Grow cwnd exponentially by maxseg per ACK.
|
||||
*
|
||||
* cong avoid and ABC (RFC 3465):
|
||||
* Grow cwnd linearly by maxseg per RTT for each
|
||||
* cwnd worth of ACKed data.
|
||||
*
|
||||
* cong avoid without ABC (RFC 2581):
|
||||
* Grow cwnd linearly by approximately maxseg per RTT using
|
||||
* maxseg^2 / cwnd per ACK as the increment.
|
||||
* If cwnd > maxseg^2, fix the cwnd increment at 1 byte to
|
||||
* avoid capping cwnd.
|
||||
* Let the congestion control algorithm update congestion
|
||||
* control related information. This typically means increasing
|
||||
* the congestion window.
|
||||
*/
|
||||
if ((!V_tcp_do_newreno && !(tp->t_flags & TF_SACK_PERMIT)) ||
|
||||
!IN_FASTRECOVERY(tp)) {
|
||||
u_int cw = tp->snd_cwnd;
|
||||
u_int incr = tp->t_maxseg;
|
||||
/* In congestion avoidance? */
|
||||
if (cw > tp->snd_ssthresh) {
|
||||
if (V_tcp_do_rfc3465) {
|
||||
tp->t_bytes_acked += acked;
|
||||
if (tp->t_bytes_acked >= tp->snd_cwnd)
|
||||
tp->t_bytes_acked -= cw;
|
||||
else
|
||||
incr = 0;
|
||||
}
|
||||
else
|
||||
incr = max((incr * incr / cw), 1);
|
||||
/*
|
||||
* In slow-start with ABC enabled and no RTO in sight?
|
||||
* (Must not use abc_l_var > 1 if slow starting after an
|
||||
* RTO. On RTO, snd_nxt = snd_una, so the snd_nxt ==
|
||||
* snd_max check is sufficient to handle this).
|
||||
*/
|
||||
} else if (V_tcp_do_rfc3465 &&
|
||||
tp->snd_nxt == tp->snd_max)
|
||||
incr = min(acked,
|
||||
V_tcp_abc_l_var * tp->t_maxseg);
|
||||
/* ABC is on by default, so (incr == 0) frequently. */
|
||||
if (incr > 0)
|
||||
tp->snd_cwnd = min(cw+incr, TCP_MAXWIN<<tp->snd_scale);
|
||||
}
|
||||
cc_ack_received(tp, th, CC_ACK);
|
||||
|
||||
SOCKBUF_LOCK(&so->so_snd);
|
||||
if (acked > so->so_snd.sb_cc) {
|
||||
tp->snd_wnd -= so->so_snd.sb_cc;
|
||||
@ -2366,16 +2460,14 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
/* NB: sowwakeup_locked() does an implicit unlock. */
|
||||
sowwakeup_locked(so);
|
||||
/* Detect una wraparound. */
|
||||
if ((V_tcp_do_newreno || (tp->t_flags & TF_SACK_PERMIT)) &&
|
||||
!IN_FASTRECOVERY(tp) &&
|
||||
if (!IN_RECOVERY(tp->t_flags) &&
|
||||
SEQ_GT(tp->snd_una, tp->snd_recover) &&
|
||||
SEQ_LEQ(th->th_ack, tp->snd_recover))
|
||||
tp->snd_recover = th->th_ack - 1;
|
||||
if ((V_tcp_do_newreno || (tp->t_flags & TF_SACK_PERMIT)) &&
|
||||
IN_FASTRECOVERY(tp) &&
|
||||
/* XXXLAS: Can this be moved up into cc_post_recovery? */
|
||||
if (IN_RECOVERY(tp->t_flags) &&
|
||||
SEQ_GEQ(th->th_ack, tp->snd_recover)) {
|
||||
EXIT_FASTRECOVERY(tp);
|
||||
tp->t_bytes_acked = 0;
|
||||
EXIT_RECOVERY(tp->t_flags);
|
||||
}
|
||||
tp->snd_una = th->th_ack;
|
||||
if (tp->t_flags & TF_SACK_PERMIT) {
|
||||
@ -3240,24 +3332,19 @@ tcp_mss_update(struct tcpcb *tp, int offer,
|
||||
void
|
||||
tcp_mss(struct tcpcb *tp, int offer)
|
||||
{
|
||||
int rtt, mss;
|
||||
int mss;
|
||||
u_long bufsize;
|
||||
struct inpcb *inp;
|
||||
struct socket *so;
|
||||
struct hc_metrics_lite metrics;
|
||||
int mtuflags = 0;
|
||||
#ifdef INET6
|
||||
int isipv6;
|
||||
#endif
|
||||
|
||||
KASSERT(tp != NULL, ("%s: tp == NULL", __func__));
|
||||
|
||||
tcp_mss_update(tp, offer, &metrics, &mtuflags);
|
||||
|
||||
mss = tp->t_maxseg;
|
||||
inp = tp->t_inpcb;
|
||||
#ifdef INET6
|
||||
isipv6 = ((inp->inp_vflag & INP_IPV6) != 0) ? 1 : 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there's a pipesize, change the socket buffer to that size,
|
||||
@ -3297,71 +3384,6 @@ tcp_mss(struct tcpcb *tp, int offer)
|
||||
(void)sbreserve_locked(&so->so_rcv, bufsize, so, NULL);
|
||||
}
|
||||
SOCKBUF_UNLOCK(&so->so_rcv);
|
||||
/*
|
||||
* While we're here, check the others too.
|
||||
*/
|
||||
if (tp->t_srtt == 0 && (rtt = metrics.rmx_rtt)) {
|
||||
tp->t_srtt = rtt;
|
||||
tp->t_rttbest = tp->t_srtt + TCP_RTT_SCALE;
|
||||
TCPSTAT_INC(tcps_usedrtt);
|
||||
if (metrics.rmx_rttvar) {
|
||||
tp->t_rttvar = metrics.rmx_rttvar;
|
||||
TCPSTAT_INC(tcps_usedrttvar);
|
||||
} else {
|
||||
/* default variation is +- 1 rtt */
|
||||
tp->t_rttvar =
|
||||
tp->t_srtt * TCP_RTTVAR_SCALE / TCP_RTT_SCALE;
|
||||
}
|
||||
TCPT_RANGESET(tp->t_rxtcur,
|
||||
((tp->t_srtt >> 2) + tp->t_rttvar) >> 1,
|
||||
tp->t_rttmin, TCPTV_REXMTMAX);
|
||||
}
|
||||
if (metrics.rmx_ssthresh) {
|
||||
/*
|
||||
* There's some sort of gateway or interface
|
||||
* buffer limit on the path. Use this to set
|
||||
* the slow start threshhold, but set the
|
||||
* threshold to no less than 2*mss.
|
||||
*/
|
||||
tp->snd_ssthresh = max(2 * mss, metrics.rmx_ssthresh);
|
||||
TCPSTAT_INC(tcps_usedssthresh);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the slow-start flight size depending on whether this
|
||||
* is a local network or not.
|
||||
*
|
||||
* Extend this so we cache the cwnd too and retrieve it here.
|
||||
* Make cwnd even bigger than RFC3390 suggests but only if we
|
||||
* have previous experience with the remote host. Be careful
|
||||
* not make cwnd bigger than remote receive window or our own
|
||||
* send socket buffer. Maybe put some additional upper bound
|
||||
* on the retrieved cwnd. Should do incremental updates to
|
||||
* hostcache when cwnd collapses so next connection doesn't
|
||||
* overloads the path again.
|
||||
*
|
||||
* RFC3390 says only do this if SYN or SYN/ACK didn't got lost.
|
||||
* We currently check only in syncache_socket for that.
|
||||
*/
|
||||
#define TCP_METRICS_CWND
|
||||
#ifdef TCP_METRICS_CWND
|
||||
if (metrics.rmx_cwnd)
|
||||
tp->snd_cwnd = max(mss,
|
||||
min(metrics.rmx_cwnd / 2,
|
||||
min(tp->snd_wnd, so->so_snd.sb_hiwat)));
|
||||
else
|
||||
#endif
|
||||
if (V_tcp_do_rfc3390)
|
||||
tp->snd_cwnd = min(4 * mss, max(2 * mss, 4380));
|
||||
#ifdef INET6
|
||||
else if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
|
||||
(!isipv6 && in_localaddr(inp->inp_faddr)))
|
||||
#else
|
||||
else if (in_localaddr(inp->inp_faddr))
|
||||
#endif
|
||||
tp->snd_cwnd = mss * V_ss_fltsz_local;
|
||||
else
|
||||
tp->snd_cwnd = mss * V_ss_fltsz;
|
||||
|
||||
/* Check the interface for TSO capabilities. */
|
||||
if (mtuflags & CSUM_TSO)
|
||||
@ -3425,7 +3447,7 @@ tcp_newreno_partial_ack(struct tcpcb *tp, struct tcphdr *th)
|
||||
* Set snd_cwnd to one segment beyond acknowledged offset.
|
||||
* (tp->snd_una has not yet been updated when this function is called.)
|
||||
*/
|
||||
tp->snd_cwnd = tp->t_maxseg + (th->th_ack - tp->snd_una);
|
||||
tp->snd_cwnd = tp->t_maxseg + BYTES_THIS_ACK(tp, th);
|
||||
tp->t_flags |= TF_ACKNOW;
|
||||
(void) tcp_output(tp);
|
||||
tp->snd_cwnd = ocwnd;
|
||||
@ -3435,8 +3457,8 @@ tcp_newreno_partial_ack(struct tcpcb *tp, struct tcphdr *th)
|
||||
* Partial window deflation. Relies on fact that tp->snd_una
|
||||
* not updated yet.
|
||||
*/
|
||||
if (tp->snd_cwnd > th->th_ack - tp->snd_una)
|
||||
tp->snd_cwnd -= th->th_ack - tp->snd_una;
|
||||
if (tp->snd_cwnd > BYTES_THIS_ACK(tp, th))
|
||||
tp->snd_cwnd -= BYTES_THIS_ACK(tp, th);
|
||||
else
|
||||
tp->snd_cwnd = 0;
|
||||
tp->snd_cwnd += tp->t_maxseg;
|
||||
|
@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <net/route.h>
|
||||
#include <net/vnet.h>
|
||||
|
||||
#include <netinet/cc.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -64,7 +65,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <netinet/ip6.h>
|
||||
#include <netinet6/ip6_var.h>
|
||||
#endif
|
||||
#include <netinet/tcp.h>
|
||||
#define TCPOUTFLAGS
|
||||
#include <netinet/tcp_fsm.h>
|
||||
#include <netinet/tcp_seq.h>
|
||||
@ -102,11 +102,6 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize,
|
||||
CTLFLAG_RW, &VNET_NAME(ss_fltsz_local), 1,
|
||||
"Slow start flight size for local networks");
|
||||
|
||||
VNET_DEFINE(int, tcp_do_newreno) = 1;
|
||||
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, newreno, CTLFLAG_RW,
|
||||
&VNET_NAME(tcp_do_newreno), 0,
|
||||
"Enable NewReno Algorithms");
|
||||
|
||||
VNET_DEFINE(int, tcp_do_tso) = 1;
|
||||
#define V_tcp_do_tso VNET(tcp_do_tso)
|
||||
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, tso, CTLFLAG_RW,
|
||||
@ -131,6 +126,19 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_max, CTLFLAG_RW,
|
||||
&VNET_NAME(tcp_autosndbuf_max), 0,
|
||||
"Max size of automatic send buffer");
|
||||
|
||||
static void inline cc_after_idle(struct tcpcb *tp);
|
||||
|
||||
/*
|
||||
* CC wrapper hook functions
|
||||
*/
|
||||
static void inline
|
||||
cc_after_idle(struct tcpcb *tp)
|
||||
{
|
||||
INP_WLOCK_ASSERT(tp->t_inpcb);
|
||||
|
||||
if (CC_ALGO(tp)->after_idle != NULL)
|
||||
CC_ALGO(tp)->after_idle(tp->ccv);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tcp output routine: figure out what should be sent and send it.
|
||||
@ -241,7 +249,7 @@ tcp_output(struct tcpcb *tp)
|
||||
sack_bytes_rxmt = 0;
|
||||
len = 0;
|
||||
p = NULL;
|
||||
if ((tp->t_flags & TF_SACK_PERMIT) && IN_FASTRECOVERY(tp) &&
|
||||
if ((tp->t_flags & TF_SACK_PERMIT) && IN_FASTRECOVERY(tp->t_flags) &&
|
||||
(p = tcp_sack_output(tp, &sack_bytes_rxmt))) {
|
||||
long cwin;
|
||||
|
||||
@ -1315,7 +1323,7 @@ tcp_output(struct tcpcb *tp)
|
||||
* on the transmitter effectively destroys the TCP window, forcing
|
||||
* it to four packets (1.5Kx4 = 6K window).
|
||||
*/
|
||||
if (sendalot && (!V_tcp_do_newreno || --maxburst))
|
||||
if (sendalot && --maxburst)
|
||||
goto again;
|
||||
#endif
|
||||
if (sendalot)
|
||||
|
@ -576,7 +576,7 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th)
|
||||
tcp_timer_activate(tp, TT_REXMT, 0);
|
||||
tp->t_rtttime = 0;
|
||||
/* Send one or 2 segments based on how much new data was acked. */
|
||||
if (((th->th_ack - tp->snd_una) / tp->t_maxseg) > 2)
|
||||
if ((BYTES_THIS_ACK(tp, th) / tp->t_maxseg) > 2)
|
||||
num_segs = 2;
|
||||
tp->snd_cwnd = (tp->sackhint.sack_bytes_rexmit +
|
||||
(tp->snd_nxt - tp->sack_newdata) + num_segs * tp->t_maxseg);
|
||||
|
@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <net/if.h>
|
||||
#include <net/vnet.h>
|
||||
|
||||
#include <netinet/cc.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -80,7 +81,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <netinet6/nd6.h>
|
||||
#endif
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/tcp_fsm.h>
|
||||
#include <netinet/tcp_seq.h>
|
||||
#include <netinet/tcp_timer.h>
|
||||
@ -238,6 +238,7 @@ static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th,
|
||||
struct tcpcb_mem {
|
||||
struct tcpcb tcb;
|
||||
struct tcp_timer tt;
|
||||
struct cc_var ccv;
|
||||
};
|
||||
|
||||
static VNET_DEFINE(uma_zone_t, tcpcb_zone);
|
||||
@ -277,6 +278,8 @@ tcp_init(void)
|
||||
{
|
||||
int hashsize;
|
||||
|
||||
cc_init();
|
||||
|
||||
hashsize = TCBHASHSIZE;
|
||||
TUNABLE_INT_FETCH("net.inet.tcp.tcbhashsize", &hashsize);
|
||||
if (!powerof2(hashsize)) {
|
||||
@ -640,6 +643,26 @@ tcp_newtcpcb(struct inpcb *inp)
|
||||
if (tm == NULL)
|
||||
return (NULL);
|
||||
tp = &tm->tcb;
|
||||
|
||||
/* Initialise cc_var struct for this tcpcb. */
|
||||
tp->ccv = &tm->ccv;
|
||||
tp->ccv->type = IPPROTO_TCP;
|
||||
tp->ccv->ccvc.tcp = tp;
|
||||
|
||||
/*
|
||||
* Use the current system default CC algorithm.
|
||||
*/
|
||||
CC_LIST_RLOCK();
|
||||
KASSERT(!STAILQ_EMPTY(&cc_list), ("cc_list is empty!"));
|
||||
CC_ALGO(tp) = CC_DEFAULT();
|
||||
CC_LIST_RUNLOCK();
|
||||
|
||||
if (CC_ALGO(tp)->cb_init != NULL)
|
||||
if (CC_ALGO(tp)->cb_init(tp->ccv) > 0) {
|
||||
uma_zfree(V_tcpcb_zone, tm);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
#ifdef VIMAGE
|
||||
tp->t_vnet = inp->inp_vnet;
|
||||
#endif
|
||||
@ -805,6 +828,12 @@ tcp_discardcb(struct tcpcb *tp)
|
||||
tcp_offload_detach(tp);
|
||||
|
||||
tcp_free_sackholes(tp);
|
||||
|
||||
/* Allow the CC algorithm to clean up after itself. */
|
||||
if (CC_ALGO(tp)->cb_destroy != NULL)
|
||||
CC_ALGO(tp)->cb_destroy(tp->ccv);
|
||||
|
||||
CC_ALGO(tp) = NULL;
|
||||
inp->inp_ppcb = NULL;
|
||||
tp->t_inpcb = NULL;
|
||||
uma_zfree(V_tcpcb_zone, tp);
|
||||
@ -1572,7 +1601,7 @@ tcp_mtudisc(struct inpcb *inp, int errno)
|
||||
tcp_free_sackholes(tp);
|
||||
tp->snd_recover = tp->snd_max;
|
||||
if (tp->t_flags & TF_SACK_PERMIT)
|
||||
EXIT_FASTRECOVERY(tp);
|
||||
EXIT_FASTRECOVERY(tp->t_flags);
|
||||
tcp_output_send(tp);
|
||||
return (inp);
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <net/route.h>
|
||||
#include <net/vnet.h>
|
||||
|
||||
#include <netinet/cc.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_pcb.h>
|
||||
#include <netinet/in_systm.h>
|
||||
@ -58,7 +59,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <netinet6/in6_pcb.h>
|
||||
#endif
|
||||
#include <netinet/ip_var.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/tcp_fsm.h>
|
||||
#include <netinet/tcp_timer.h>
|
||||
#include <netinet/tcp_var.h>
|
||||
@ -515,10 +515,14 @@ tcp_timer_rexmt(void * xtp)
|
||||
tp->snd_cwnd_prev = tp->snd_cwnd;
|
||||
tp->snd_ssthresh_prev = tp->snd_ssthresh;
|
||||
tp->snd_recover_prev = tp->snd_recover;
|
||||
if (IN_FASTRECOVERY(tp))
|
||||
tp->t_flags |= TF_WASFRECOVERY;
|
||||
if (IN_FASTRECOVERY(tp->t_flags))
|
||||
tp->t_flags |= TF_WASFRECOVERY;
|
||||
else
|
||||
tp->t_flags &= ~TF_WASFRECOVERY;
|
||||
tp->t_flags &= ~TF_WASFRECOVERY;
|
||||
if (IN_CONGRECOVERY(tp->t_flags))
|
||||
tp->t_flags |= TF_WASCRECOVERY;
|
||||
else
|
||||
tp->t_flags &= ~TF_WASCRECOVERY;
|
||||
tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));
|
||||
}
|
||||
TCPSTAT_INC(tcps_rexmttimeo);
|
||||
@ -562,40 +566,9 @@ tcp_timer_rexmt(void * xtp)
|
||||
* If timing a segment in this window, stop the timer.
|
||||
*/
|
||||
tp->t_rtttime = 0;
|
||||
/*
|
||||
* Close the congestion window down to one segment
|
||||
* (we'll open it by one segment for each ack we get).
|
||||
* Since we probably have a window's worth of unacked
|
||||
* data accumulated, this "slow start" keeps us from
|
||||
* dumping all that data as back-to-back packets (which
|
||||
* might overwhelm an intermediate gateway).
|
||||
*
|
||||
* There are two phases to the opening: Initially we
|
||||
* open by one mss on each ack. This makes the window
|
||||
* size increase exponentially with time. If the
|
||||
* window is larger than the path can handle, this
|
||||
* exponential growth results in dropped packet(s)
|
||||
* almost immediately. To get more time between
|
||||
* drops but still "push" the network to take advantage
|
||||
* of improving conditions, we switch from exponential
|
||||
* to linear window opening at some threshhold size.
|
||||
* For a threshhold, we use half the current window
|
||||
* size, truncated to a multiple of the mss.
|
||||
*
|
||||
* (the minimum cwnd that will give us exponential
|
||||
* growth is 2 mss. We don't allow the threshhold
|
||||
* to go below this.)
|
||||
*/
|
||||
{
|
||||
u_int win = min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg;
|
||||
if (win < 2)
|
||||
win = 2;
|
||||
tp->snd_cwnd = tp->t_maxseg;
|
||||
tp->snd_ssthresh = win * tp->t_maxseg;
|
||||
tp->t_dupacks = 0;
|
||||
}
|
||||
EXIT_FASTRECOVERY(tp);
|
||||
tp->t_bytes_acked = 0;
|
||||
|
||||
cc_cong_signal(tp, 0, CC_RTO);
|
||||
|
||||
(void) tcp_output(tp);
|
||||
|
||||
out:
|
||||
|
@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <net/route.h>
|
||||
#include <net/vnet.h>
|
||||
|
||||
#include <netinet/cc.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#ifdef INET6
|
||||
@ -77,7 +78,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <netinet6/ip6_var.h>
|
||||
#include <netinet6/scope6_var.h>
|
||||
#endif
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/tcp_fsm.h>
|
||||
#include <netinet/tcp_seq.h>
|
||||
#include <netinet/tcp_timer.h>
|
||||
@ -1242,6 +1242,8 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt)
|
||||
struct inpcb *inp;
|
||||
struct tcpcb *tp;
|
||||
struct tcp_info ti;
|
||||
char buf[TCP_CA_NAME_MAX];
|
||||
struct cc_algo *algo;
|
||||
|
||||
error = 0;
|
||||
inp = sotoinpcb(so);
|
||||
@ -1351,6 +1353,54 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt)
|
||||
error = EINVAL;
|
||||
break;
|
||||
|
||||
case TCP_CONGESTION:
|
||||
INP_WUNLOCK(inp);
|
||||
bzero(buf, sizeof(buf));
|
||||
error = sooptcopyin(sopt, &buf, sizeof(buf), 1);
|
||||
if (error)
|
||||
break;
|
||||
INP_WLOCK_RECHECK(inp);
|
||||
/*
|
||||
* Return EINVAL if we can't find the requested cc algo.
|
||||
*/
|
||||
error = EINVAL;
|
||||
CC_LIST_RLOCK();
|
||||
STAILQ_FOREACH(algo, &cc_list, entries) {
|
||||
if (strncmp(buf, algo->name, TCP_CA_NAME_MAX)
|
||||
== 0) {
|
||||
/* We've found the requested algo. */
|
||||
error = 0;
|
||||
/*
|
||||
* We hold a write lock over the tcb
|
||||
* so it's safe to do these things
|
||||
* without ordering concerns.
|
||||
*/
|
||||
if (CC_ALGO(tp)->cb_destroy != NULL)
|
||||
CC_ALGO(tp)->cb_destroy(tp->ccv);
|
||||
CC_ALGO(tp) = algo;
|
||||
/*
|
||||
* If something goes pear shaped
|
||||
* initialising the new algo,
|
||||
* fall back to newreno (which
|
||||
* does not require initialisation).
|
||||
*/
|
||||
if (algo->cb_init != NULL)
|
||||
if (algo->cb_init(tp->ccv) > 0) {
|
||||
CC_ALGO(tp) = &newreno_cc_algo;
|
||||
/*
|
||||
* The only reason init
|
||||
* should fail is
|
||||
* because of malloc.
|
||||
*/
|
||||
error = ENOMEM;
|
||||
}
|
||||
break; /* Break the STAILQ_FOREACH. */
|
||||
}
|
||||
}
|
||||
CC_LIST_RUNLOCK();
|
||||
INP_WUNLOCK(inp);
|
||||
break;
|
||||
|
||||
default:
|
||||
INP_WUNLOCK(inp);
|
||||
error = ENOPROTOOPT;
|
||||
@ -1394,6 +1444,12 @@ tcp_ctloutput(struct socket *so, struct sockopt *sopt)
|
||||
INP_WUNLOCK(inp);
|
||||
error = sooptcopyout(sopt, &ti, sizeof ti);
|
||||
break;
|
||||
case TCP_CONGESTION:
|
||||
bzero(buf, sizeof(buf));
|
||||
strlcpy(buf, CC_ALGO(tp)->name, TCP_CA_NAME_MAX);
|
||||
INP_WUNLOCK(inp);
|
||||
error = sooptcopyout(sopt, buf, TCP_CA_NAME_MAX);
|
||||
break;
|
||||
default:
|
||||
INP_WUNLOCK(inp);
|
||||
error = ENOPROTOOPT;
|
||||
@ -1707,6 +1763,10 @@ db_print_tflags(u_int t_flags)
|
||||
db_printf("%sTF_FASTRECOVERY", comma ? ", " : "");
|
||||
comma = 1;
|
||||
}
|
||||
if (t_flags & TF_CONGRECOVERY) {
|
||||
db_printf("%sTF_CONGRECOVERY", comma ? ", " : "");
|
||||
comma = 1;
|
||||
}
|
||||
if (t_flags & TF_WASFRECOVERY) {
|
||||
db_printf("%sTF_WASFRECOVERY", comma ? ", " : "");
|
||||
comma = 1;
|
||||
|
@ -195,9 +195,11 @@ struct tcpcb {
|
||||
struct toe_usrreqs *t_tu; /* offload operations vector */
|
||||
void *t_toe; /* TOE pcb pointer */
|
||||
int t_bytes_acked; /* # bytes acked during current RTT */
|
||||
struct cc_algo *cc_algo; /* congestion control algorithm */
|
||||
struct cc_var *ccv;
|
||||
|
||||
int t_ispare; /* explicit pad for 64bit alignment */
|
||||
void *t_pspare2[6]; /* 2 CC / 4 TBD */
|
||||
void *t_pspare2[4]; /* 4 TBD */
|
||||
uint64_t _pad[12]; /* 7 UTO, 5 TBD (1-2 CC/RTT?) */
|
||||
};
|
||||
|
||||
@ -230,10 +232,22 @@ struct tcpcb {
|
||||
#define TF_ECN_PERMIT 0x4000000 /* connection ECN-ready */
|
||||
#define TF_ECN_SND_CWR 0x8000000 /* ECN CWR in queue */
|
||||
#define TF_ECN_SND_ECE 0x10000000 /* ECN ECE in queue */
|
||||
#define TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */
|
||||
#define TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */
|
||||
|
||||
#define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY)
|
||||
#define ENTER_FASTRECOVERY(tp) tp->t_flags |= TF_FASTRECOVERY
|
||||
#define EXIT_FASTRECOVERY(tp) tp->t_flags &= ~TF_FASTRECOVERY
|
||||
#define IN_FASTRECOVERY(t_flags) (t_flags & TF_FASTRECOVERY)
|
||||
#define ENTER_FASTRECOVERY(t_flags) t_flags |= TF_FASTRECOVERY
|
||||
#define EXIT_FASTRECOVERY(t_flags) t_flags &= ~TF_FASTRECOVERY
|
||||
|
||||
#define IN_CONGRECOVERY(t_flags) (t_flags & TF_CONGRECOVERY)
|
||||
#define ENTER_CONGRECOVERY(t_flags) t_flags |= TF_CONGRECOVERY
|
||||
#define EXIT_CONGRECOVERY(t_flags) t_flags &= ~TF_CONGRECOVERY
|
||||
|
||||
#define IN_RECOVERY(t_flags) (t_flags & (TF_CONGRECOVERY | TF_FASTRECOVERY))
|
||||
#define ENTER_RECOVERY(t_flags) t_flags |= (TF_CONGRECOVERY | TF_FASTRECOVERY)
|
||||
#define EXIT_RECOVERY(t_flags) t_flags &= ~(TF_CONGRECOVERY | TF_FASTRECOVERY)
|
||||
|
||||
#define BYTES_THIS_ACK(tp, th) (th->th_ack - tp->snd_una)
|
||||
|
||||
/*
|
||||
* Flags for the t_oobflags field.
|
||||
@ -562,10 +576,11 @@ VNET_DECLARE(int, tcp_mssdflt); /* XXX */
|
||||
VNET_DECLARE(int, tcp_minmss);
|
||||
VNET_DECLARE(int, tcp_delack_enabled);
|
||||
VNET_DECLARE(int, tcp_do_rfc3390);
|
||||
VNET_DECLARE(int, tcp_do_newreno);
|
||||
VNET_DECLARE(int, path_mtu_discovery);
|
||||
VNET_DECLARE(int, ss_fltsz);
|
||||
VNET_DECLARE(int, ss_fltsz_local);
|
||||
VNET_DECLARE(int, tcp_do_rfc3465);
|
||||
VNET_DECLARE(int, tcp_abc_l_var);
|
||||
#define V_tcb VNET(tcb)
|
||||
#define V_tcbinfo VNET(tcbinfo)
|
||||
#define V_tcpstat VNET(tcpstat)
|
||||
@ -573,10 +588,11 @@ VNET_DECLARE(int, ss_fltsz_local);
|
||||
#define V_tcp_minmss VNET(tcp_minmss)
|
||||
#define V_tcp_delack_enabled VNET(tcp_delack_enabled)
|
||||
#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390)
|
||||
#define V_tcp_do_newreno VNET(tcp_do_newreno)
|
||||
#define V_path_mtu_discovery VNET(path_mtu_discovery)
|
||||
#define V_ss_fltsz VNET(ss_fltsz)
|
||||
#define V_ss_fltsz_local VNET(ss_fltsz_local)
|
||||
#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465)
|
||||
#define V_tcp_abc_l_var VNET(tcp_abc_l_var)
|
||||
|
||||
VNET_DECLARE(int, tcp_do_sack); /* SACK enabled/disabled */
|
||||
VNET_DECLARE(int, tcp_sc_rst_sock_fail); /* RST on sock alloc failure */
|
||||
@ -678,6 +694,8 @@ void tcp_free_sackholes(struct tcpcb *tp);
|
||||
int tcp_newreno(struct tcpcb *, struct tcphdr *);
|
||||
u_long tcp_seq_subtract(u_long, u_long );
|
||||
|
||||
void cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type);
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _NETINET_TCP_VAR_H_ */
|
||||
|
@ -159,8 +159,6 @@ int setfault(faultbuf); /* defined in locore.S */
|
||||
long Maxmem = 0;
|
||||
long realmem = 0;
|
||||
|
||||
struct pmap ofw_pmap;
|
||||
|
||||
#ifndef __powerpc64__
|
||||
struct bat battable[16];
|
||||
#endif
|
||||
@ -639,64 +637,6 @@ cpu_halt(void)
|
||||
OF_exit();
|
||||
}
|
||||
|
||||
void
|
||||
cpu_idle(int busy)
|
||||
{
|
||||
register_t msr;
|
||||
uint16_t vers;
|
||||
|
||||
msr = mfmsr();
|
||||
vers = mfpvr() >> 16;
|
||||
|
||||
#ifdef INVARIANTS
|
||||
if ((msr & PSL_EE) != PSL_EE) {
|
||||
struct thread *td = curthread;
|
||||
printf("td msr %#lx\n", (u_long)td->td_md.md_saved_msr);
|
||||
panic("ints disabled in idleproc!");
|
||||
}
|
||||
#endif
|
||||
CTR2(KTR_SPARE2, "cpu_idle(%d) at %d",
|
||||
busy, curcpu);
|
||||
if (powerpc_pow_enabled) {
|
||||
if (!busy) {
|
||||
critical_enter();
|
||||
cpu_idleclock();
|
||||
}
|
||||
switch (vers) {
|
||||
case IBM970:
|
||||
case IBM970FX:
|
||||
case IBM970MP:
|
||||
case MPC7447A:
|
||||
case MPC7448:
|
||||
case MPC7450:
|
||||
case MPC7455:
|
||||
case MPC7457:
|
||||
__asm __volatile("\
|
||||
dssall; sync; mtmsr %0; isync"
|
||||
:: "r"(msr | PSL_POW));
|
||||
break;
|
||||
default:
|
||||
powerpc_sync();
|
||||
mtmsr(msr | PSL_POW);
|
||||
isync();
|
||||
break;
|
||||
}
|
||||
if (!busy) {
|
||||
cpu_activeclock();
|
||||
critical_exit();
|
||||
}
|
||||
}
|
||||
CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done",
|
||||
busy, curcpu);
|
||||
}
|
||||
|
||||
int
|
||||
cpu_idle_wakeup(int cpu)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
ptrace_set_pc(struct thread *td, unsigned long addr)
|
||||
{
|
||||
|
@ -197,8 +197,6 @@ static u_int phys_avail_count;
|
||||
static int regions_sz, pregions_sz;
|
||||
static struct ofw_map *translations;
|
||||
|
||||
extern struct pmap ofw_pmap;
|
||||
|
||||
/*
|
||||
* Lock for the pteg and pvo tables.
|
||||
*/
|
||||
@ -669,10 +667,7 @@ moea_cpu_bootstrap(mmu_t mmup, int ap)
|
||||
isync();
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
mtsrin(i << ADDR_SR_SHFT, EMPTY_SEGMENT);
|
||||
|
||||
__asm __volatile("mtsr %0,%1" :: "n"(KERNEL_SR), "r"(KERNEL_SEGMENT));
|
||||
__asm __volatile("mtsr %0,%1" :: "n"(KERNEL2_SR), "r"(KERNEL2_SEGMENT));
|
||||
mtsrin(i << ADDR_SR_SHFT, kernel_pmap->pm_sr[i]);
|
||||
powerpc_sync();
|
||||
|
||||
sdr = (u_int)moea_pteg_table | (moea_pteg_mask >> 10);
|
||||
@ -859,11 +854,16 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
|
||||
moea_vsid_bitmap[0] |= 1;
|
||||
|
||||
/*
|
||||
* Set up the Open Firmware pmap and add it's mappings.
|
||||
* Initialize the kernel pmap (which is statically allocated).
|
||||
*/
|
||||
PMAP_LOCK_INIT(kernel_pmap);
|
||||
for (i = 0; i < 16; i++)
|
||||
kernel_pmap->pm_sr[i] = EMPTY_SEGMENT + i;
|
||||
kernel_pmap->pm_active = ~0;
|
||||
|
||||
/*
|
||||
* Set up the Open Firmware mappings
|
||||
*/
|
||||
moea_pinit(mmup, &ofw_pmap);
|
||||
ofw_pmap.pm_sr[KERNEL_SR] = KERNEL_SEGMENT;
|
||||
ofw_pmap.pm_sr[KERNEL2_SR] = KERNEL2_SEGMENT;
|
||||
if ((chosen = OF_finddevice("/chosen")) == -1)
|
||||
panic("moea_bootstrap: can't find /chosen");
|
||||
OF_getprop(chosen, "mmu", &mmui, 4);
|
||||
@ -900,16 +900,8 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
|
||||
|
||||
/* Enter the pages */
|
||||
for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) {
|
||||
struct vm_page m;
|
||||
|
||||
m.phys_addr = translations[i].om_pa + off;
|
||||
m.md.mdpg_cache_attrs = VM_MEMATTR_DEFAULT;
|
||||
m.oflags = VPO_BUSY;
|
||||
PMAP_LOCK(&ofw_pmap);
|
||||
moea_enter_locked(&ofw_pmap,
|
||||
translations[i].om_va + off, &m,
|
||||
VM_PROT_ALL, 1);
|
||||
PMAP_UNLOCK(&ofw_pmap);
|
||||
moea_kenter(mmup, translations[i].om_va + off,
|
||||
translations[i].om_pa + off);
|
||||
ofw_mappings++;
|
||||
}
|
||||
}
|
||||
@ -921,17 +913,6 @@ moea_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
|
||||
;
|
||||
Maxmem = powerpc_btop(phys_avail[i + 1]);
|
||||
|
||||
/*
|
||||
* Initialize the kernel pmap (which is statically allocated).
|
||||
*/
|
||||
PMAP_LOCK_INIT(kernel_pmap);
|
||||
for (i = 0; i < 16; i++) {
|
||||
kernel_pmap->pm_sr[i] = EMPTY_SEGMENT;
|
||||
}
|
||||
kernel_pmap->pm_sr[KERNEL_SR] = KERNEL_SEGMENT;
|
||||
kernel_pmap->pm_sr[KERNEL2_SR] = KERNEL2_SEGMENT;
|
||||
kernel_pmap->pm_active = ~0;
|
||||
|
||||
moea_cpu_bootstrap(mmup,0);
|
||||
|
||||
pmap_bootstrapped++;
|
||||
|
@ -275,8 +275,6 @@ static struct mem_region *pregions;
|
||||
static u_int phys_avail_count;
|
||||
static int regions_sz, pregions_sz;
|
||||
|
||||
extern struct pmap ofw_pmap;
|
||||
|
||||
extern void bs_remap_earlyboot(void);
|
||||
|
||||
|
||||
@ -1119,27 +1117,16 @@ moea64_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend)
|
||||
|
||||
chosen = OF_finddevice("/chosen");
|
||||
if (chosen != -1 && OF_getprop(chosen, "mmu", &mmui, 4) != -1) {
|
||||
#ifndef __powerpc64__
|
||||
moea64_pinit(mmup, &ofw_pmap);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
ofw_pmap.pm_sr[i] = kernel_pmap->pm_sr[i];
|
||||
#endif
|
||||
|
||||
if ((mmu = OF_instance_to_package(mmui)) == -1)
|
||||
panic("moea64_bootstrap: can't get mmu package");
|
||||
if ((sz = OF_getproplen(mmu, "translations")) == -1)
|
||||
panic("moea64_bootstrap: can't get ofw translation count");
|
||||
mmu = OF_instance_to_package(mmui);
|
||||
if (mmu == -1 || (sz = OF_getproplen(mmu, "translations")) == -1)
|
||||
sz = 0;
|
||||
if (sz > 6144 /* tmpstksz - 2 KB headroom */)
|
||||
panic("moea64_bootstrap: too many ofw translations");
|
||||
|
||||
moea64_add_ofw_mappings(mmup, mmu, sz);
|
||||
if (sz > 0)
|
||||
moea64_add_ofw_mappings(mmup, mmu, sz);
|
||||
}
|
||||
|
||||
#ifdef SMP
|
||||
TLBSYNC();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Calculate the last available physical address.
|
||||
*/
|
||||
@ -2385,6 +2372,9 @@ moea64_bootstrap_alloc(vm_size_t size, u_int align)
|
||||
if (s < phys_avail[i] || e > phys_avail[i + 1])
|
||||
continue;
|
||||
|
||||
if (s + size > platform_real_maxaddr())
|
||||
continue;
|
||||
|
||||
if (s == phys_avail[i]) {
|
||||
phys_avail[i] += size;
|
||||
} else if (e == phys_avail[i + 1]) {
|
||||
|
@ -228,6 +228,21 @@ cpudep_save_config(void *dummy)
|
||||
powerpc_sync();
|
||||
|
||||
break;
|
||||
#ifdef __powerpc64__
|
||||
case IBMCELLBE:
|
||||
if (mfmsr() & PSL_HV) {
|
||||
bsp_state[0] = mfspr(SPR_HID0);
|
||||
bsp_state[1] = mfspr(SPR_HID1);
|
||||
bsp_state[2] = mfspr(SPR_HID4);
|
||||
bsp_state[3] = mfspr(SPR_HID6);
|
||||
|
||||
bsp_state[4] = mfspr(SPR_CELL_TSCR);
|
||||
}
|
||||
|
||||
bsp_state[5] = mfspr(SPR_CELL_TSRL);
|
||||
|
||||
break;
|
||||
#endif
|
||||
case MPC7450:
|
||||
case MPC7455:
|
||||
case MPC7457:
|
||||
@ -288,6 +303,21 @@ cpudep_ap_setup()
|
||||
|
||||
powerpc_sync();
|
||||
break;
|
||||
#ifdef __powerpc64__
|
||||
case IBMCELLBE:
|
||||
if (mfmsr() & PSL_HV) {
|
||||
mtspr(SPR_HID0, bsp_state[0]);
|
||||
mtspr(SPR_HID1, bsp_state[1]);
|
||||
mtspr(SPR_HID4, bsp_state[2]);
|
||||
mtspr(SPR_HID6, bsp_state[3]);
|
||||
|
||||
mtspr(SPR_CELL_TSCR, bsp_state[4]);
|
||||
}
|
||||
|
||||
mtspr(SPR_CELL_TSRL, bsp_state[5]);
|
||||
|
||||
break;
|
||||
#endif
|
||||
case MPC7450:
|
||||
case MPC7455:
|
||||
case MPC7457:
|
||||
|
@ -36,9 +36,14 @@
|
||||
#include <vm/vm.h>
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/uma.h>
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_map.h>
|
||||
#include <vm/vm_page.h>
|
||||
#include <vm/vm_pageout.h>
|
||||
#include <vm/vm_phys.h>
|
||||
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/platform.h>
|
||||
#include <machine/pmap.h>
|
||||
#include <machine/vmparam.h>
|
||||
|
||||
@ -474,6 +479,51 @@ slb_insert_user(pmap_t pm, struct slb *slb)
|
||||
pm->pm_slb[i] = slb;
|
||||
}
|
||||
|
||||
static void *
|
||||
slb_uma_real_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
|
||||
{
|
||||
static vm_offset_t realmax = 0;
|
||||
void *va;
|
||||
vm_page_t m;
|
||||
int pflags;
|
||||
|
||||
if (realmax == 0)
|
||||
realmax = platform_real_maxaddr();
|
||||
|
||||
*flags = UMA_SLAB_PRIV;
|
||||
if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT)
|
||||
pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED;
|
||||
else
|
||||
pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED;
|
||||
if (wait & M_ZERO)
|
||||
pflags |= VM_ALLOC_ZERO;
|
||||
|
||||
for (;;) {
|
||||
m = vm_phys_alloc_contig(1, 0, realmax, PAGE_SIZE,
|
||||
PAGE_SIZE);
|
||||
if (m == NULL) {
|
||||
if (wait & M_NOWAIT)
|
||||
return (NULL);
|
||||
VM_WAIT;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
va = (void *) VM_PAGE_TO_PHYS(m);
|
||||
|
||||
if (!hw_direct_map)
|
||||
pmap_kenter((vm_offset_t)va, VM_PAGE_TO_PHYS(m));
|
||||
|
||||
if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
|
||||
bzero(va, PAGE_SIZE);
|
||||
|
||||
/* vm_phys_alloc_contig does not track wiring */
|
||||
atomic_add_int(&cnt.v_wire_count, 1);
|
||||
m->wire_count = 1;
|
||||
|
||||
return (va);
|
||||
}
|
||||
|
||||
static void
|
||||
slb_zone_init(void *dummy)
|
||||
{
|
||||
@ -482,6 +532,11 @@ slb_zone_init(void *dummy)
|
||||
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM);
|
||||
slb_cache_zone = uma_zcreate("SLB cache", 64*sizeof(struct slb *),
|
||||
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM);
|
||||
|
||||
if (platform_real_maxaddr() != VM_MAX_ADDRESS) {
|
||||
uma_zone_set_allocf(slb_cache_zone, slb_uma_real_alloc);
|
||||
uma_zone_set_allocf(slbt_zone, slb_uma_real_alloc);
|
||||
}
|
||||
}
|
||||
|
||||
struct slb **
|
||||
|
@ -468,50 +468,6 @@ cpu_flush_dcache(void *ptr, size_t len)
|
||||
/* TBD */
|
||||
}
|
||||
|
||||
/*
|
||||
* cpu_idle
|
||||
*
|
||||
* Set Wait state enable.
|
||||
*/
|
||||
void
|
||||
cpu_idle (int busy)
|
||||
{
|
||||
register_t msr;
|
||||
|
||||
msr = mfmsr();
|
||||
|
||||
#ifdef INVARIANTS
|
||||
if ((msr & PSL_EE) != PSL_EE) {
|
||||
struct thread *td = curthread;
|
||||
printf("td msr %x\n", td->td_md.md_saved_msr);
|
||||
panic("ints disabled in idleproc!");
|
||||
}
|
||||
#endif
|
||||
|
||||
CTR2(KTR_SPARE2, "cpu_idle(%d) at %d",
|
||||
busy, curcpu);
|
||||
if (!busy) {
|
||||
critical_enter();
|
||||
cpu_idleclock();
|
||||
}
|
||||
/* Freescale E500 core RM section 6.4.1. */
|
||||
msr = msr | PSL_WE;
|
||||
__asm __volatile("msync; mtmsr %0; isync" :: "r" (msr));
|
||||
if (!busy) {
|
||||
cpu_activeclock();
|
||||
critical_exit();
|
||||
}
|
||||
CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done",
|
||||
busy, curcpu);
|
||||
}
|
||||
|
||||
int
|
||||
cpu_idle_wakeup(int cpu)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
spinlock_enter(void)
|
||||
{
|
||||
@ -641,12 +597,3 @@ bzero(void *buf, size_t len)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX what is the better/proper place for this routine?
|
||||
*/
|
||||
int
|
||||
mem_valid(vm_offset_t addr, int len)
|
||||
{
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
@ -106,6 +106,17 @@ mfsrin(vm_offset_t va)
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline register_t
|
||||
mfctrl(void)
|
||||
{
|
||||
register_t value;
|
||||
|
||||
__asm __volatile ("mfspr %0,136" : "=r"(value));
|
||||
|
||||
return (value);
|
||||
}
|
||||
|
||||
|
||||
static __inline void
|
||||
mtdec(register_t value)
|
||||
{
|
||||
|
@ -44,6 +44,7 @@ struct mem_region {
|
||||
};
|
||||
|
||||
void mem_regions(struct mem_region **, int *, struct mem_region **, int *);
|
||||
vm_offset_t platform_real_maxaddr(void);
|
||||
|
||||
u_long platform_timebase_freq(struct cpuref *);
|
||||
|
||||
|
@ -420,6 +420,10 @@
|
||||
#define SPR_HID1 0x3f1 /* ..8 Hardware Implementation Register 1 */
|
||||
#define SPR_HID4 0x3f4 /* ..8 Hardware Implementation Register 4 */
|
||||
#define SPR_HID5 0x3f6 /* ..8 Hardware Implementation Register 5 */
|
||||
#define SPR_HID6 0x3f9 /* ..8 Hardware Implementation Register 6 */
|
||||
|
||||
#define SPR_CELL_TSRL 0x380 /* ... Cell BE Thread Status Register */
|
||||
#define SPR_CELL_TSCR 0x399 /* ... Cell BE Thread Switch Register */
|
||||
|
||||
#if defined(AIM)
|
||||
#define SPR_DBSR 0x3f0 /* 4.. Debug Status Register */
|
||||
|
@ -66,7 +66,6 @@ static struct mem_region OFfree[OFMEM_REGIONS + 3];
|
||||
static int nOFmem;
|
||||
|
||||
extern register_t ofmsr[5];
|
||||
extern struct pmap ofw_pmap;
|
||||
static int (*ofwcall)(void *);
|
||||
static void *fdt;
|
||||
int ofw_real_mode;
|
||||
@ -417,59 +416,27 @@ openfirmware_core(void *args)
|
||||
{
|
||||
int result;
|
||||
register_t oldmsr;
|
||||
#ifndef __powerpc64__
|
||||
register_t srsave[16];
|
||||
u_int i;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Turn off exceptions - we really don't want to end up
|
||||
* anywhere unexpected with PCPU set to something strange,
|
||||
* the stack pointer wrong, or the OFW mapping enabled.
|
||||
* anywhere unexpected with PCPU set to something strange
|
||||
* or the stack pointer wrong.
|
||||
*/
|
||||
oldmsr = intr_disable();
|
||||
|
||||
ofw_sprg_prepare();
|
||||
|
||||
#ifndef __powerpc64__
|
||||
if (pmap_bootstrapped && !ofw_real_mode) {
|
||||
/*
|
||||
* Swap the kernel's address space with Open Firmware's
|
||||
*/
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
srsave[i] = mfsrin(i << ADDR_SR_SHFT);
|
||||
mtsrin(i << ADDR_SR_SHFT, ofw_pmap.pm_sr[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear battable[] translations
|
||||
*/
|
||||
if (!(cpu_features & PPC_FEATURE_64)) {
|
||||
__asm __volatile("mtdbatu 2, %0\n"
|
||||
"mtdbatu 3, %0" : : "r" (0));
|
||||
}
|
||||
isync();
|
||||
}
|
||||
#endif
|
||||
#if defined(AIM) && !defined(__powerpc64__)
|
||||
/*
|
||||
* Clear battable[] translations
|
||||
*/
|
||||
if (!(cpu_features & PPC_FEATURE_64))
|
||||
__asm __volatile("mtdbatu 2, %0\n"
|
||||
"mtdbatu 3, %0" : : "r" (0));
|
||||
isync();
|
||||
#endif
|
||||
|
||||
result = ofwcall(args);
|
||||
|
||||
#ifndef __powerpc64__
|
||||
if (pmap_bootstrapped && !ofw_real_mode) {
|
||||
/*
|
||||
* Restore the kernel's addr space. The isync() doesn;t
|
||||
* work outside the loop unless mtsrin() is open-coded
|
||||
* in an asm statement :(
|
||||
*/
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
mtsrin(i << ADDR_SR_SHFT, srsave[i]);
|
||||
isync();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
ofw_sprg_restore();
|
||||
|
||||
intr_restore(oldmsr);
|
||||
@ -692,16 +659,3 @@ OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag,
|
||||
return (bus_space_map(*tag, addr, size, 0, handle));
|
||||
}
|
||||
|
||||
int
|
||||
mem_valid(vm_offset_t addr, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nOFmem; i++)
|
||||
if ((addr >= OFmem[i].mr_start)
|
||||
&& (addr + len < OFmem[i].mr_start + OFmem[i].mr_size))
|
||||
return (0);
|
||||
|
||||
return (EFAULT);
|
||||
}
|
||||
|
@ -64,6 +64,7 @@
|
||||
#include <sys/conf.h>
|
||||
#include <sys/cpu.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
@ -73,12 +74,15 @@
|
||||
#include <machine/smp.h>
|
||||
#include <machine/spr.h>
|
||||
|
||||
int powerpc_pow_enabled;
|
||||
|
||||
static void cpu_6xx_setup(int cpuid, uint16_t vers);
|
||||
static void cpu_e500_setup(int cpuid, uint16_t vers);
|
||||
static void cpu_970_setup(int cpuid, uint16_t vers);
|
||||
|
||||
int powerpc_pow_enabled;
|
||||
void (*cpu_idle_hook)(void) = NULL;
|
||||
static void cpu_idle_60x(void);
|
||||
static void cpu_idle_e500(void);
|
||||
|
||||
struct cputab {
|
||||
const char *name;
|
||||
uint16_t version;
|
||||
@ -145,6 +149,9 @@ static const struct cputab models[] = {
|
||||
0, cpu_e500_setup },
|
||||
{ "Freescale e500v2 core", FSL_E500v2, REVFMT_MAJMIN,
|
||||
0, cpu_e500_setup },
|
||||
{ "IBM Cell Broadband Engine", IBMCELLBE, REVFMT_MAJMIN,
|
||||
PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC | PPC_FEATURE_HAS_FPU,
|
||||
NULL},
|
||||
{ "Unknown PowerPC CPU", 0, REVFMT_HEX, 0, NULL },
|
||||
};
|
||||
|
||||
@ -374,6 +381,9 @@ cpu_6xx_setup(int cpuid, uint16_t vers)
|
||||
}
|
||||
|
||||
printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, bitmask);
|
||||
|
||||
if (cpu_idle_hook == NULL)
|
||||
cpu_idle_hook = cpu_idle_60x;
|
||||
}
|
||||
|
||||
|
||||
@ -441,6 +451,9 @@ cpu_e500_setup(int cpuid, uint16_t vers)
|
||||
mtspr(SPR_HID0, hid0);
|
||||
|
||||
printf("cpu%d: HID0 %b\n", cpuid, (int)hid0, HID0_E500_BITMASK);
|
||||
|
||||
if (cpu_idle_hook == NULL)
|
||||
cpu_idle_hook = cpu_idle_e500;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -478,6 +491,8 @@ cpu_970_setup(int cpuid, uint16_t vers)
|
||||
: "=r" (hid0_hi) : "K" (SPR_HID0));
|
||||
printf("cpu%d: HID0 %b\n", cpuid, (int)(hid0_hi), HID0_970_BITMASK);
|
||||
#endif
|
||||
|
||||
cpu_idle_hook = cpu_idle_60x;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -490,3 +505,87 @@ cpu_feature_bit(SYSCTL_HANDLER_ARGS)
|
||||
return (sysctl_handle_int(oidp, &result, 0, req));
|
||||
}
|
||||
|
||||
void
|
||||
cpu_idle(int busy)
|
||||
{
|
||||
|
||||
#ifdef INVARIANTS
|
||||
if ((mfmsr() & PSL_EE) != PSL_EE) {
|
||||
struct thread *td = curthread;
|
||||
printf("td msr %#lx\n", (u_long)td->td_md.md_saved_msr);
|
||||
panic("ints disabled in idleproc!");
|
||||
}
|
||||
#endif
|
||||
|
||||
CTR2(KTR_SPARE2, "cpu_idle(%d) at %d",
|
||||
busy, curcpu);
|
||||
if (cpu_idle_hook != NULL) {
|
||||
if (!busy) {
|
||||
critical_enter();
|
||||
cpu_idleclock();
|
||||
}
|
||||
cpu_idle_hook();
|
||||
if (!busy) {
|
||||
cpu_activeclock();
|
||||
critical_exit();
|
||||
}
|
||||
}
|
||||
CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done",
|
||||
busy, curcpu);
|
||||
}
|
||||
|
||||
int
|
||||
cpu_idle_wakeup(int cpu)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
cpu_idle_60x(void)
|
||||
{
|
||||
register_t msr;
|
||||
uint16_t vers;
|
||||
|
||||
if (!powerpc_pow_enabled)
|
||||
return;
|
||||
|
||||
msr = mfmsr();
|
||||
vers = mfpvr() >> 16;
|
||||
|
||||
#ifdef AIM
|
||||
switch (vers) {
|
||||
case IBM970:
|
||||
case IBM970FX:
|
||||
case IBM970MP:
|
||||
case MPC7447A:
|
||||
case MPC7448:
|
||||
case MPC7450:
|
||||
case MPC7455:
|
||||
case MPC7457:
|
||||
__asm __volatile("\
|
||||
dssall; sync; mtmsr %0; isync"
|
||||
:: "r"(msr | PSL_POW));
|
||||
break;
|
||||
default:
|
||||
powerpc_sync();
|
||||
mtmsr(msr | PSL_POW);
|
||||
isync();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
cpu_idle_e500(void)
|
||||
{
|
||||
register_t msr;
|
||||
|
||||
msr = mfmsr();
|
||||
|
||||
#ifdef E500
|
||||
/* Freescale E500 core RM section 6.4.1. */
|
||||
__asm __volatile("msync; mtmsr %0; isync" ::
|
||||
"r" (msr | PSL_WE));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,13 @@ machdep_ap_bootstrap(void)
|
||||
;
|
||||
|
||||
/* Initialize DEC and TB, sync with the BSP values */
|
||||
#ifdef __powerpc64__
|
||||
/* Writing to the time base register is hypervisor-privileged */
|
||||
if (mfmsr() & PSL_HV)
|
||||
mttb(ap_timebase);
|
||||
#else
|
||||
mttb(ap_timebase);
|
||||
#endif
|
||||
decr_ap_init();
|
||||
|
||||
/* Serialize console output and AP count increment */
|
||||
@ -98,13 +104,6 @@ machdep_ap_bootstrap(void)
|
||||
sched_throw(NULL);
|
||||
}
|
||||
|
||||
struct cpu_group *
|
||||
cpu_topo(void)
|
||||
{
|
||||
|
||||
return (smp_topo_none());
|
||||
}
|
||||
|
||||
void
|
||||
cpu_mp_setmaxid(void)
|
||||
{
|
||||
@ -247,7 +246,13 @@ cpu_mp_unleash(void *dummy)
|
||||
/* Let APs continue */
|
||||
atomic_store_rel_int(&ap_letgo, 1);
|
||||
|
||||
#ifdef __powerpc64__
|
||||
/* Writing to the time base register is hypervisor-privileged */
|
||||
if (mfmsr() & PSL_HV)
|
||||
mttb(ap_timebase);
|
||||
#else
|
||||
mttb(ap_timebase);
|
||||
#endif
|
||||
|
||||
while (ap_awake < smp_cpus)
|
||||
;
|
||||
|
@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/smp.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@ -47,6 +48,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <vm/vm_page.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/platform.h>
|
||||
#include <machine/platformvar.h>
|
||||
#include <machine/smp.h>
|
||||
@ -62,11 +64,45 @@ static char plat_name[64] = "";
|
||||
SYSCTL_STRING(_hw, OID_AUTO, platform, CTLFLAG_RD | CTLFLAG_TUN,
|
||||
plat_name, 0, "Platform currently in use");
|
||||
|
||||
static struct mem_region *pregions = NULL;
|
||||
static struct mem_region *aregions = NULL;
|
||||
static int npregions, naregions;
|
||||
|
||||
void
|
||||
mem_regions(struct mem_region **phys, int *physsz, struct mem_region **avail,
|
||||
int *availsz)
|
||||
{
|
||||
PLATFORM_MEM_REGIONS(plat_obj, phys, physsz, avail, availsz);
|
||||
if (pregions == NULL)
|
||||
PLATFORM_MEM_REGIONS(plat_obj, &pregions, &npregions,
|
||||
&aregions, &naregions);
|
||||
|
||||
*phys = pregions;
|
||||
*avail = aregions;
|
||||
*physsz = npregions;
|
||||
*availsz = naregions;
|
||||
}
|
||||
|
||||
int
|
||||
mem_valid(vm_offset_t addr, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (pregions == NULL)
|
||||
PLATFORM_MEM_REGIONS(plat_obj, &pregions, &npregions,
|
||||
&aregions, &naregions);
|
||||
|
||||
for (i = 0; i < npregions; i++)
|
||||
if ((addr >= pregions[i].mr_start)
|
||||
&& (addr + len < pregions[i].mr_start + pregions[i].mr_size))
|
||||
return (0);
|
||||
|
||||
return (EFAULT);
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
platform_real_maxaddr(void)
|
||||
{
|
||||
return (PLATFORM_REAL_MAXADDR(plat_obj));
|
||||
}
|
||||
|
||||
const char *
|
||||
@ -105,6 +141,14 @@ platform_smp_start_cpu(struct pcpu *cpu)
|
||||
return (PLATFORM_SMP_START_CPU(plat_obj, cpu));
|
||||
}
|
||||
|
||||
#ifdef SMP
|
||||
struct cpu_group *
|
||||
cpu_topo(void)
|
||||
{
|
||||
return (PLATFORM_SMP_TOPO(plat_obj));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Reset back to firmware.
|
||||
*/
|
||||
@ -164,9 +208,10 @@ platform_probe_and_attach()
|
||||
}
|
||||
|
||||
/*
|
||||
* We can't free the KOBJ, since it is static. Luckily,
|
||||
* this has no ill effects since it gets reset every time.
|
||||
* We can't free the KOBJ, since it is static. Reset the ops
|
||||
* member of this class so that we can come back later.
|
||||
*/
|
||||
platp->ops = NULL;
|
||||
}
|
||||
|
||||
if (plat_def_impl == NULL)
|
||||
|
@ -30,10 +30,12 @@
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/smp.h>
|
||||
|
||||
#include <machine/platform.h>
|
||||
#include <machine/platformvar.h>
|
||||
#include <machine/smp.h>
|
||||
#include <machine/vmparam.h>
|
||||
|
||||
/**
|
||||
* @defgroup PLATFORM platform - KObj methods for PowerPC platform
|
||||
@ -66,6 +68,18 @@ CODE {
|
||||
{
|
||||
return (ENOENT);
|
||||
}
|
||||
static struct cpu_group *platform_null_smp_topo(platform_t plat)
|
||||
{
|
||||
#ifdef SMP
|
||||
return (smp_topo_none());
|
||||
#else
|
||||
return (NULL);
|
||||
#endif
|
||||
}
|
||||
static vm_offset_t platform_null_real_maxaddr(platform_t plat)
|
||||
{
|
||||
return (VM_MAX_ADDRESS);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -108,6 +122,15 @@ METHOD void mem_regions {
|
||||
int *_availsz;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Return the maximum address accessible in real mode
|
||||
* (for use with hypervisors)
|
||||
*/
|
||||
METHOD vm_offset_t real_maxaddr {
|
||||
platform_t _plat;
|
||||
} DEFAULT platform_null_real_maxaddr;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get the CPU's timebase frequency, in ticks per second.
|
||||
*
|
||||
@ -161,6 +184,13 @@ METHOD int smp_start_cpu {
|
||||
struct pcpu *_cpu;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Return SMP topology
|
||||
*/
|
||||
METHOD cpu_group_t smp_topo {
|
||||
platform_t _plat;
|
||||
} DEFAULT platform_null_smp_topo;
|
||||
|
||||
/**
|
||||
* @brief Reset system
|
||||
*/
|
||||
|
@ -58,7 +58,7 @@
|
||||
* in the range 5 to 9.
|
||||
*/
|
||||
#undef __FreeBSD_version
|
||||
#define __FreeBSD_version 900024 /* Master, propagated to newvers */
|
||||
#define __FreeBSD_version 900025 /* Master, propagated to newvers */
|
||||
|
||||
#ifndef LOCORE
|
||||
#include <sys/types.h>
|
||||
|
@ -284,7 +284,7 @@ typedef struct __siginfo {
|
||||
#define POLL_MSG 3 /* Input message available */
|
||||
#define POLL_ERR 4 /* I/O Error */
|
||||
#define POLL_PRI 5 /* High priority input available */
|
||||
#define POLL_HUP 4 /* Device disconnected */
|
||||
#define POLL_HUP 6 /* Device disconnected */
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
#ifndef LOCORE
|
||||
|
||||
#ifdef SMP
|
||||
|
||||
/*
|
||||
* Topology of a NUMA or HTT system.
|
||||
*
|
||||
@ -41,6 +39,8 @@ struct cpu_group {
|
||||
int8_t cg_flags; /* Traversal modifiers. */
|
||||
};
|
||||
|
||||
typedef struct cpu_group *cpu_group_t;
|
||||
|
||||
/*
|
||||
* Defines common resources for CPUs in the group. The highest level
|
||||
* resource should be used when multiple are shared.
|
||||
@ -60,6 +60,7 @@ struct cpu_group {
|
||||
/*
|
||||
* Convenience routines for building topologies.
|
||||
*/
|
||||
#ifdef SMP
|
||||
struct cpu_group *smp_topo(void);
|
||||
struct cpu_group *smp_topo_none(void);
|
||||
struct cpu_group *smp_topo_1level(int l1share, int l1count, int l1flags);
|
||||
|
@ -137,6 +137,7 @@ typedef __uid_t uid_t;
|
||||
#define SO_LISTENQLEN 0x1012 /* socket's complete queue length */
|
||||
#define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */
|
||||
#define SO_SETFIB 0x1014 /* use this FIB to route */
|
||||
#define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -117,7 +117,14 @@ struct socket {
|
||||
void *so_accept_filter_arg; /* saved filter args */
|
||||
char *so_accept_filter_str; /* saved user args */
|
||||
} *so_accf;
|
||||
/*
|
||||
* so_fibnum, so_user_cookie and friends can be used to attach
|
||||
* some user-specified metadata to a socket, which then can be
|
||||
* used by the kernel for various actions.
|
||||
* so_user_cookie is used by ipfw/dummynet.
|
||||
*/
|
||||
int so_fibnum; /* routing domain for this socket */
|
||||
uint32_t so_user_cookie;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user