search for: msg_flags

Displaying 20 results from an estimated 236 matches for "msg_flags".

2023 Jun 17
2
[PATCH net-next v2 17/17] net: Kill MSG_SENDPAGE_NOTLAST
...et/ipv4/tcp_bpf.c | 4 +++- net/tls/tls_device.c | 3 +-- net/tls/tls_main.c | 2 +- net/tls/tls_sw.c | 2 +- tools/perf/trace/beauty/include/linux/socket.h | 1 - tools/perf/trace/beauty/msg_flags.c | 3 --- 7 files changed, 7 insertions(+), 12 deletions(-) diff --git a/include/linux/socket.h b/include/linux/socket.h index 58204700018a..39b74d83c7c4 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -319,7 +319,6 @@ struct ucred { #define MSG_MORE 0x8000 /* Send...
2018 Sep 06
1
[PATCH net-next 08/11] tun: switch to new type of msg_control
...lback(uarg, false); > } > > @@ -1150,7 +1150,13 @@ static int tap_sendmsg(struct socket *sock, struct msghdr *m, > size_t total_len) > { > struct tap_queue *q = container_of(sock, struct tap_queue, sock); > - return tap_get_user(q, m, &m->msg_iter, m->msg_flags & MSG_DONTWAIT); > + struct tun_msg_ctl *ctl = m->msg_control; > + > + if (ctl && ctl->type != TUN_MSG_UBUF) > + return -EINVAL; > + > + return tap_get_user(q, ctl ? ctl->ptr : NULL, &m->msg_iter, > + m->msg_flags & MSG_DONTWAIT); >...
2003 Oct 02
2
Patches
As the freeze for Debian sarge slowly approaches I want to make sure the Dovecot packages are in as good condition as possible. I see there have been a number of patches since 0.99.10. I have added the following patches: * segfault when user home directory is empty * Proper PAM service name * Make suid work on 2.6 kernels Any other patches thatI ought to add. Or better yet, will there be a
2003 Sep 29
1
Handling of X-Status flags
....c dovecot-0.99.10.brb/src/lib-index/mbox/mbox-rewrite.c --- dovecot-0.99.10/src/lib-index/mbox/mbox-rewrite.c Sun Jun 15 11:43:05 2003 +++ dovecot-0.99.10.brb/src/lib-index/mbox/mbox-rewrite.c Sat Sep 27 13:19:54 2003 @@ -210,9 +210,9 @@ str = t_strconcat("X-Status: ", (ctx->msg_flags & MAIL_ANSWERED) ? "A" : "", - (ctx->msg_flags & MAIL_DRAFT) ? "D" : "", + (ctx->msg_flags & MAIL_DELETED) ? "D" : "", (ctx->msg_flags & MAIL_FLAGGED) ? "F" : "", - (ctx->ms...
2018 May 21
1
[RFC PATCH net-next 04/12] vhost_net: split out datacopy logic
...uot;out" and "in" down to inside the for loop as well. > + int head; move this "head" declaration inside for-loop below. > + struct msghdr msg = { > + .msg_name = NULL, > + .msg_namelen = 0, > + .msg_control = NULL, > + .msg_controllen = 0, > + .msg_flags = MSG_DONTWAIT, > + }; > + size_t len, total_len = 0; > + int err; > + size_t hdr_size; > + struct socket *sock; > + struct vhost_net_ubuf_ref *uninitialized_var(ubufs); > + int sent_pkts = 0; why do we need so many locals? > + > + mutex_lock(&vq->mutex); > +...
2018 Sep 06
0
[PATCH net-next 08/11] tun: switch to new type of msg_control
...uarg = msg_control; uarg->callback(uarg, false); } @@ -1150,7 +1150,13 @@ static int tap_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) { struct tap_queue *q = container_of(sock, struct tap_queue, sock); - return tap_get_user(q, m, &m->msg_iter, m->msg_flags & MSG_DONTWAIT); + struct tun_msg_ctl *ctl = m->msg_control; + + if (ctl && ctl->type != TUN_MSG_UBUF) + return -EINVAL; + + return tap_get_user(q, ctl ? ctl->ptr : NULL, &m->msg_iter, + m->msg_flags & MSG_DONTWAIT); } static int tap_recvmsg(struct sock...
2006 May 23
11
how to debug RTNETLINK invalid argument?
Hey, I am getting an invalid argument trying to insert a qdisc: [root@emu-5 iproute2]# tc qdisc add dev eth0 root xcp capacity 50Mbit limit 500 RTNETLINK answers: Invalid argument I''m not sure whats wrong here, because i can successfully insert this qdisc on other computers of mine. How can i debug this? Thanks! George
2018 Sep 07
1
[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
...break; > > > } > > > - vq->heads[nvq->done_idx].id = cpu_to_vhost32(vq, head); > > > - vq->heads[nvq->done_idx].len = 0; > > > - > > > total_len += len; > > > - if (tx_can_batch(vq, total_len)) > > > - msg.msg_flags |= MSG_MORE; > > > - else > > > - msg.msg_flags &= ~MSG_MORE; > > > + > > > + /* For simplicity, TX batching is only enabled if > > > + * sndbuf is unlimited. > > What if sndbuf changes while this processing is going on? > > We wil...
2017 Jan 18
7
[PATCH net-next V5 0/3] vhost_net tx batching
Hi: This series tries to implement tx batching support for vhost. This was done by using MSG_MORE as a hint for under layer socket. The backend (e.g tap) can then batch the packets temporarily in a list and submit it all once the number of bacthed exceeds a limitation. Tests shows obvious improvement on guest pktgen over over mlx4(noqueue) on host: Mpps -+%
2017 Jan 18
7
[PATCH net-next V5 0/3] vhost_net tx batching
Hi: This series tries to implement tx batching support for vhost. This was done by using MSG_MORE as a hint for under layer socket. The backend (e.g tap) can then batch the packets temporarily in a list and submit it all once the number of bacthed exceeds a limitation. Tests shows obvious improvement on guest pktgen over over mlx4(noqueue) on host: Mpps -+%
2018 May 21
1
[RFC PATCH net-next 03/12] vhost_net: introduce vhost_has_more_pkts()
...pty(&net->dev, vq) && > - likely(!vhost_exceeds_maxpend(net))) { > + vhost_has_more_pkts(net, vq)) { Yes, I know it came from here, but likely/unlikely are for branch control, so they should encapsulate everything inside the if, unless I'm mistaken. > msg.msg_flags |= MSG_MORE; > } else { > msg.msg_flags &= ~MSG_MORE; > @@ -605,7 +611,7 @@ static void handle_tx(struct vhost_net *net) > else > vhost_zerocopy_signal_used(net, vq); > vhost_net_tx_packet(net); > - if (unlikely(vhost_exceeds_weight(++sent_pkts, total_len)...
2010 Apr 26
1
valgrind ipconfig work
...har *ntoa(uint32_t addr) int packet_send(struct netdev *dev, struct iovec *iov, int iov_len) { struct sockaddr_ll sll; - struct msghdr msg = { - .msg_name = &sll, - .msg_namelen = sizeof(sll), - .msg_iov = iov, - .msg_iovlen = iov_len, - .msg_control = NULL, - .msg_controllen = 0, - .msg_flags = 0 - }; int i, len = 0; + struct msghdr msg; + + memset(&sll, 0, sizeof(sll)); + + msg.msg_name = &sll; + msg.msg_namelen = sizeof(sll); + msg.msg_iov = iov; + msg.msg_iovlen = iov_len; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; if (cfg_local_port != LOC...
2018 Sep 06
2
[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
...id handle_tx_copy(struct vhost_net *net, struct socket *sock) > break; > } > > - vq->heads[nvq->done_idx].id = cpu_to_vhost32(vq, head); > - vq->heads[nvq->done_idx].len = 0; > - > total_len += len; > - if (tx_can_batch(vq, total_len)) > - msg.msg_flags |= MSG_MORE; > - else > - msg.msg_flags &= ~MSG_MORE; > + > + /* For simplicity, TX batching is only enabled if > + * sndbuf is unlimited. What if sndbuf changes while this processing is going on? > + */ > + if (bulking) { > + err = vhost_net_build_xdp(nvq,...
2018 Sep 06
2
[PATCH net-next 11/11] vhost_net: batch submitting XDP buffers to underlayer sockets
...id handle_tx_copy(struct vhost_net *net, struct socket *sock) > break; > } > > - vq->heads[nvq->done_idx].id = cpu_to_vhost32(vq, head); > - vq->heads[nvq->done_idx].len = 0; > - > total_len += len; > - if (tx_can_batch(vq, total_len)) > - msg.msg_flags |= MSG_MORE; > - else > - msg.msg_flags &= ~MSG_MORE; > + > + /* For simplicity, TX batching is only enabled if > + * sndbuf is unlimited. What if sndbuf changes while this processing is going on? > + */ > + if (bulking) { > + err = vhost_net_build_xdp(nvq,...
2017 Jan 06
5
[PATCH V4 net-next 0/3] vhost_net tx batching
Hi: This series tries to implement tx batching support for vhost. This was done by using MSG_MORE as a hint for under layer socket. The backend (e.g tap) can then batch the packets temporarily in a list and submit it all once the number of bacthed exceeds a limitation. Tests shows obvious improvement on guest pktgen over over mlx4(noqueue) on host: Mpps -+%
2017 Jan 06
5
[PATCH V4 net-next 0/3] vhost_net tx batching
Hi: This series tries to implement tx batching support for vhost. This was done by using MSG_MORE as a hint for under layer socket. The backend (e.g tap) can then batch the packets temporarily in a list and submit it all once the number of bacthed exceeds a limitation. Tests shows obvious improvement on guest pktgen over over mlx4(noqueue) on host: Mpps -+%
2018 Sep 06
22
[PATCH net-next 00/11] Vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2016 Dec 30
5
[PATCH net-next V3 0/3] vhost_net tx batching
Hi: This series tries to implement tx batching support for vhost. This was done by using MSG_MORE as a hint for under layer socket. The backend (e.g tap) can then batch the packets temporarily in a list and submit it all once the number of bacthed exceeds a limitation. Tests shows obvious improvement on guest pktgen over over mlx4(noqueue) on host: Mpps -+%
2016 Dec 30
5
[PATCH net-next V3 0/3] vhost_net tx batching
Hi: This series tries to implement tx batching support for vhost. This was done by using MSG_MORE as a hint for under layer socket. The backend (e.g tap) can then batch the packets temporarily in a list and submit it all once the number of bacthed exceeds a limitation. Tests shows obvious improvement on guest pktgen over over mlx4(noqueue) on host: Mpps -+%
2016 Dec 30
0
[PATCH net-next V3 3/3] tun: rx batching
...m, + file->f_flags & O_NONBLOCK, false); tun_put(tun); return result; @@ -1570,7 +1607,8 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len) return -EBADFD; ret = tun_get_user(tun, tfile, m->msg_control, &m->msg_iter, - m->msg_flags & MSG_DONTWAIT); + m->msg_flags & MSG_DONTWAIT, + m->msg_flags & MSG_MORE); tun_put(tun); return ret; } -- 2.7.4