[PATCH rtems-libbsd 2/2] microblaze: Finish AXI Ethernet support

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jan 20 06:12:10 UTC 2022


On 20/01/2022 04:54, Alex White wrote:
> diff --git a/freebsd/sys/netinet/tcp_input.c b/freebsd/sys/netinet/tcp_input.c
> index fc111d9c..60f9123a 100644
> --- a/freebsd/sys/netinet/tcp_input.c
> +++ b/freebsd/sys/netinet/tcp_input.c
> @@ -721,6 +721,15 @@ tcp_input(struct mbuf **mp, int *offp, int proto)
>   	}
>   #endif /* INET */
>   
> +#ifdef __rtems__
> +#ifdef __MICROBLAZE__
> +	/* Ensure that the TCP header is properly aligned in memory. */
> +	struct tcphdr aligned_hdr;
> +	memcpy(&aligned_hdr, th, sizeof(struct tcphdr));
> +	th = &aligned_hdr;
> +#endif
> +#endif
> +
>   	/*
>   	 * Check that TCP offset makes sense,
>   	 * pull out TCP options and adjust length.		XXX

Changes like this should not be hidden in a driver-specific patch. The 
alignment changes are hacks. Why don't you fix the Ethernet frame 
alignment in the network interface driver?

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list