|
From: | Dirk Ziegelmeier |
Subject: | Re: [lwip-devel] Question about "Fix regression in etharp.c: Allocate correct pbuf layer" |
Date: | Wed, 24 Aug 2016 09:22:33 +0200 |
Hi Dirk,I found below commit:commit 4456c7d230d91ac60401db02e15178fe0636007d Author: Dirk Ziegelmeier <address@hidden>Date: Tue Aug 23 12:32:57 2016 +0200Fix regression in etharp.c: Allocate correct pbuf layerdiff --git a/src/core/ipv4/etharp.c b/src/core/ipv4/etharp.cindex 5288b74..42485d1 100644--- a/src/core/ipv4/etharp.c+++ b/src/core/ipv4/etharp.c@@ -1097,7 +1097,7 @@ etharp_query(struct netif *netif, const ip4_addr_t *ipaddr, struct pbuf *q)}if (copy_needed) {/* copy the whole packet into new pbufs */- p = pbuf_alloc(PBUF_RAW_TX, p->tot_len, PBUF_RAM);+ p = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM);if (p != NULL) {if (pbuf_copy(p, q) != ERR_OK) {pbuf_free(p);Since the commit log says it's a regression, may I know which commit causethe problem and what is the user visible impact of the issue.Incommit 979bee386c60fbd5f74a5e7bb3e2e25af35ef46e Author: Dirk Ziegelmeier <address@hidden>Date: Tue Aug 23 16:58:17 2016 +0200Work on bug #48868: Cleanup etharp.c not to use struct eth_hdr: Cleanup etharp_raw() to use ethernet_output()There is below change, it's not clear to me if this is a fix or a clean up./* allocate a pbuf for the outgoing ARP request packet */- p = pbuf_alloc(PBUF_RAW_TX, SIZEOF_ETHARP_PACKET_TX, PBUF_RAM);+ p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_PACKET_TX, PBUF_RAM);I asked above questions because I have project still using lwip-1.4.1 which has below codes (I'm not sure if I need to update my code in lwip-1.4.1 as well.):In etharp_query():/* copy the whole packet into new pbufs */p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM);and ...in etharp_raw():/* allocate a pbuf for the outgoing ARP request packet */p = pbuf_alloc(PBUF_RAW, SIZEOF_ETHARP_PACKET, PBUF_RAM);Regards,Axel
[Prev in Thread] | Current Thread | [Next in Thread] |