Commit Graph

14 Commits

Author SHA1 Message Date
Warner Losh
2c24ffacd6 Fix typo not -> nor and add 'the' because we are talking about specific flags
and make the punctuation parallel between the three cases.

Submitted by: Yoshihiro Ota-san
Differential Revision: https://reviews.freebsd.org/D21530
2019-09-06 15:01:47 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Dimitry Andric
3283f9d4f5 Make sure the compiler knows g_gate_xvlog() and g_gate_xlog() do not
return.  This silences a warning from clang 3.2 about uninitialized use
of the variable 'mediasize' in sbin/ggate/shared/ggate.c.

Reviewed by:	pjd
MFC after:	1 week
2012-08-06 21:02:40 +00:00
Pawel Jakub Dawidek
d44dbcbb33 Style nits. 2010-02-18 23:04:01 +00:00
Pawel Jakub Dawidek
2663c8855e Implement a work-around for poor ggate write performance. 2007-04-06 11:19:48 +00:00
Pawel Jakub Dawidek
15c7f46bcf For consistency use 'unsigned' instead of 'u_int'. 2006-12-18 11:12:00 +00:00
Pawel Jakub Dawidek
905cd66703 Fix ggated for platforms with 64bit size_t. The DIOCGSECTORSIZE ioctl
returns u_int.

Reported by:	Javier Martín Rueda <jmrueda@diatel.upm.es>
PR:		amd64/91799
MFC after:	3 days
2006-12-15 18:16:47 +00:00
Pawel Jakub Dawidek
a930f272de - Handle timeouts from recv(2) properly.
- Increase timeout to 8 seconds (should be made configurable).

Reported by:	Ulrich Spoerlein <uspoerlein@gmail.com>
Reported by:	Christian Laursen <xi@borderworlds.dk>
PR:		kern/104829
MFC after:	1 week
2006-10-30 18:29:24 +00:00
Pawel Jakub Dawidek
7be67fe3d1 Reimplement ggatec/ggated applications.
Change communication protocol to be much more resistant on network
problems and to allow for much better performance.

Better performance is achieved by creating two connections between
ggatec and ggated one for sending the data and one for receiving it.
Every connection is handled by separeted thread, so there is no more
synchronous data flow (send and wait for response), now one threads
sends all requests and another receives the data.

Use two threads in ggatec(8):
- sendtd, which takes I/O requests from the kernel and sends them to the
  ggated daemon on the other end;
- recvtd, which waits for ggated responses and forwards them to the kernel.

Use three threads in ggated(8):
- recvtd, which waits for I/O requests and puts them onto incoming queue;
- disktd, which takes requests from the incoming queue, does disk operations
  and puts finished requests onto outgoing queue;
- sendtd, which takes finished requests from the outgoing queue and sends
  responses back to ggatec.

Because there were major changes in communication protocol, there is no
backward compatibility, from now on, both client and server has to run
on 5.x or 6.x (or at least ggated should be from the same FreeBSD version
on which ggatec is running).

For Gbit networks some buffers need to be increased. I use those settings:
kern.ipc.maxsockbuf=16777216
net.inet.tcp.sendspace=8388608
net.inet.tcp.recvspace=8388608
and I use '-S 4194304 -R 4194304' options for both, ggatec and ggated.

Approved by:	re (scottl)
2005-07-08 21:28:26 +00:00
Xin LI
263d6a7ece include stdarg.h for va_list 2005-05-02 10:04:16 +00:00
Pawel Jakub Dawidek
122abe0385 Fix/clean up return values checking. 2004-09-08 07:57:14 +00:00
Pawel Jakub Dawidek
71ae6999b6 Print mediasize in human readable form as well. 2004-06-21 09:20:06 +00:00
Pawel Jakub Dawidek
86bfa45446 Fix compiling on 64-bit architectures. 2004-05-02 17:59:49 +00:00
Pawel Jakub Dawidek
6ac5fe4854 Stuff shared between ggate utilities. 2004-04-30 16:13:45 +00:00