On Thu, Apr 25, 2019 at 05:27:13PM +0200, Marc Kleine-Budde wrote: > On 4/25/19 5:12 PM, Oleksij Rempel wrote: > > On Thu, Apr 25, 2019 at 02:54:16PM +0200, Kurt Van Dijck wrote: > >> On do, 25 apr 2019 14:31:06 +0200, Oleksij Rempel wrote: > >>> Hi all, > >>> > >>> please take a look at this patches. It is UAPI extension and it is good to > >>> know if it is sane way to track/recognize send packages. > >> > >> (1) This feedback reports success or failure for packets. > >> That is usefull at some point. > >> Is there a mechanism to track the real progress. This is something I had > >> in /proc somewhere, and which is usefull for larger transfers ... > > > > It can be done in the same way over error queue. The question is, what is the use case? > > 1. debugging? > > 2. provide progress bar for the GUI? > > 3. optimization? > > 4. coordination with some kind of watchdog? > > > > For example we can send notification for each transferred TP sized block of ETP > > transfer and make it configurable per setsocketopt. > > If this is of general interest, we could make a TODO item from this. > That could be implemented later. > > >> (2) The way I see your patch, it publishes something into an error queue. > >> does the err queue require emptying? what happens if you don't read the err queue? > > > > Yes, the sk_error_queue require dequeuing or purging. I will need to add > > setsockopt to enable/disable sk_error_queue. It will be disabled by default. > > How does this work on other protocols? for example here: net/ipv4/ip_sockglue.c at this point error queuing can be enabled or disabled: static int do_ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen) { ... case IP_RECVERR: inet->recverr = !!val; if (!val) skb_queue_purge(&sk->sk_error_queue); break; and here errors are added to the queue only if error queuing is enabled. void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 port, u32 info) { ... if (!inet->recverr) return; -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |