mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <dg@emlix.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>,
	Edmund Henniges <eh@emlix.com>
Subject: Re: [PATCH 15/19] fastboot net: implement fastboot over UDP
Date: Thu, 18 Jun 2020 20:33:03 +0200	[thread overview]
Message-ID: <510812c2-03a0-59a0-8d09-5c3c0f2f2593@emlix.com> (raw)
In-Reply-To: <20200618115940.GH11869@pengutronix.de>

Hello Sascha,

Am 18.06.20 um 13:59 schrieb Sascha Hauer:
> On Wed, Jun 17, 2020 at 09:32:45PM +0200, Daniel Glöckner wrote:
>>> +static void fastboot_start_download_net(struct fastboot *fb)
>>> +{
>>> +	struct fastboot_net *fbn = container_of(fb, struct fastboot_net,
>>> +						fastboot);
>>> +
>>> +	fastboot_start_download_generic(fb);
>>> +	fbn->active_download = true;
>>> +}
>>
>> You didn't base v4 on v3, did you?
> 
> No, you sent v3 while I had different changes in my version already.
> 
>> If FASTBOOT_INIT is received before active_download is set to true, nobody
>> will close fb->download_fd.
> 
> Ok, I'll add a fastboot_abort() function like you did in v3.

What I was referring to are the three additional lines in v3 that call
fastboot_download_finished here instead of setting active_download to true
when reinit is already true.

>>> +static void fastboot_send_keep_alive(struct poller_struct *poller)
>>> +{
>>> +	struct fastboot_net *fbn = container_of(poller, struct fastboot_net,
>>> +					       keep_alive_poller);
>>> +
>>> +	if (!fbn->send_keep_alive)
>>> +		return;
>>> +
>>> +	if (!is_timeout_non_interruptible(fbn->host_waits_since,
>>> +					 30ULL * NSEC_PER_SEC))
>>> +		return;
>>> +
>>> +	if (!fbn->may_send)
>>> +		return;
>>> +
>>> +	fastboot_tx_print(&fbn->fastboot, FASTBOOT_MSG_INFO, "still busy");
>>> +
>>> +	fbn->host_waits_since = get_time_ns();
>>
>> Why do we need this line?
>> host_waits_since is assigned get_time_ns() when may_send is set to true.
> 
> It is needed to reinitialize the timeout when we sent the message once.
> Without this we would send the "still busy" message every few ms after
> we've sent it for the first time.

No, because sending a message sets may_send to false and it stays false
until we update host_waits_since in fastboot_handle_type_fastboot.

Best regards,

  Daniel

-- 
Dipl.-Math. Daniel Glöckner, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11,
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke
Ust-IdNr.: DE 205 198 055

emlix - your embedded linux partner

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-06-18 18:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17  8:11 [PATCH v4 00/19] Slices and " Sascha Hauer
2020-06-17  8:11 ` [PATCH 01/19] Introduce slices Sascha Hauer
2020-06-17  8:11 ` [PATCH 02/19] Add workqueues Sascha Hauer
2020-06-17 18:30   ` Daniel Glöckner
2020-06-17 19:56     ` Sascha Hauer
2020-06-17  8:11 ` [PATCH 03/19] ratp: Switch to workqueues Sascha Hauer
2020-06-17  8:11 ` [PATCH 04/19] net: Add a slice to struct eth_device Sascha Hauer
2020-06-17  8:11 ` [PATCH 05/19] net: mdiobus: Add slice Sascha Hauer
2020-06-17  8:11 ` [PATCH 06/19] usb: Add a slice to usb host controllers Sascha Hauer
2020-06-17  8:11 ` [PATCH 07/19] usbnet: Add slice Sascha Hauer
2020-06-17  8:11 ` [PATCH 08/19] net: Call net_poll() in a poller Sascha Hauer
2020-06-17  8:11 ` [PATCH 09/19] net: reply to ping requests Sascha Hauer
2020-06-17  8:11 ` [PATCH 10/19] usbnet: Be more friendly in the receive path Sascha Hauer
2020-06-17  8:11 ` [PATCH 11/19] defconfigs: update renamed fastboot options Sascha Hauer
2020-06-17  8:11 ` [PATCH 12/19] globalvar: Add helper for deprecated variable names Sascha Hauer
2020-06-17  8:11 ` [PATCH 13/19] fastboot: rename usbgadget.fastboot_* variables to fastboot.* Sascha Hauer
2020-06-17  8:11 ` [PATCH 14/19] fastboot: remove double print Sascha Hauer
2020-06-17 18:24   ` Daniel Glöckner
2020-06-17 19:54     ` Sascha Hauer
2020-06-18 19:08       ` Daniel Glöckner
2020-06-19  7:01         ` Sascha Hauer
2020-06-17  8:11 ` [PATCH 15/19] fastboot net: implement fastboot over UDP Sascha Hauer
2020-06-17 19:32   ` Daniel Glöckner
2020-06-18 11:59     ` Sascha Hauer
2020-06-18 18:33       ` Daniel Glöckner [this message]
2020-06-19  7:38         ` Sascha Hauer
2020-06-17  8:11 ` [PATCH 16/19] usb: fastboot: execute commands in command context Sascha Hauer
2020-06-17 19:40   ` Daniel Glöckner
2020-06-18  7:26     ` Sascha Hauer
2020-06-17  8:11 ` [PATCH 17/19] Add WARN_ONCE() macro Sascha Hauer
2020-06-17  8:11 ` [PATCH 18/19] fs: Warn when filesystem operations are called from a poller Sascha Hauer
2020-06-17  8:11 ` [PATCH 19/19] Documentation: Add document for parallel execution in barebox Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510812c2-03a0-59a0-8d09-5c3c0f2f2593@emlix.com \
    --to=dg@emlix.com \
    --cc=barebox@lists.infradead.org \
    --cc=eh@emlix.com \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox