net/tcp: Rename TCP2 to TCP
TCP2 is no longer needed as it is the unique implementation since the legacy one has been removed. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
65c9d19d51
commit
32db35a721
|
@ -252,10 +252,10 @@ __net_socket struct net_context {
|
|||
net_pkt_get_pool_func_t data_pool;
|
||||
#endif /* CONFIG_NET_CONTEXT_NET_PKT_POOL */
|
||||
|
||||
#if defined(CONFIG_NET_TCP2)
|
||||
#if defined(CONFIG_NET_TCP)
|
||||
/** TCP connection information */
|
||||
void *tcp;
|
||||
#endif /* CONFIG_NET_TCP2 */
|
||||
#endif /* CONFIG_NET_TCP */
|
||||
|
||||
#if defined(CONFIG_NET_CONTEXT_SYNC_RECV)
|
||||
/**
|
||||
|
|
|
@ -128,7 +128,7 @@ struct net_pkt {
|
|||
struct net_linkaddr lladdr_src;
|
||||
struct net_linkaddr lladdr_dst;
|
||||
|
||||
#if defined(CONFIG_NET_TCP2)
|
||||
#if defined(CONFIG_NET_TCP)
|
||||
/** Allow placing the packet into sys_slist_t */
|
||||
sys_snode_t next;
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
|
||||
#define MY_PORT 4242
|
||||
#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS) || defined(CONFIG_NET_TCP2) || \
|
||||
#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS) || defined(CONFIG_NET_TCP) || \
|
||||
defined(CONFIG_COVERAGE)
|
||||
#define STACK_SIZE 4096
|
||||
#else
|
||||
|
|
|
@ -7,10 +7,10 @@ Overview
|
|||
********
|
||||
|
||||
This application is used together with the TTCN-3 based sanity check
|
||||
to validate the functionality of the experimental TCP (TCP2).
|
||||
to validate the functionality of the TCP.
|
||||
|
||||
Building, Running and executing TTCN-3 based Sanity Check for TCP2
|
||||
******************************************************************
|
||||
Building, Running and executing TTCN-3 based Sanity Check for TCP
|
||||
*****************************************************************
|
||||
|
||||
Compile and start the `net-test-tools`_:
|
||||
|
||||
|
@ -29,7 +29,7 @@ Build the TCP sample app:
|
|||
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG="overlay-slip.conf" ..
|
||||
make run
|
||||
|
||||
Compile and run the TCP2 sanity check `net-test-suites`_:
|
||||
Compile and run the TCP sanity check `net-test-suites`_:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
sample:
|
||||
description: A sample for running TTCN-3 based sanity check for TCP2
|
||||
description: A sample for running TTCN-3 based sanity check for TCP
|
||||
name: tcp
|
||||
|
|
|
@ -25,13 +25,13 @@ do { \
|
|||
|
||||
/*
|
||||
* This application is used together with the TTCN-3 based sanity check
|
||||
* to validate the functionality of the experimental TCP (TCP2).
|
||||
* to validate the functionality of the TCP.
|
||||
*
|
||||
* samples/net/sockets/tcp/README.rst
|
||||
*
|
||||
* Eventually UDP based test protocol might be terminated in the user space
|
||||
* (see udp() below), but at the moment it's just a dummy loop
|
||||
* to keep the sample running in order to execute TTCN-3 TCP2 sanity check.
|
||||
* to keep the sample running in order to execute TTCN-3 TCP sanity check.
|
||||
*/
|
||||
void main(void)
|
||||
{
|
||||
|
|
|
@ -15,9 +15,9 @@ if NET_BUF
|
|||
|
||||
config NET_BUF_USER_DATA_SIZE
|
||||
int "Size of user_data available in every network buffer"
|
||||
default 8 if ((BT || NET_TCP2) && 64BIT) || BT_ISO
|
||||
default 8 if ((BT || NET_TCP) && 64BIT) || BT_ISO
|
||||
default 4
|
||||
range 4 65535 if BT || NET_TCP2
|
||||
range 4 65535 if BT || NET_TCP
|
||||
range 0 65535
|
||||
help
|
||||
Amount of memory reserved in each network buffer for user data. In
|
||||
|
|
|
@ -34,7 +34,7 @@ zephyr_library_sources_ifdef(CONFIG_NET_IPV6_MLD ipv6_mld.c)
|
|||
zephyr_library_sources_ifdef(CONFIG_NET_IPV6_FRAGMENT ipv6_fragment.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_NET_ROUTE route.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_NET_STATISTICS net_stats.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_NET_TCP2 connection.c tcp2.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_NET_TCP connection.c tcp.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_NET_TEST_PROTOCOL tp.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_NET_TRICKLE trickle.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_NET_UDP connection.c udp.c)
|
||||
|
|
|
@ -423,7 +423,7 @@ config NET_TCP_RETRY_COUNT
|
|||
|
||||
config NET_TCP_MAX_SEND_WINDOW_SIZE
|
||||
int "Maximum sending window size to use"
|
||||
depends on NET_TCP2
|
||||
depends on NET_TCP
|
||||
default 0
|
||||
range 0 65535
|
||||
help
|
||||
|
@ -433,7 +433,7 @@ config NET_TCP_MAX_SEND_WINDOW_SIZE
|
|||
|
||||
config NET_TCP_RECV_QUEUE_TIMEOUT
|
||||
int "How long to queue received data (in ms)"
|
||||
depends on NET_TCP2
|
||||
depends on NET_TCP
|
||||
default 100
|
||||
range 0 10000
|
||||
help
|
||||
|
@ -467,11 +467,6 @@ config NET_TCP_ISN_RFC6528
|
|||
RFC 6528 chapter 3. https://tools.ietf.org/html/rfc6528
|
||||
If this is not set, then sys_rand32_get() is used for ISN value.
|
||||
|
||||
config NET_TCP2
|
||||
bool
|
||||
default y
|
||||
depends on NET_TCP
|
||||
|
||||
config NET_TEST_PROTOCOL
|
||||
bool "Enable JSON based test protocol (UDP)"
|
||||
help
|
||||
|
|
|
@ -37,8 +37,8 @@ LOG_MODULE_REGISTER(net_ctx, CONFIG_NET_CONTEXT_LOG_LEVEL);
|
|||
#include "tcp_internal.h"
|
||||
#include "net_stats.h"
|
||||
|
||||
#if IS_ENABLED(CONFIG_NET_TCP2)
|
||||
#include "tcp2.h"
|
||||
#if IS_ENABLED(CONFIG_NET_TCP)
|
||||
#include "tcp.h"
|
||||
#endif
|
||||
|
||||
#ifndef EPFNOSUPPORT
|
||||
|
|
|
@ -1454,14 +1454,14 @@ static void conn_handler_cb(struct net_conn *conn, void *user_data)
|
|||
#endif /* CONFIG_NET_CONN_LOG_LEVEL >= LOG_LEVEL_DBG */
|
||||
|
||||
#if CONFIG_NET_TCP_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
struct tcp2_detail_info {
|
||||
struct tcp_detail_info {
|
||||
int printed_send_queue_header;
|
||||
int printed_details;
|
||||
int count;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NET_TCP2) && \
|
||||
#if defined(CONFIG_NET_TCP) && \
|
||||
(defined(CONFIG_NET_OFFLOAD) || defined(CONFIG_NET_NATIVE))
|
||||
static void tcp_cb(struct tcp *conn, void *user_data)
|
||||
{
|
||||
|
@ -1485,7 +1485,7 @@ static void tcp_sent_list_cb(struct tcp *conn, void *user_data)
|
|||
{
|
||||
struct net_shell_user_data *data = user_data;
|
||||
const struct shell *shell = data->shell;
|
||||
struct tcp2_detail_info *details = data->user_data;
|
||||
struct tcp_detail_info *details = data->user_data;
|
||||
struct net_pkt *pkt;
|
||||
sys_snode_t *node;
|
||||
|
||||
|
@ -1554,7 +1554,7 @@ static void tcp_sent_list_cb(struct tcp *conn, void *user_data)
|
|||
details->printed_send_queue_header = true;
|
||||
}
|
||||
#endif /* CONFIG_NET_TCP_LOG_LEVEL >= LOG_LEVEL_DBG */
|
||||
#endif /* TCP2 */
|
||||
#endif /* TCP */
|
||||
|
||||
#if defined(CONFIG_NET_IPV6_FRAGMENT)
|
||||
static void ipv6_frag_cb(struct net_ipv6_reassembly *reass,
|
||||
|
@ -2040,18 +2040,18 @@ static int cmd_net_conn(const struct shell *shell, size_t argc, char *argv[])
|
|||
} else {
|
||||
#if CONFIG_NET_TCP_LOG_LEVEL >= LOG_LEVEL_DBG
|
||||
/* Print information about pending packets */
|
||||
struct tcp2_detail_info details;
|
||||
struct tcp_detail_info details;
|
||||
|
||||
count = 0;
|
||||
|
||||
if (IS_ENABLED(CONFIG_NET_TCP2)) {
|
||||
if (IS_ENABLED(CONFIG_NET_TCP)) {
|
||||
memset(&details, 0, sizeof(details));
|
||||
user_data.user_data = &details;
|
||||
}
|
||||
|
||||
net_tcp_foreach(tcp_sent_list_cb, &user_data);
|
||||
|
||||
if (IS_ENABLED(CONFIG_NET_TCP2)) {
|
||||
if (IS_ENABLED(CONFIG_NET_TCP)) {
|
||||
if (details.count == 0) {
|
||||
PR("No active connections.\n");
|
||||
}
|
||||
|
|
|
@ -2813,7 +2813,7 @@ const char *net_tcp_state_str(enum tcp_state state)
|
|||
void net_tcp_init(void)
|
||||
{
|
||||
#if defined(CONFIG_NET_TEST_PROTOCOL)
|
||||
/* Register inputs for TTCN-3 based TCP2 sanity check */
|
||||
/* Register inputs for TTCN-3 based TCP sanity check */
|
||||
test_cb_register(AF_INET, IPPROTO_TCP, 4242, 4242, tcp_input);
|
||||
test_cb_register(AF_INET6, IPPROTO_TCP, 4242, 4242, tcp_input);
|
||||
test_cb_register(AF_INET, IPPROTO_UDP, 4242, 4242, tp_input);
|
|
@ -21,11 +21,11 @@
|
|||
* into the ip stack and the socket layer less intrusive.
|
||||
*
|
||||
* Semantically cleaner use is possible (and might be exposed),
|
||||
* look into the unit test tests/net/tcp2 for insights.
|
||||
* look into the unit test tests/net/tcp for insights.
|
||||
*/
|
||||
|
||||
#ifndef TCP2_H
|
||||
#define TCP2_H
|
||||
#ifndef TCP_H
|
||||
#define TCP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -142,4 +142,4 @@ void tcp_input(struct net_pkt *pkt);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* TCP2_H */
|
||||
#endif /* TCP_H */
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
#include "tcp2_priv.h"
|
||||
#include "tcp_private.h"
|
||||
|
||||
/**
|
||||
* @brief Calculates and returns the MSS for a given TCP context
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* main.c - Application main entry point
|
||||
*
|
||||
* This is a self-contained test for exercising the TCP2 protocol stack. Both
|
||||
* This is a self-contained test for exercising the TCP protocol stack. Both
|
||||
* the server and client side run on ths same device using a DUMMY interface
|
||||
* as a loopback of the IP packets.
|
||||
*
|
||||
|
@ -29,8 +29,8 @@ LOG_MODULE_REGISTER(net_test, CONFIG_NET_TCP_LOG_LEVEL);
|
|||
|
||||
#include "ipv4.h"
|
||||
#include "ipv6.h"
|
||||
#include "tcp2.h"
|
||||
#include "tcp2_priv.h"
|
||||
#include "tcp.h"
|
||||
#include "tcp_private.h"
|
||||
#include "net_stats.h"
|
||||
|
||||
#include <ztest.h>
|
||||
|
@ -1475,7 +1475,7 @@ static void test_server_timeout_out_of_order_data(void)
|
|||
}
|
||||
|
||||
/* Because the pending seq values are not sequential,
|
||||
* the recv queue in tcp2 should timeout.
|
||||
* the recv queue in tcp should timeout.
|
||||
*/
|
||||
ret = k_sem_take(&test_sem,
|
||||
K_MSEC(CONFIG_NET_TCP_RECV_QUEUE_TIMEOUT + 10));
|
|
@ -1,10 +1,10 @@
|
|||
common:
|
||||
depends_on: netif
|
||||
tags: net tcp2
|
||||
tags: net tcp
|
||||
tests:
|
||||
net.tcp2.simple:
|
||||
net.tcp.simple:
|
||||
extra_configs:
|
||||
- CONFIG_NET_TCP_RECV_QUEUE_TIMEOUT=1000
|
||||
net.tcp2.no_recv_queue:
|
||||
net.tcp.no_recv_queue:
|
||||
extra_configs:
|
||||
- CONFIG_NET_TCP_RECV_QUEUE_TIMEOUT=0
|
Loading…
Reference in a new issue