net: Remove special alignment

The Z_STRUCT_SECTION_ITERABLE() provides an alignment so remove
the 32 byte alignment for net_if and ppp_protocol_handler structs.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2020-06-23 00:37:45 +03:00 committed by Andrew Boie
commit 4746a13324
2 changed files with 2 additions and 24 deletions

View file

@ -160,22 +160,6 @@ struct net_if_router {
uint8_t _unused : 5;
};
/*
* Special alignment is needed for net_if which is stored in
* a net_if linker section if there are more than one network
* interface in the system. If there is only one network interface,
* then this alignment is not needed, unfortunately this cannot be
* known beforehand.
*
* The net_if struct needs to be aligned to 32 byte boundary,
* otherwise the __net_if_end will point to wrong location and net_if
* initialization done in net_if_init() will not find proper values
* for the second interface.
*
* So this alignment is a workaround and should eventually be removed.
*/
#define __net_if_align __aligned(32)
enum net_if_flag {
/** Interface is up/ready to receive and transmit */
NET_IF_UP,
@ -480,7 +464,7 @@ struct net_if {
*/
int tx_pending;
#endif
} __net_if_align;
};
/**
* @brief Set a value in network interface flags

View file

@ -44,12 +44,6 @@ struct ppp_packet {
/** Max number of IPV6CP options */
#define MAX_IPV6CP_OPTIONS 1
/*
* Special alignment is needed for ppp_protocol_handler. This is the
* same issue as in net_if. See net_if.h __net_if_align for explanation.
*/
#define __ppp_proto_align __aligned(32)
/** Protocol handler information. */
struct ppp_protocol_handler {
/** Protocol init function */
@ -74,7 +68,7 @@ struct ppp_protocol_handler {
/** PPP protocol number */
uint16_t protocol;
} __ppp_proto_align;
};
#define PPP_PROTO_GET_NAME(proto_name) \
(ppp_protocol_handler_##proto_name)