From 731e2c33448e6eaf10b72cf6d535134ad5bff25e Mon Sep 17 00:00:00 2001 From: Yogesh Mantri Date: Tue, 9 Apr 2024 15:23:09 +0800 Subject: [PATCH 1/7] Feat/ignore new non fatal error --- iperf/iperf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iperf/iperf.c b/iperf/iperf.c index a8d079f..3ea02d8 100644 --- a/iperf/iperf.c +++ b/iperf/iperf.c @@ -216,8 +216,8 @@ IRAM_ATTR static void socket_send(int send_socket, struct sockaddr_storage dest_ if (actual_send != want_send) { if (type == IPERF_TRANS_TYPE_UDP) { err = iperf_get_socket_error_code(send_socket); - // ENOMEM is expected under heavy load => do not print it - if (err != ENOMEM) { + // ENOMEM & ENOBUFS is expected under heavy load => do not print it + if ((err != ENOMEM) && (err != ENOBUFS)) { iperf_show_socket_error_reason(error_log, send_socket); } } else if (type == IPERF_TRANS_TYPE_TCP) { From 9a6e0dcb9f2b04c1c17d7a1147e8e835d60873c8 Mon Sep 17 00:00:00 2001 From: Chen Yu Dong Date: Wed, 17 Apr 2024 20:12:13 +0800 Subject: [PATCH 2/7] ci: update idf_build_apps build rules --- .gitignore | 1 + .gitlab-ci.yml | 16 ++++++++++++-- .idf_build_apps.toml | 22 +++++++++++++++++++ apps/.build-rules.yml | 5 ++++- apps/iperf/sdkconfig.ci.default | 0 apps/iperf/sdkconfig.ci.ipv4_ipv6 | 3 +++ apps/iperf/sdkconfig.ci.ipv4_only | 1 + apps/iperf/sdkconfig.ci.ipv6_only | 3 +++ ...{skdconfig.defaults => sdkconfig.defaults} | 0 9 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 .idf_build_apps.toml delete mode 100644 apps/iperf/sdkconfig.ci.default create mode 100644 apps/iperf/sdkconfig.ci.ipv4_ipv6 create mode 100644 apps/iperf/sdkconfig.ci.ipv6_only rename apps/iperf/{skdconfig.defaults => sdkconfig.defaults} (100%) diff --git a/.gitignore b/.gitignore index 21b41e5..ef4abd9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ dist/ build/ build*/ sdkconfig +sdkconfig.old dependencies.lock managed_components/ .mypy_cache/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6568cf..aa54b76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,9 +46,15 @@ build_iperf: - ESP_IMG: espressif/idf:release-v5.1 - ESP_IMG: espressif/idf:release-v5.2 - ESP_IMG: espressif/idf:latest + artifacts: + paths: + - "**/build*/build_log.txt" + - "**/build*/config/sdkconfig.json" + when: always + expire_in: 5 days script: - pip install idf-build-apps - - idf-build-apps build -p apps/iperf --target=all --manifest-file=apps/.build-rules.yml --build-dir build_@t_@w --config 'sdkconfig.ci.*=' + - idf-build-apps build after_script: - ls apps/iperf tags: @@ -63,9 +69,15 @@ build_iperf_v43: - when: on_success variables: LC_ALL: C.UTF-8 + artifacts: + paths: + - "**/build*/build_log.txt" + - "**/build*/config/sdkconfig.json" + when: always + expire_in: 5 days script: - pip install idf-build-apps\<2 packaging\<22 idf-component-manager==1.4 - - idf-build-apps build -p apps/iperf --target all --build-dir build_@t_@w --config 'sdkconfig.ci.*=' + - idf-build-apps build after_script: - ls apps/iperf tags: diff --git a/.idf_build_apps.toml b/.idf_build_apps.toml new file mode 100644 index 0000000..ff926de --- /dev/null +++ b/.idf_build_apps.toml @@ -0,0 +1,22 @@ +paths = [ + "apps", +] +recursive = true +target = "all" + +manifest_file = [ + "apps/.build-rules.yml", +] +check_manifest_rules = true + +config = [ + "sdkconfig.ci=default", + "sdkconfig.ci.*=", + "=default", +] + +build_dir = "build_@t_@w" +build_log = "build_log.txt" +verbose = 1 + +check_warnings = true diff --git a/apps/.build-rules.yml b/apps/.build-rules.yml index cb50205..dda612e 100644 --- a/apps/.build-rules.yml +++ b/apps/.build-rules.yml @@ -1,4 +1,7 @@ apps/iperf: disable: - if: SOC_WIFI_SUPPORTED != 1 - - if: IDF_TARGET != "esp32" and CONFIG_NAME != "default" + reason: This example app is using wifi connections + # build specific configuration for only one target + - if: IDF_TARGET != "esp32" and CONFIG_NAME == "ipv4_only" + - if: IDF_TARGET != "esp32c3" and CONFIG_NAME == "ipv6_only" diff --git a/apps/iperf/sdkconfig.ci.default b/apps/iperf/sdkconfig.ci.default deleted file mode 100644 index e69de29..0000000 diff --git a/apps/iperf/sdkconfig.ci.ipv4_ipv6 b/apps/iperf/sdkconfig.ci.ipv4_ipv6 new file mode 100644 index 0000000..c92c7c8 --- /dev/null +++ b/apps/iperf/sdkconfig.ci.ipv4_ipv6 @@ -0,0 +1,3 @@ +CONFIG_LWIP_IPV4=y +CONFIG_LWIP_IPV6=y +CONFIG_LWIP_IPV6_AUTOCONFIG=y diff --git a/apps/iperf/sdkconfig.ci.ipv4_only b/apps/iperf/sdkconfig.ci.ipv4_only index 4628764..5aecaf1 100644 --- a/apps/iperf/sdkconfig.ci.ipv4_only +++ b/apps/iperf/sdkconfig.ci.ipv4_only @@ -1 +1,2 @@ +CONFIG_LWIP_IPV4=y CONFIG_LWIP_IPV6=n diff --git a/apps/iperf/sdkconfig.ci.ipv6_only b/apps/iperf/sdkconfig.ci.ipv6_only new file mode 100644 index 0000000..08256e4 --- /dev/null +++ b/apps/iperf/sdkconfig.ci.ipv6_only @@ -0,0 +1,3 @@ +CONFIG_LWIP_IPV4=n +CONFIG_LWIP_IPV6=y +CONFIG_LWIP_IPV6_AUTOCONFIG=y diff --git a/apps/iperf/skdconfig.defaults b/apps/iperf/sdkconfig.defaults similarity index 100% rename from apps/iperf/skdconfig.defaults rename to apps/iperf/sdkconfig.defaults From caea9730df12a1031463d3013f72b021a3233b91 Mon Sep 17 00:00:00 2001 From: Chen Yu Dong Date: Wed, 17 Apr 2024 21:03:33 +0800 Subject: [PATCH 3/7] fix: fix build with ipv6 only --- apps/.build-rules.yml | 5 ++ apps/iperf/main/iperf_main.c | 7 +++ iperf-cmd/README.md | 1 + iperf-cmd/iperf_cmd.c | 54 ++++++++++++------ iperf/api.md | 14 +++++ iperf/include/iperf.h | 17 ++++++ iperf/iperf.c | 108 +++++++++++++++++++++++------------ 7 files changed, 154 insertions(+), 52 deletions(-) diff --git a/apps/.build-rules.yml b/apps/.build-rules.yml index dda612e..a7b8fd6 100644 --- a/apps/.build-rules.yml +++ b/apps/.build-rules.yml @@ -2,6 +2,11 @@ apps/iperf: disable: - if: SOC_WIFI_SUPPORTED != 1 reason: This example app is using wifi connections + # ipv6-only + - if: CONFIG_NAME == "ipv6_only" and IDF_VERSION_MAJOR < 5 + reason: IDF do not support ipv6-only + - if: CONFIG_NAME == "ipv6_only" and (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR < 1) + reason: IDF do not support ipv6-only # build specific configuration for only one target - if: IDF_TARGET != "esp32" and CONFIG_NAME == "ipv4_only" - if: IDF_TARGET != "esp32c3" and CONFIG_NAME == "ipv6_only" diff --git a/apps/iperf/main/iperf_main.c b/apps/iperf/main/iperf_main.c index 2bb657c..32c12de 100644 --- a/apps/iperf/main/iperf_main.c +++ b/apps/iperf/main/iperf_main.c @@ -5,6 +5,13 @@ */ #include #include +#include + +/* Build check: LWIP_IPV4/LWIP_IPV6 should be defined after include sys/socket.h */ +#if !(defined LWIP_IPV4) || !(defined LWIP_IPV6) +#error "Both LWIP_IPV4 and LWIP_IPV6 should be defined!" +#endif + #include "esp_wifi.h" #include "esp_log.h" #include "esp_err.h" diff --git a/iperf-cmd/README.md b/iperf-cmd/README.md index dc3045a..4f3b03e 100644 --- a/iperf-cmd/README.md +++ b/iperf-cmd/README.md @@ -15,6 +15,7 @@ This repository contains `iperf` command based esp-idf console. -c, --client= run in client mode, connecting to -s, --server run in server mode -u, --udp use UDP rather than TCP + -V, --ipv6_domain Set the domain to IPv6 (send packets over IPv6) -p, --port= server port to listen on/connect to -l, --len= Set read/write buffer size -i, --interval= seconds between periodic bandwidth reports diff --git a/iperf-cmd/iperf_cmd.c b/iperf-cmd/iperf_cmd.c index 3b67613..6deee63 100644 --- a/iperf-cmd/iperf_cmd.c +++ b/iperf-cmd/iperf_cmd.c @@ -6,13 +6,15 @@ #include #include #include +#include // #include "esp_idf_version.h" #include "esp_log.h" #include "esp_console.h" #include "argtable3/argtable3.h" +#include "esp_netif.h" + #include "iperf.h" -#include "esp_netif.h" #ifndef APP_TAG #define APP_TAG "IPERF" @@ -22,7 +24,9 @@ typedef struct { struct arg_str *ip; struct arg_lit *server; struct arg_lit *udp; - // struct arg_lit *version6; +#if IPERF_IPV6_ENABLED + struct arg_lit *ipv6_domain; +#endif struct arg_int *port; struct arg_int *length; struct arg_int *interval; @@ -55,8 +59,13 @@ static int cmd_do_iperf(int argc, char **argv) } memset(&cfg, 0, sizeof(cfg)); - // now iperf-cmd only support IPV4 address + cfg.type = IPERF_IP_TYPE_IPV4; +#if IPERF_IPV6_ENABLED + if (iperf_args.ipv6_domain->count > 0) { + cfg.type = IPERF_IP_TYPE_IPV6; + } +#endif if (((iperf_args.ip->count == 0) && (iperf_args.server->count == 0)) || ((iperf_args.ip->count != 0) && (iperf_args.server->count != 0))) { @@ -67,12 +76,20 @@ static int cmd_do_iperf(int argc, char **argv) if (iperf_args.ip->count == 0) { cfg.flag |= IPERF_FLAG_SERVER; } else { - cfg.destination_ip4 = esp_ip4addr_aton(iperf_args.ip->sval[0]); cfg.flag |= IPERF_FLAG_CLIENT; +#if IPERF_IPV6_ENABLED + if (cfg.type == IPERF_IP_TYPE_IPV6) { + /* TODO: Refactor iperf config structure in v1.0 */ + cfg.destination_ip6 = (char*)(iperf_args.ip->sval[0]); + } +#endif +#if IPERF_IPV4_ENABLED + if (cfg.type == IPERF_IP_TYPE_IPV4) { + cfg.destination_ip4 = esp_ip4addr_aton(iperf_args.ip->sval[0]); + } +#endif } - // NOTE: Do not bind local ip now - if (iperf_args.udp->count == 0) { cfg.flag |= IPERF_FLAG_TCP; } else { @@ -137,15 +154,15 @@ static int cmd_do_iperf(int argc, char **argv) } } - ESP_LOGI(APP_TAG, "mode=%s-%s sip=%" PRId32 ".%" PRId32 ".%" PRId32 ".%" PRId32 ":%d,\ - dip=%" PRId32 ".%" PRId32 ".%" PRId32 ".%" PRId32 ":%d,\ - interval=%" PRId32 ", time=%" PRId32 "", + ESP_LOGI(APP_TAG, "mode=%s-%s sip=%s:%" PRId32 ", dip=%s:%" PRId32 ", interval=%" PRId32 ", time=%" PRId32, cfg.flag & IPERF_FLAG_TCP ? "tcp" : "udp", cfg.flag & IPERF_FLAG_SERVER ? "server" : "client", - cfg.source_ip4 & 0xFF, (cfg.source_ip4 >> 8) & 0xFF, (cfg.source_ip4 >> 16) & 0xFF, - (cfg.source_ip4 >> 24) & 0xFF, cfg.sport, - cfg.destination_ip4 & 0xFF, (cfg.destination_ip4 >> 8) & 0xFF, - (cfg.destination_ip4 >> 16) & 0xFF, (cfg.destination_ip4 >> 24) & 0xFF, cfg.dport, + "localhost", cfg.sport, +#if IPERF_IPV4_ENABLED + cfg.type == IPERF_IP_TYPE_IPV6? cfg.destination_ip6 : inet_ntoa(cfg.destination_ip4), cfg.dport, +#else + cfg.type == IPERF_IP_TYPE_IPV6? cfg.destination_ip6 : "0.0.0.0", cfg.dport, +#endif cfg.interval, cfg.time); iperf_start(&cfg); @@ -159,9 +176,14 @@ esp_err_t app_register_iperf_commands(void) iperf_args.ip = arg_str0("c", "client", "", "run in client mode, connecting to "); iperf_args.server = arg_lit0("s", "server", "run in server mode"); iperf_args.udp = arg_lit0("u", "udp", "use UDP rather than TCP"); -// #ifdef CONFIG_LWIP_IPV6 -// iperf_args.version6 = arg_lit0("6", "version6", "Use IPv6 addresses"); -// #endif +#if IPERF_IPV6_ENABLED + /* + * NOTE: iperf2 uses -V(--ipv6_domain or --IPv6Version) for ipv6 + * iperf3 uses -6(--version6) + * May add a new command "iperf3" in the future + */ + iperf_args.ipv6_domain = arg_lit0("V", "ipv6_domain", "Set the domain to IPv6 (send packets over IPv6)"); +#endif iperf_args.port = arg_int0("p", "port", "", "server port to listen on/connect to"); iperf_args.length = arg_int0("l", "len", "", "Set read/write buffer size"); iperf_args.interval = arg_int0("i", "interval", "", "seconds between periodic bandwidth reports"); diff --git a/iperf/api.md b/iperf/api.md index d8bd5cd..4a77309 100644 --- a/iperf/api.md +++ b/iperf/api.md @@ -47,6 +47,8 @@ | define | [**IPERF\_FLAG\_SET**](#define-iperf_flag_set) (cfg, flag) ((cfg) |= (flag))
| | define | [**IPERF\_FLAG\_TCP**](#define-iperf_flag_tcp) (1 << 2)
| | define | [**IPERF\_FLAG\_UDP**](#define-iperf_flag_udp) (1 << 3)
| +| define | [**IPERF\_IPV4\_ENABLED**](#define-iperf_ipv4_enabled) LWIP\_IPV4
| +| define | [**IPERF\_IPV6\_ENABLED**](#define-iperf_ipv6_enabled) LWIP\_IPV6
| | define | [**IPERF\_IP\_TYPE\_IPV4**](#define-iperf_ip_type_ipv4) 0
| | define | [**IPERF\_IP\_TYPE\_IPV6**](#define-iperf_ip_type_ipv6) 1
| | define | [**IPERF\_MAX\_DELAY**](#define-iperf_max_delay) 64
| @@ -281,6 +283,18 @@ ESP\_OK on success #define IPERF_FLAG_UDP (1 << 3) ``` +### define `IPERF_IPV4_ENABLED` + +```c +#define IPERF_IPV4_ENABLED LWIP_IPV4 +``` + +### define `IPERF_IPV6_ENABLED` + +```c +#define IPERF_IPV6_ENABLED LWIP_IPV6 +``` + ### define `IPERF_IP_TYPE_IPV4` ```c diff --git a/iperf/include/iperf.h b/iperf/include/iperf.h index 8c4ff07..fa416bb 100644 --- a/iperf/include/iperf.h +++ b/iperf/include/iperf.h @@ -5,6 +5,7 @@ */ #pragma once +#include #include "esp_err.h" #include "esp_types.h" @@ -12,6 +13,22 @@ extern "C" { #endif +/* + * There's no CONFIG_LWIP_IPV4 in idf<5.1 + * use LWIP_IPV4 from lwipopts.h (sys/socket.h) + * LWIP_IPV4 should always be defined (0/1). + */ +#ifndef LWIP_IPV4 +#error "LWIP_IPV4 should be defined from lwipopts.h (sys/socket.h)." +#endif + +/* + * We only use lwip stack for now, but we may support different IP stack in the future. + */ +#define IPERF_IPV4_ENABLED LWIP_IPV4 +#define IPERF_IPV6_ENABLED LWIP_IPV6 + + #define IPERF_IP_TYPE_IPV4 0 #define IPERF_IP_TYPE_IPV6 1 #define IPERF_TRANS_TYPE_TCP 0 diff --git a/iperf/iperf.c b/iperf/iperf.c index 3ea02d8..06142fc 100644 --- a/iperf/iperf.c +++ b/iperf/iperf.c @@ -22,7 +22,9 @@ #include "esp_rom_sys.h" #endif -#ifdef CONFIG_FREERTOS_NUMBER_OF_CORES /* idf v5.3 */ + +#ifdef CONFIG_FREERTOS_NUMBER_OF_CORES +/* new in idf v5.3 */ #define NUMBER_OF_CORES CONFIG_FREERTOS_NUMBER_OF_CORES #else #define NUMBER_OF_CORES portNUM_PROCESSORS @@ -139,8 +141,11 @@ IRAM_ATTR static void socket_recv(int recv_socket, struct sockaddr_storage liste uint8_t *buffer; int want_recv = 0; int actual_recv = 0; -#ifdef CONFIG_LWIP_IPV6 + +#if IPERF_IPV6_ENABLED && IPERF_IPV4_ENABLED socklen_t socklen = (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6) ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in); +#elif IPERF_IPV6_ENABLED + socklen_t socklen = sizeof(struct sockaddr_in6); #else socklen_t socklen = sizeof(struct sockaddr_in); #endif @@ -178,8 +183,10 @@ IRAM_ATTR static void socket_send(int send_socket, struct sockaddr_storage dest_ int err = 0; struct timeval ts_now; -#ifdef CONFIG_LWIP_IPV6 +#if IPERF_IPV6_ENABLED && IPERF_IPV4_ENABLED const socklen_t socklen = (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6) ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in); +#elif IPERF_IPV6_ENABLED + const socklen_t socklen = sizeof(struct sockaddr_in6); #else const socklen_t socklen = sizeof(struct sockaddr_in); #endif @@ -245,19 +252,19 @@ static esp_err_t iperf_run_tcp_server(void) int opt = 1; int err = 0; esp_err_t ret = ESP_OK; - struct sockaddr_in remote_addr; struct timeval timeout = { 0 }; socklen_t addr_len = sizeof(struct sockaddr); struct sockaddr_storage listen_addr = { 0 }; +#if IPERF_IPV4_ENABLED struct sockaddr_in listen_addr4 = { 0 }; -#ifdef CONFIG_LWIP_IPV6 + struct sockaddr_in remote_addr = { 0 }; +#endif +#if IPERF_IPV6_ENABLED struct sockaddr_in6 listen_addr6 = { 0 }; - ESP_GOTO_ON_FALSE((s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6 || s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4), ESP_FAIL, exit, TAG, "Invalid AF types"); -#else - ESP_GOTO_ON_FALSE((s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4), ESP_FAIL, exit, TAG, "Invalid AF types"); + struct sockaddr_in6 remote_addr6 = { 0 }; #endif -#ifdef CONFIG_LWIP_IPV6 if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6) { +#if IPERF_IPV6_ENABLED // The TCP server listen at the address "::", which means all addresses can be listened to. inet6_aton("::", &listen_addr6.sin6_addr); listen_addr6.sin6_family = AF_INET6; @@ -277,9 +284,11 @@ static esp_err_t iperf_run_tcp_server(void) ESP_GOTO_ON_FALSE((err == 0), ESP_FAIL, exit, TAG, "Error occurred during listen: errno %d", errno); memcpy(&listen_addr, &listen_addr6, sizeof(listen_addr6)); - } else +#else + ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, exit, TAG, "Invalid iperf address type!"); #endif - if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { + } else if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { +#if IPERF_IPV4_ENABLED listen_addr4.sin_family = AF_INET; listen_addr4.sin_port = htons(s_iperf_ctrl.cfg.sport); listen_addr4.sin_addr.s_addr = s_iperf_ctrl.cfg.source_ip4; @@ -297,13 +306,26 @@ static esp_err_t iperf_run_tcp_server(void) err = listen(tcp_listen_socket, 5); ESP_GOTO_ON_FALSE((err == 0), ESP_FAIL, exit, TAG, "Error occurred during listen: errno %d", errno); memcpy(&listen_addr, &listen_addr4, sizeof(listen_addr4)); +#else + ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, exit, TAG, "Invalid iperf address type!"); +#endif } timeout.tv_sec = IPERF_SOCKET_RX_TIMEOUT; setsockopt(tcp_listen_socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); - client_socket = accept(tcp_listen_socket, (struct sockaddr *)&remote_addr, &addr_len); - ESP_GOTO_ON_FALSE((client_socket >= 0), ESP_FAIL, exit, TAG, "Unable to accept connection: errno %d", errno); - ESP_LOGI(TAG, "accept: %s,%d", inet_ntoa(remote_addr.sin_addr), htons(remote_addr.sin_port)); + if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6) { +#if IPERF_IPV6_ENABLED + client_socket = accept(tcp_listen_socket, (struct sockaddr *)&remote_addr6, &addr_len); + ESP_GOTO_ON_FALSE((client_socket >= 0), ESP_FAIL, exit, TAG, "Unable to accept connection: errno %d", errno); + ESP_LOGI(TAG, "accept: %s,%d", inet6_ntoa(remote_addr6.sin6_addr), htons(remote_addr6.sin6_port)); +#endif + } else if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { +#if IPERF_IPV4_ENABLED + client_socket = accept(tcp_listen_socket, (struct sockaddr *)&remote_addr, &addr_len); + ESP_GOTO_ON_FALSE((client_socket >= 0), ESP_FAIL, exit, TAG, "Unable to accept connection: errno %d", errno); + ESP_LOGI(TAG, "accept: %s,%d", inet_ntoa(remote_addr.sin_addr), htons(remote_addr.sin_port)); +#endif + } timeout.tv_sec = IPERF_SOCKET_RX_TIMEOUT; setsockopt(client_socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); @@ -338,15 +360,14 @@ static esp_err_t iperf_run_tcp_client(void) esp_err_t ret = ESP_OK; struct timeval timeout = { 0 }; struct sockaddr_storage dest_addr = { 0 }; +#if IPERF_IPV4_ENABLED struct sockaddr_in dest_addr4 = { 0 }; -#ifdef CONFIG_LWIP_IPV6 +#endif +#if IPERF_IPV6_ENABLED struct sockaddr_in6 dest_addr6 = { 0 }; - ESP_GOTO_ON_FALSE((s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6 || s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4), ESP_FAIL, exit, TAG, "Invalid AF types"); -#else - ESP_GOTO_ON_FALSE((s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4), ESP_FAIL, exit, TAG, "Invalid AF types"); #endif -#ifdef CONFIG_LWIP_IPV6 if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6) { +#if IPERF_IPV6_ENABLED client_socket = socket(AF_INET6, SOCK_STREAM, IPPROTO_IPV6); ESP_GOTO_ON_FALSE((client_socket >= 0), ESP_FAIL, exit, TAG, "Unable to create socket: errno %d", errno); @@ -358,9 +379,11 @@ static esp_err_t iperf_run_tcp_client(void) ESP_GOTO_ON_FALSE((err == 0), ESP_FAIL, exit, TAG, "Socket unable to connect: errno %d", errno); ESP_LOGI(TAG, "Successfully connected"); memcpy(&dest_addr, &dest_addr6, sizeof(dest_addr6)); - } else +#else + ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, exit, TAG, "Invalid iperf address type!"); #endif - if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { + } else if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { +#if IPERF_IPV4_ENABLED client_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ESP_GOTO_ON_FALSE((client_socket >= 0), ESP_FAIL, exit, TAG, "Unable to create socket: errno %d", errno); @@ -371,6 +394,9 @@ static esp_err_t iperf_run_tcp_client(void) ESP_GOTO_ON_FALSE((err == 0), ESP_FAIL, exit, TAG, "Socket unable to connect: errno %d", errno); ESP_LOGI(TAG, "Successfully connected"); memcpy(&dest_addr, &dest_addr4, sizeof(dest_addr4)); +#else + ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, exit, TAG, "Invalid iperf address type!"); +#endif } timeout.tv_sec = IPERF_SOCKET_TCP_TX_TIMEOUT; setsockopt(client_socket, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); @@ -401,15 +427,15 @@ static esp_err_t iperf_run_udp_server(void) esp_err_t ret = ESP_OK; struct timeval timeout = { 0 }; struct sockaddr_storage listen_addr = { 0 }; +#if IPERF_IPV4_ENABLED struct sockaddr_in listen_addr4 = { 0 }; -#ifdef CONFIG_LWIP_IPV6 +#endif +#if IPERF_IPV6_ENABLED struct sockaddr_in6 listen_addr6 = { 0 }; - ESP_GOTO_ON_FALSE((s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6 || s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4), ESP_FAIL, exit, TAG, "Invalid AF types"); -#else - ESP_GOTO_ON_FALSE((s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4), ESP_FAIL, exit, TAG, "Invalid AF types"); #endif -#ifdef CONFIG_LWIP_IPV6 + if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6) { +#if IPERF_IPV6_ENABLED // The UDP server listen at the address "::", which means all addresses can be listened to. inet6_aton("::", &listen_addr6.sin6_addr); listen_addr6.sin6_family = AF_INET6; @@ -426,9 +452,11 @@ static esp_err_t iperf_run_udp_server(void) ESP_LOGI(TAG, "Socket bound, port %" PRIu16, listen_addr6.sin6_port); memcpy(&listen_addr, &listen_addr6, sizeof(listen_addr6)); - } else +#else + ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, exit, TAG, "Invalid iperf address type!"); #endif - if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { + } else if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { +#if IPERF_IPV4_ENABLED listen_addr4.sin_family = AF_INET; listen_addr4.sin_port = htons(s_iperf_ctrl.cfg.sport); listen_addr4.sin_addr.s_addr = s_iperf_ctrl.cfg.source_ip4; @@ -443,6 +471,9 @@ static esp_err_t iperf_run_udp_server(void) ESP_GOTO_ON_FALSE((err == 0), ESP_FAIL, exit, TAG, "Socket unable to bind: errno %d", errno); ESP_LOGI(TAG, "Socket bound, port %d", listen_addr4.sin_port); memcpy(&listen_addr, &listen_addr4, sizeof(listen_addr4)); +#else + ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, exit, TAG, "Invalid iperf address type!"); +#endif } timeout.tv_sec = IPERF_SOCKET_RX_TIMEOUT; @@ -471,15 +502,15 @@ static esp_err_t iperf_run_udp_client(void) int opt = 1; esp_err_t ret = ESP_OK; struct sockaddr_storage dest_addr = { 0 }; +#if IPERF_IPV4_ENABLED struct sockaddr_in dest_addr4 = { 0 }; -#ifdef CONFIG_LWIP_IPV6 +#endif +#if IPERF_IPV6_ENABLED struct sockaddr_in6 dest_addr6 = { 0 }; - ESP_GOTO_ON_FALSE((s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6 || s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4), ESP_FAIL, exit, TAG, "Invalid AF types"); -#else - ESP_GOTO_ON_FALSE((s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4), ESP_FAIL, exit, TAG, "Invalid AF types"); #endif -#ifdef CONFIG_LWIP_IPV6 + if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6) { +#if IPERF_IPV6_ENABLED inet6_aton(s_iperf_ctrl.cfg.destination_ip6, &dest_addr6.sin6_addr); dest_addr6.sin6_family = AF_INET6; dest_addr6.sin6_port = htons(s_iperf_ctrl.cfg.dport); @@ -490,9 +521,11 @@ static esp_err_t iperf_run_udp_client(void) setsockopt(client_socket, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); memcpy(&dest_addr, &dest_addr6, sizeof(dest_addr6)); - } else +#else + ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, exit, TAG, "Invalid iperf address type!"); #endif - if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { + } else if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV4) { +#if IPERF_IPV4_ENABLED dest_addr4.sin_family = AF_INET; dest_addr4.sin_port = htons(s_iperf_ctrl.cfg.dport); dest_addr4.sin_addr.s_addr = s_iperf_ctrl.cfg.destination_ip4; @@ -503,6 +536,9 @@ static esp_err_t iperf_run_udp_client(void) setsockopt(client_socket, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); memcpy(&dest_addr, &dest_addr4, sizeof(dest_addr4)); +#else + ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, exit, TAG, "Invalid iperf address type!"); +#endif } if (iperf_hook_func) { @@ -546,7 +582,7 @@ static void iperf_task_traffic(void *arg) static uint32_t iperf_get_buffer_len(void) { if (iperf_is_udp_client()) { -#ifdef CONFIG_LWIP_IPV6 +#if IPERF_IPV6_ENABLED if (s_iperf_ctrl.cfg.len_send_buf) { return s_iperf_ctrl.cfg.len_send_buf; } else if (s_iperf_ctrl.cfg.type == IPERF_IP_TYPE_IPV6) { From d132dfa4310c0aeccd286cbb248a266408a3bec0 Mon Sep 17 00:00:00 2001 From: Chen Yu Dong Date: Thu, 21 Mar 2024 12:08:49 +0800 Subject: [PATCH 4/7] ci: fix release publish flow --- .cz.toml | 2 +- .github/workflows/publish_components.yml | 11 ++++---- .gitlab-ci.yml | 34 ------------------------ CONTRIBUTING.md | 31 ++++++++++++++++++--- tools/pre_bump_hook.sh | 2 +- 5 files changed, 34 insertions(+), 46 deletions(-) diff --git a/.cz.toml b/.cz.toml index 077e135..902c289 100644 --- a/.cz.toml +++ b/.cz.toml @@ -12,7 +12,7 @@ version_files = [ ] tag_format = "v$major.$minor.$patch" version_scheme = "semver" -bump_message = "bump: development version $current_version → $new_version" +bump_message = "ci(bump): development version $current_version → $new_version" update_changelog_on_bump = false pre_bump_hooks = [ "tools/pre_bump_hook.sh" diff --git a/.github/workflows/publish_components.yml b/.github/workflows/publish_components.yml index ba9c642..e84a9ff 100644 --- a/.github/workflows/publish_components.yml +++ b/.github/workflows/publish_components.yml @@ -1,9 +1,8 @@ name: Publish iperf/iperf-cmd to IDF Component Registry on: - push: - tags: - - v* + release: + types: [created] jobs: upload_components: @@ -15,14 +14,14 @@ jobs: - name: check components version same with tag run: | pip install -r tools/requirements.txt - python tools/check_version.py --version ${{ github.ref_name }} + python tools/check_version.py --version ${{ github.event.release.tag_name }} - name: Upload iperf to IDF Component Registry uses: espressif/upload-components-ci-action@v1 with: name: "iperf" directories: "iperf" - version: ${{ github.ref_name }} + version: ${{ github.event.release.tag_name }} namespace: "espressif" api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }} @@ -31,6 +30,6 @@ jobs: with: name: "iperf-cmd" directories: "iperf-cmd" - version: ${{ github.ref_name }} + version: ${{ github.event.release.tag_name }} namespace: "espressif" api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa54b76..79bb654 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,37 +83,3 @@ build_iperf_v43: tags: - build - internet - -publish_components: - stage: publish - image: ${GITLAB_DOCKER_REGISTRY}/qa/dockerfiles/qa-python-env:2 - rules: - - if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/' - needs: - - job: build_iperf - artifacts: false - - job: build_iperf_v43 - artifacts: false - before_script: - - pip3 install Commitizen - - cz version -v - - git config user.name "${GITLAB_USER_LOGIN}" - - git config user.email "${GITLAB_USER_EMAIL}" - script: - - python tools/check_version.py --version ${CI_COMMIT_TAG} - # push to github and publish components - - gitlab project-protected-tag create --name ${CI_COMMIT_TAG} --project-id=${CI_PROJECT_ID} --private-token ${GITLAB_PRIVATE_TOKEN} - # bump new version: default PATCH - - git branch -D bump/new_patch_version || true - - git checkout -b bump/new_patch_version - - cz bump --increment=PATCH - # Do not add tag for new version - - git tag --delete v$(cz version --project) || true - - | - git push -f \ - -o merge_request.create \ - -o merge_request.title="bump: ${CI_COMMIT_TAG} -> next patch version" \ - -o merge_request.assign="${GITLAB_USER_LOGIN}" \ - origin bump/new_patch_version - tags: - - host_test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7bc61fb..caf7290 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,30 @@ Your PR may not be published until a new version of this component is released. When releasing a new component version we have to: -* Create the version tag in this repository -* Publish the component to component registry -* Update the version number to next dev version -* Update the changelog +- Check and update the changelog. +- Create the version tag in this repository, then pass build/test jobs. +- Create a new github release and publish the component to component registry. +- Bump a new version for next release. + + - Create a new branch from the latest release + + ``` + # bump new dev version + - git branch -D bump/new_patch_version || true + - git checkout -b bump/new_patch_version + - git tag --delete v$(cz version --project) || true + ``` + + - Bump new version + + ```bash + # new patch version + cz bump --increment=PATCH + # new dev version + cz bump --increment=PATCH --devrelease + # new custom version + cz bump 0.2.0-dev1 + ``` + + - Push the new branch to remote repo and create a MR. + - NOTE: local tags needs to be deleted, do not push the new tag to remote repository. diff --git a/tools/pre_bump_hook.sh b/tools/pre_bump_hook.sh index 5e41919..3bbea6e 100755 --- a/tools/pre_bump_hook.sh +++ b/tools/pre_bump_hook.sh @@ -7,7 +7,7 @@ test -n "$CZ_PRE_CURRENT_VERSION" || (echo "CZ_PRE_CURRENT_VERSION must be set!" test -n "$CZ_PRE_NEW_VERSION" || (echo "CZ_PRE_NEW_VERSION must be set!"; exit 1) # Update Changelog files -if [ "${CZ_PRE_INCREMENT:-PATCH}" == "PATCH" ]; then +if [ "${CZ_PRE_INCREMENT:-}" == "PATCH" ]; then # For features or breaking changes, do not add new version to changelog for file in "iperf/CHANGELOG.md" "iperf-cmd/CHANGELOG.md"; do From 0fe278305c350355c026c0b8991ee1251000f10e Mon Sep 17 00:00:00 2001 From: Chen Yu Dong Date: Thu, 16 May 2024 21:10:26 +0800 Subject: [PATCH 5/7] tools: update changelog and bump flow --- .cz.toml | 4 +- CONTRIBUTING.md | 33 ++++++---------- tools/changelog.py | 89 ++++++++++++++++++++++++++++++++++++++++++ tools/pre_bump_hook.sh | 23 ++--------- 4 files changed, 104 insertions(+), 45 deletions(-) create mode 100644 tools/changelog.py diff --git a/.cz.toml b/.cz.toml index 902c289..a26fe9e 100644 --- a/.cz.toml +++ b/.cz.toml @@ -4,15 +4,13 @@ name = "cz_conventional_commits" version_files = [ "apps/iperf/main/idf_component.yml", "iperf/idf_component.yml", - "iperf/CHANGELOG.md", "iperf/README.md", "iperf-cmd/idf_component.yml", - "iperf-cmd/CHANGELOG.md", "iperf-cmd/README.md", ] tag_format = "v$major.$minor.$patch" version_scheme = "semver" -bump_message = "ci(bump): development version $current_version → $new_version" +bump_message = "ci(bump): bump version $current_version → $new_version" update_changelog_on_bump = false pre_bump_hooks = [ "tools/pre_bump_hook.sh" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index caf7290..280de7a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,30 +39,19 @@ Your PR may not be published until a new version of this component is released. When releasing a new component version we have to: -- Check and update the changelog. -- Create the version tag in this repository, then pass build/test jobs. -- Create a new github release and publish the component to component registry. -- Bump a new version for next release. - - - Create a new branch from the latest release - - ``` - # bump new dev version - - git branch -D bump/new_patch_version || true - - git checkout -b bump/new_patch_version - - git tag --delete v$(cz version --project) || true - ``` - - - Bump new version +- Pass build/test with current (latest) version commit. +- Bump a new version using `cz bump`: ```bash - # new patch version + git branch -D bump/new_version || true + git checkout -b bump/new_version + # bump new version: https://commitizen-tools.github.io/commitizen/commands/bump/ + cz bump + # Or cz bump --increment=PATCH - # new dev version - cz bump --increment=PATCH --devrelease - # new custom version - cz bump 0.2.0-dev1 ``` - - Push the new branch to remote repo and create a MR. - - NOTE: local tags needs to be deleted, do not push the new tag to remote repository. + - Change logs are automatically generated and updated. +- Merge the new version branch into the main branch. +- Create a new version tag in this repository. +- Create a new github release and publish the component to component registry. diff --git a/tools/changelog.py b/tools/changelog.py new file mode 100644 index 0000000..e274461 --- /dev/null +++ b/tools/changelog.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python +# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 +''' +Update CHANGELOG file +''' +import os +import pathlib +import re +import subprocess + + +COMMIT_BASE_URL = 'https://github.com/espressif/iperf-cmd/commit/' +PROJECT_ROOT = pathlib.Path(__file__).resolve().parents[1] +CZ_OLD_TAG = os.environ['CZ_PRE_CURRENT_TAG_VERSION'] +CZ_NEW_TAG = os.environ['CZ_PRE_NEW_TAG_VERSION'] + +CHANGELOG_SECTIONS = { + 'feat': 'Features', + 'fix': 'Bug Fixes', + 'breaking': 'Breaking Changes', + 'BREAKING CHANGE': 'Breaking Changes', + 'update': 'Updates', + 'change': 'Updates', + 'remove': 'Updates', + 'refactor': 'Updates', + 'revert': 'Updates', +} +CHANGELOG_TITLES = ['Features', 'Bug Fixes', 'Updates', 'Breaking Changes'] +assert all((v in CHANGELOG_TITLES for v in CHANGELOG_SECTIONS.values())) +CHANGELOG_PATTERN = re.compile(rf'({"|".join(CHANGELOG_SECTIONS.keys())})(\([^\)]+\))?:\s*([^\n]+)') +COMMIT_PATTERN = re.compile(r'^[0-9a-f]{8}') + + +def check_repo(): + '''Check current ref tag in repository + ''' + subprocess.check_call( + ['git', 'fetch', '--prune', '--prune-tags'], + cwd=PROJECT_ROOT, + ) + + # Check old_ref in repository + ref_tags = subprocess.check_output( + ['git', 'show-ref', '--tags'], + cwd=PROJECT_ROOT, + ).decode() + assert CZ_OLD_TAG in ref_tags + + +def update_changelog(): + """Update Changelog files in iperf/iperf-cmd from git history + """ + # Update ChangeLog + for component in ['iperf', 'iperf-cmd']: + git_logs = subprocess.check_output( + ['git', 'log', f'{CZ_OLD_TAG}..HEAD', f'{component}'], + cwd=PROJECT_ROOT, + ).decode() + + changelogs = {k: [] for k in CHANGELOG_TITLES[::-1]} + # Get possible changelogs from title and notes. + for commit_log in git_logs.split('commit ')[1:]: + commit = COMMIT_PATTERN.match(commit_log).group(0) + for match in CHANGELOG_PATTERN.finditer(commit_log): + if match.group(2): + _changelog = f'- {match.group(2)}: {match.group(3)} ([{commit}]({COMMIT_BASE_URL}{commit}))' + else: + _changelog = f'- {match.group(3)} ([{commit}]({COMMIT_BASE_URL}{commit}))' + changelogs[CHANGELOG_SECTIONS[match.group(1)]].append(_changelog) + + # Update changelog file + with open(str(PROJECT_ROOT / component / 'CHANGELOG.md'), encoding='utf-8') as fr: + changelog_data = fr.readlines() + changed = False + for key, values in changelogs.items(): + if not values: + continue + changelog_data.insert(2, f'### {key}\n\n' + '\n'.join(values) + '\n\n') + changed = True + if changed: + changelog_data.insert(2, f'## [{CZ_NEW_TAG}]({COMMIT_BASE_URL}/{CZ_NEW_TAG})\n\n') + with open(str(PROJECT_ROOT / component / 'CHANGELOG.md'), 'w', encoding='utf-8') as fw: + fw.write(''.join(changelog_data)) + + +if __name__ == '__main__': + check_repo() + update_changelog() diff --git a/tools/pre_bump_hook.sh b/tools/pre_bump_hook.sh index 3bbea6e..28fb605 100755 --- a/tools/pre_bump_hook.sh +++ b/tools/pre_bump_hook.sh @@ -1,22 +1,5 @@ -#!/bin/bash -# Document https://commitizen-tools.github.io/commitizen/ -# eg usage: `cz bump --files-only --increment=PATCH` +#!/usr/bin/env bash set -e -test -n "$CZ_PRE_CURRENT_VERSION" || (echo "CZ_PRE_CURRENT_VERSION must be set!"; exit 1) -test -n "$CZ_PRE_NEW_VERSION" || (echo "CZ_PRE_NEW_VERSION must be set!"; exit 1) - -# Update Changelog files -if [ "${CZ_PRE_INCREMENT:-}" == "PATCH" ]; then - # For features or breaking changes, do not add new version to changelog - for file in "iperf/CHANGELOG.md" "iperf-cmd/CHANGELOG.md"; - do - # The CURRENT_VERSION line was replaced to NEW_VERSION by commitizen - # Insert CURRENT_VERSION line to the changelog file - CHANGELOG_STR=$(sed -n '3p' ${file}) - CHANGELOG_STR=${CHANGELOG_STR//$CZ_PRE_NEW_VERSION/$CZ_PRE_CURRENT_VERSION} - sed -i "3 a $CHANGELOG_STR" ${file} - sed -i "3 a - " ${file} - done -fi +# Update changelog +python tools/changelog.py From 44c111661a3b9cc42bde70f25c9d4b2c46958639 Mon Sep 17 00:00:00 2001 From: Chen Yu Dong Date: Fri, 17 May 2024 20:10:14 +0800 Subject: [PATCH 6/7] =?UTF-8?q?ci(bump):=20bump=20version=200.1.1=20?= =?UTF-8?q?=E2=86=92=200.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cz.toml | 2 +- apps/iperf/main/idf_component.yml | 4 ++-- iperf-cmd/CHANGELOG.md | 6 ++++++ iperf-cmd/README.md | 2 +- iperf-cmd/idf_component.yml | 4 ++-- iperf/CHANGELOG.md | 6 ++++++ iperf/README.md | 2 +- iperf/idf_component.yml | 2 +- 8 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.cz.toml b/.cz.toml index a26fe9e..1dc2813 100644 --- a/.cz.toml +++ b/.cz.toml @@ -1,5 +1,5 @@ [tool.commitizen] -version = "0.1.1" +version = "0.1.2" name = "cz_conventional_commits" version_files = [ "apps/iperf/main/idf_component.yml", diff --git a/apps/iperf/main/idf_component.yml b/apps/iperf/main/idf_component.yml index 1cf1280..fd37224 100644 --- a/apps/iperf/main/idf_component.yml +++ b/apps/iperf/main/idf_component.yml @@ -1,8 +1,8 @@ ## IDF Component Manager Manifest File dependencies: espressif/iperf: - version: =0.1.1 + version: =0.1.2 override_path: ../../../iperf espressif/iperf-cmd: - version: =0.1.1 + version: =0.1.2 override_path: ../../../iperf-cmd diff --git a/iperf-cmd/CHANGELOG.md b/iperf-cmd/CHANGELOG.md index 50bcfe9..b99783e 100644 --- a/iperf-cmd/CHANGELOG.md +++ b/iperf-cmd/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [v0.1.2](https://github.com/espressif/iperf-cmd/commit//v0.1.2) + +### Bug Fixes + +- fix build with ipv6 only ([caea9730](https://github.com/espressif/iperf-cmd/commit/caea9730)) + ## [0.1.1](https://github.com/espressif/iperf-cmd/commits/v0.1.1) ### Features diff --git a/iperf-cmd/README.md b/iperf-cmd/README.md index 4f3b03e..7cf9c9f 100644 --- a/iperf-cmd/README.md +++ b/iperf-cmd/README.md @@ -32,6 +32,6 @@ This repository contains `iperf` command based esp-idf console. ```yaml dependencies: espressif/iperf_cmd: - version: "^0.1.1" + version: "^0.1.2" ``` - For more details refer [IDF Component Manager](https://docs.espressif.com/projects/idf-component-manager/en/latest/) diff --git a/iperf-cmd/idf_component.yml b/iperf-cmd/idf_component.yml index e3877ed..1ced732 100644 --- a/iperf-cmd/idf_component.yml +++ b/iperf-cmd/idf_component.yml @@ -1,4 +1,4 @@ -version: 0.1.1 +version: 0.1.2 description: Iperf command based on esp-idf console url: https://github.com/espressif/iperf-cmd/tree/master/iperf-cmd repository: https://github.com/espressif/iperf-cmd.git @@ -8,7 +8,7 @@ license: Apache-2.0 dependencies: idf: '>=4.3' espressif/iperf: - version: =0.1.1 + version: =0.1.2 examples: - path: ../apps/iperf/ files: diff --git a/iperf/CHANGELOG.md b/iperf/CHANGELOG.md index b1018e4..2159ec4 100644 --- a/iperf/CHANGELOG.md +++ b/iperf/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [v0.1.2](https://github.com/espressif/iperf-cmd/commit//v0.1.2) + +### Bug Fixes + +- fix build with ipv6 only ([caea9730](https://github.com/espressif/iperf-cmd/commit/caea9730)) + ## [0.1.1](https://github.com/espressif/iperf-cmd/commits/v0.1.1) ### Features diff --git a/iperf/README.md b/iperf/README.md index 7a4a7b2..c87e2f0 100644 --- a/iperf/README.md +++ b/iperf/README.md @@ -16,6 +16,6 @@ This repository contains a basic iperf core engine. ```yaml dependencies: espressif/iperf: - version: "^0.1.1" + version: "^0.1.2" ``` - For more details refer [IDF Component Manager](https://docs.espressif.com/projects/idf-component-manager/en/latest/) diff --git a/iperf/idf_component.yml b/iperf/idf_component.yml index 7a5412e..8b030d7 100644 --- a/iperf/idf_component.yml +++ b/iperf/idf_component.yml @@ -1,4 +1,4 @@ -version: 0.1.1 +version: 0.1.2 description: Iperf Core Engine url: https://github.com/espressif/iperf-cmd/tree/master/iperf repository: https://github.com/espressif/iperf-cmd.git From 0f53a92c7af40044b72ff03531385508f1b6daff Mon Sep 17 00:00:00 2001 From: Chen Yu Dong Date: Fri, 17 May 2024 20:12:39 +0800 Subject: [PATCH 7/7] ci: update changelog There are some commits that does not match commit message format. update them manually --- iperf/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/iperf/CHANGELOG.md b/iperf/CHANGELOG.md index 2159ec4..4a14ef5 100644 --- a/iperf/CHANGELOG.md +++ b/iperf/CHANGELOG.md @@ -5,6 +5,7 @@ ### Bug Fixes - fix build with ipv6 only ([caea9730](https://github.com/espressif/iperf-cmd/commit/caea9730)) +- No debug if non-fattal errorno ENOBUFS received ([55cce9dc](https://github.com/espressif/iperf-cmd/commit/55cce9dc)) ## [0.1.1](https://github.com/espressif/iperf-cmd/commits/v0.1.1)