Skip to content

Commit 1fb7fff

Browse files
committed
[nrf fromtree] net: offload: Do not need to enable TC threads for NET_OFFLOAD
Net offloading doesn't need net TC threads to be enabled as they're used by the native stack. This fixes build if CONFIG_NET_OFFLOAD is enabled but native stack is disabled. Signed-off-by: Robert Lubos <[email protected]> (cherry picked from commit bdbf7cc)
1 parent 135cf0e commit 1fb7fff

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

subsys/net/ip/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ zephyr_library_sources(
1919
)
2020

2121
if(CONFIG_NET_OFFLOAD)
22-
zephyr_library_sources(net_context.c net_pkt.c net_tc.c)
22+
zephyr_library_sources(net_context.c net_pkt.c)
2323
endif()
2424

2525
zephyr_library_sources_ifdef(CONFIG_NET_MGMT_EVENT net_mgmt.c)

subsys/net/ip/net_private.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,12 @@ extern bool net_context_is_v6only_set(struct net_context *context);
8686
extern bool net_context_is_recv_pktinfo_set(struct net_context *context);
8787
extern bool net_context_is_timestamping_set(struct net_context *context);
8888
extern void net_pkt_init(void);
89-
extern void net_tc_tx_init(void);
90-
extern void net_tc_rx_init(void);
9189
int net_context_get_local_addr(struct net_context *context,
9290
struct sockaddr *addr,
9391
socklen_t *addrlen);
9492
#else
9593
static inline void net_context_init(void) { }
9694
static inline void net_pkt_init(void) { }
97-
static inline void net_tc_tx_init(void) { }
98-
static inline void net_tc_rx_init(void) { }
9995
static inline const char *net_context_state(struct net_context *context)
10096
{
10197
ARG_UNUSED(context);
@@ -149,6 +145,8 @@ static inline void mdns_init_responder(void) { }
149145
#if defined(CONFIG_NET_NATIVE)
150146
enum net_verdict net_ipv4_input(struct net_pkt *pkt, bool is_loopback);
151147
enum net_verdict net_ipv6_input(struct net_pkt *pkt, bool is_loopback);
148+
extern void net_tc_tx_init(void);
149+
extern void net_tc_rx_init(void);
152150
#else
153151
static inline enum net_verdict net_ipv4_input(struct net_pkt *pkt,
154152
bool is_loopback)
@@ -167,6 +165,9 @@ static inline enum net_verdict net_ipv6_input(struct net_pkt *pkt,
167165

168166
return NET_CONTINUE;
169167
}
168+
169+
static inline void net_tc_tx_init(void) { }
170+
static inline void net_tc_rx_init(void) { }
170171
#endif
171172
extern bool net_tc_submit_to_tx_queue(uint8_t tc, struct net_pkt *pkt);
172173
extern void net_tc_submit_to_rx_queue(uint8_t tc, struct net_pkt *pkt);

0 commit comments

Comments
 (0)