diff options
| author | Qiuwen Lu <[email protected]> | 2017-05-25 16:19:57 +0800 |
|---|---|---|
| committer | Qiuwen Lu <[email protected]> | 2017-05-25 16:19:57 +0800 |
| commit | 2aa10a224f2772d8380b199f85e5ced888aef6c6 (patch) | |
| tree | 0a83ba93f83660e45ce54ea2bea5a84eea5cf9a7 /pag | |
| parent | 9897fe5b471fc746a9a11a3b8ee1b4a632c99e6c (diff) | |
修正PAG模式下段错误的问题,marsio_buff_free没有传入外部句柄。
Diffstat (limited to 'pag')
| -rw-r--r-- | pag/libpag.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pag/libpag.c b/pag/libpag.c index f0b0756..e122c7d 100644 --- a/pag/libpag.c +++ b/pag/libpag.c @@ -291,10 +291,10 @@ int pag_open() return 0; } -static void inline __free_frames(struct pag_thread_instance * tinstance) +static void inline __free_frames(struct pag_instance * instance, struct pag_thread_instance * tinstance) { - marsio_buff_free(NULL, tinstance->rxmbuf, tinstance->rxmbuf_used, SOCKET_ID_ANY, LCORE_ID_ANY); - return; + marsio_buff_free(instance->mr_instance, tinstance->rxmbuf, tinstance->rxmbuf_used, + SOCKET_ID_ANY, LCORE_ID_ANY); return; } // 从虚拟设备中取数据包,在本线程缓冲区为空时调用 @@ -331,7 +331,7 @@ void * pag_get_frame(int sid) // 缓冲区里数据包处理完,先释放,然后再从网卡取 if (unlikely((tinstance->rxmbuf_cur >= tinstance->rxmbuf_used))) { - __free_frames(tinstance); + __free_frames(instance, tinstance); __get_frames_from_rtdevice(instance, tinstance, sid); } |
