From: Duncan Hare <dh@synoia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] TCP and wget implementation. Ptch V5 1 of 3
Date: Mon, 29 Jan 2018 09:30:02 -0800 [thread overview]
Message-ID: <20180129093002.2eee3a3a@raspberrypi> (raw)
In-Reply-To: <47879340.2828440.1517245407426@mail.yahoo.com>
> The patch is trying to put everything into net.c. This is a mess and
> not where we should head to.
Not at all. I tried that and it was correctly rejected. The TCP
functions are in tcp.c, and the wget functions in wget.c
There is no socket. There is no socket analogue. There is no
widespread correct re-ordering of packets, because in a kernel download
the relative address of each block is derived for the tcp sequence
number, and the kernel image in memory itself is in the correct order,
as defined by tcp sequence number.
>
> We should have have one driver per protocol.
>
> The IP driver should enumerate all drivers protocols like TCP and UDP
> that want to listen to it using a Linux list. This way we get rid of
> all those needless #ifdef CONFIGs. Using the list the IP driver will
> hand out packets to the respective higher protocol driver.
The choice was to make minimal changes to the
current net.c, in consultation with other in the u-boot realm.
>
> A separate driver shall implement the TCP protocol and provide methods
> to open a socket, to read and write to the socket and to close the
> socket.
>
"shall"? Please do not use the imperative, unless you are approaching
me with money.
> Next we want a driver for the HTTP protocol. It should have function
> to open a connection, to send a request, to receive a response, and to
> close the connection. If this driver is requested to open a connection
> it shall call the TCP driver to open a socket. It will then receive
> all packets from the relevant IP address on the relevant port until it
> closes the socket.
>
The http protocol is very simple, and consists of a TCP connection and a
header, both for request and response.
> The wget command should be in a separate file. It will call the
> appropriate functions of the HTTP driver to open a connection, post
> the request, receive the response, and finally close the connection.
It is and it does. It also include the http headers, becâ€ause of their
simplicity.
>
> The work should start with refactoring the existing coding into
> separate drivers for the existing protocols. When that is completed
> you can start adding TCP relevant code.
Will you pay for that work?
> Please, do not send single patches but complete patch series.
I do the best I can with my limited knowledge of the tools. I have sent
a series. My understand of both git and patman is limited.
>
> Best regards
>
> Heinrich
next prev parent reply other threads:[~2018-01-29 17:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 1:34 [U-Boot] [PATCH] TCP and wget implementation. Ptch V5 1 of 3 Duncan Hare
2018-01-29 2:21 ` Heinrich Schuchardt
[not found] ` <1876838587.2851978.1517245243033@mail.yahoo.com>
[not found] ` <47879340.2828440.1517245407426@mail.yahoo.com>
2018-01-29 17:30 ` Duncan Hare [this message]
2018-01-29 18:06 ` Heinrich Schuchardt
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=20180129093002.2eee3a3a@raspberrypi \
--to=dh@synoia.com \
--cc=u-boot@lists.denx.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