Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add back Lua socket support #272

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.07.0
24.07.1
1 change: 0 additions & 1 deletion app/pktgen-constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ enum {
* For Jumbo frame buffers lets use MTU 9216 + FCS(4) + L2(14) = 9234, for buffer size we use 10KB
*/
#define _MBUF_LEN (PG_JUMBO_FRAME_LEN + RTE_PKTMBUF_HEADROOM + sizeof(struct rte_mbuf))
// #define DEFAULT_MBUF_SIZE RTE_MBUF_DEFAULT_BUF_SIZE

#ifdef __cplusplus
}
Expand Down
16 changes: 16 additions & 0 deletions app/pktgen-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,22 @@ main(int argc, char **argv)

pktgen_timer_setup();

#ifdef LUA_ENABLED
if (pktgen.flags & IS_SERVER_FLAG) {
pktgen.ld_sock = lua_create_instance();
if (pktgen.ld_sock == NULL) {
pktgen_log_error("Failed to open Lua socket server support library");
return -1;
}

if (lua_start_socket(pktgen.ld_sock, &pktgen.thread, pktgen.hostname, pktgen.socket_port) <
0) {
pktgen_log_error("Failed to start Lua socket server thread");
return -1;
}
}
#endif

/* Unblock SIGWINCH so main thread
* can handle screen resizes */
sigemptyset(&set);
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Pktgen-DPDK - Traffic Generator powered by DPDK
** (Pktgen) Sounds like 'Packet-Gen'**

**=== Modifications ===**
- 24.07.1 - add back support for Lua socket support.
- 24.07.0 - fix TX errors of packets greater then 100 bytes as MTU size was wrong.
Add support for UDP/TCP packets in pktperf application.
Update version date.
Expand Down
Loading