From: Alex Marginean <alexm.osslist@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6 v3] include: configs: ls1028a: set SYS_RX_ETH_BUFFER to 8
Date: Tue, 2 Jul 2019 20:46:22 +0300 [thread overview]
Message-ID: <68a776ee-3f77-4b9a-eaa8-d78e362b9cfe@gmail.com> (raw)
In-Reply-To: <CAEUhbmWSC0Cq6SLj+y_ha_D1+8bD59UJUEgO8MpXqjsZ+__17w@mail.gmail.com>
Hi Bin,
On 7/1/2019 11:08 AM, Bin Meng wrote:
> Hi Alex,
>
> On Thu, Jun 20, 2019 at 10:48 PM Alex Marginean
> <alexandru.marginean@nxp.com> wrote:
>>
>> LS1028A ethernet interfaces work with at least 8 BDs, set number of buffers
>> to match that.
>>
>> Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
>> ---
>> include/configs/ls1028a_common.h | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/include/configs/ls1028a_common.h b/include/configs/ls1028a_common.h
>> index 0db86396e9..f9d2602afd 100644
>> --- a/include/configs/ls1028a_common.h
>> +++ b/include/configs/ls1028a_common.h
>> @@ -197,4 +197,8 @@
>> #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
>> #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
>>
>> +/* Ethernet */
>> +/* smallest ENETC BD ring has 8 entries */
>> +#define CONFIG_SYS_RX_ETH_BUFFER 8
>> +
>
> We should avoid adding more ad-hoc CONFIG_XXX macros. We should either
> make this a Kconfig option, or move this macro to the driver header
> file (eg: fsl_enetc.h) and do not prefix it with CONFIG_.
> If we move to driver header, this patch can be simply dropped as I see
> there are already macro defined in patch [2/6].
This is used in net.h to define PKTBUFSRX which is further used in net.c
to define net_pkt_buf. I was actually planning to use net_pkt_buf
instead of allocation memory in the driver, that's why I used it.
I can use an enetc specific define, but then I either have to allocate
packet data in the driver or put more code in to only use up to 4
(default CONFIG_SYS_RX_ETH_BUFFER value) BDs in an 8 entry BDR.
Alex
>
>> #endif /* __L1028A_COMMON_H */
>> --
>
> Regards,
> Bin
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
next prev parent reply other threads:[~2019-07-02 17:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-20 14:48 [U-Boot] [PATCH v3 0/6] ls1028a: networking support Alex Marginean
2019-06-20 14:48 ` [U-Boot] [PATCH 1/6 v3] include: configs: ls1028a: set SYS_RX_ETH_BUFFER to 8 Alex Marginean
2019-07-01 8:08 ` Bin Meng
2019-07-02 17:46 ` Alex Marginean [this message]
2019-07-03 1:30 ` Bin Meng
2019-06-20 14:48 ` [U-Boot] [PATCH 2/6 v3] drivers: net: add NXP ENETC ethernet driver Alex Marginean
2019-07-01 8:08 ` Bin Meng
2019-06-20 14:48 ` [U-Boot] [PATCH 3/6 v3] drivers: net: add NXP ENETC MDIO driver Alex Marginean
2019-07-01 8:08 ` Bin Meng
2019-06-20 14:48 ` [U-Boot] [PATCH 4/6 v3] drivers: net: apply serdes configuration for ENETC Ethernet interfaces Alex Marginean
2019-07-01 8:08 ` Bin Meng
2019-06-20 14:48 ` [U-Boot] [PATCH 5/6 v3] arm: dts: ls1028a updates for network interfaces Alex Marginean
2019-07-01 8:08 ` Bin Meng
2019-06-20 14:48 ` [U-Boot] [PATCH 6/6 v3] configs: ls1028a: enable networking options in rds, qds defconfig Alex Marginean
2019-07-01 8:08 ` Bin Meng
2019-07-02 17:49 ` Alex Marginean
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=68a776ee-3f77-4b9a-eaa8-d78e362b9cfe@gmail.com \
--to=alexm.osslist@gmail.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