diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-11-30 13:24:21 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-11-30 13:24:21 +0000 |
commit | 651e4e6a307776b3f5201639e10c4b4d0949dcb0 (patch) | |
tree | fcd9e335b091a7447c168c321acc47998ebd38d2 /sys/sys | |
parent | dcf58f92e2c19a32fc171f763698e711c719badc (diff) | |
download | src-651e4e6a307776b3f5201639e10c4b4d0949dcb0.tar.gz src-651e4e6a307776b3f5201639e10c4b4d0949dcb0.zip |
Merge from projects/sendfile: extend protocols API to support
sending not ready data:
o Add new flag to pru_send() flags - PRUS_NOTREADY.
o Add new protocol method pru_ready().
Sponsored by: Nginx, Inc.
Sponsored by: Netflix
Notes
Notes:
svn path=/head/; revision=275329
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/mbuf.h | 2 | ||||
-rw-r--r-- | sys/sys/protosw.h | 3 | ||||
-rw-r--r-- | sys/sys/sockbuf.h | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 190900c43d22..ac3cfb2d0ced 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -950,7 +950,7 @@ struct mbuf *m_copypacket(struct mbuf *, int); void m_copy_pkthdr(struct mbuf *, struct mbuf *); struct mbuf *m_copyup(struct mbuf *, int, int); struct mbuf *m_defrag(struct mbuf *, int); -void m_demote(struct mbuf *, int); +void m_demote(struct mbuf *, int, int); struct mbuf *m_devget(char *, int, int, struct ifnet *, void (*)(char *, caddr_t, u_int)); struct mbuf *m_dup(struct mbuf *, int); diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 2d98a4c25edd..55db0e339699 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -208,6 +208,8 @@ struct pr_usrreqs { #define PRUS_OOB 0x1 #define PRUS_EOF 0x2 #define PRUS_MORETOCOME 0x4 +#define PRUS_NOTREADY 0x8 + int (*pru_ready)(struct socket *so, struct mbuf *m, int count); int (*pru_sense)(struct socket *so, struct stat *sb); int (*pru_shutdown)(struct socket *so); int (*pru_flush)(struct socket *so, int direction); @@ -251,6 +253,7 @@ int pru_rcvd_notsupp(struct socket *so, int flags); int pru_rcvoob_notsupp(struct socket *so, struct mbuf *m, int flags); int pru_send_notsupp(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *td); +int pru_ready_notsupp(struct socket *so, struct mbuf *m, int count); int pru_sense_null(struct socket *so, struct stat *sb); int pru_shutdown_notsupp(struct socket *so); int pru_sockaddr_notsupp(struct socket *so, struct sockaddr **nam); diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h index ec16b2593dd2..5bd9bb556251 100644 --- a/sys/sys/sockbuf.h +++ b/sys/sys/sockbuf.h @@ -131,8 +131,8 @@ struct sockbuf { void sbappend(struct sockbuf *sb, struct mbuf *m); void sbappend_locked(struct sockbuf *sb, struct mbuf *m); -void sbappendstream(struct sockbuf *sb, struct mbuf *m); -void sbappendstream_locked(struct sockbuf *sb, struct mbuf *m); +void sbappendstream(struct sockbuf *sb, struct mbuf *m, int flags); +void sbappendstream_locked(struct sockbuf *sb, struct mbuf *m, int flags); int sbappendaddr(struct sockbuf *sb, const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control); int sbappendaddr_locked(struct sockbuf *sb, const struct sockaddr *asa, |