Skip to content

Commit

Permalink
add back Lua socket support
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
  • Loading branch information
KeithWiles authored and pktgen committed Jul 18, 2024
1 parent cc1d4c6 commit 2c8819d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
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

0 comments on commit 2c8819d

Please sign in to comment.