summaryrefslogtreecommitdiff
path: root/net/lwip/net-lwip.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-04-07 16:40:02 -0600
committerTom Rini <trini@konsulko.com>2025-04-08 11:43:23 -0600
commitff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch)
treedcfe4bc52848a5637c975a3352b57885e5b8a06d /net/lwip/net-lwip.c
parent34820924edbc4ec7803eb89d9852f4b870fa760a (diff)
parentf892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff)
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86: emulation: Disable bloblist for now") as that was intended only for the release due to time.
Diffstat (limited to 'net/lwip/net-lwip.c')
-rw-r--r--net/lwip/net-lwip.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
index 4d2aa6099dd..6b7b696dbf0 100644
--- a/net/lwip/net-lwip.c
+++ b/net/lwip/net-lwip.c
@@ -5,6 +5,7 @@
#include <command.h>
#include <dm/device.h>
#include <dm/uclass.h>
+#include <hexdump.h>
#include <lwip/ip4_addr.h>
#include <lwip/err.h>
#include <lwip/netif.h>
@@ -30,12 +31,18 @@ char *pxelinux_configfile;
struct in_addr net_ip;
char net_boot_file_name[1024];
-static err_t linkoutput(struct netif *netif, struct pbuf *p)
+static err_t net_lwip_tx(struct netif *netif, struct pbuf *p)
{
struct udevice *udev = netif->state;
void *pp = NULL;
int err;
+ if (CONFIG_IS_ENABLED(LWIP_DEBUG_RXTX)) {
+ printf("net_lwip_tx: %u bytes, udev %s\n", p->len, udev->name);
+ print_hex_dump("net_lwip_tx: ", 0, 16, 1, p->payload, p->len,
+ true);
+ }
+
if ((unsigned long)p->payload % PKTALIGN) {
/*
* Some net drivers have strict alignment requirements and may
@@ -60,7 +67,7 @@ static err_t linkoutput(struct netif *netif, struct pbuf *p)
static err_t net_lwip_if_init(struct netif *netif)
{
netif->output = etharp_output;
- netif->linkoutput = linkoutput;
+ netif->linkoutput = net_lwip_tx;
netif->mtu = 1500;
netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP;
@@ -265,6 +272,13 @@ int net_lwip_rx(struct udevice *udev, struct netif *netif)
flags = 0;
if (len > 0) {
+ if (CONFIG_IS_ENABLED(LWIP_DEBUG_RXTX)) {
+ printf("net_lwip_tx: %u bytes, udev %s \n", len,
+ udev->name);
+ print_hex_dump("net_lwip_rx: ", 0, 16, 1,
+ packet, len, true);
+ }
+
pbuf = alloc_pbuf_and_copy(packet, len);
if (pbuf)
netif->input(pbuf, netif);