summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.h
diff options
context:
space:
mode:
authorDou Chao <chao.dou@intel.com>2022-11-29 19:41:34 +0800
committerFlorin Coras <florin.coras@gmail.com>2022-12-14 16:57:14 +0000
commit243a0433ff05a37113d6890bbeb163bbea033687 (patch)
tree1ac3ec8b63ed22649a30f1c6666ac5460a1ff9b3 /src/vnet/session/application_interface.h
parent4b9935cd54e5ca31c192cb9113e3056016f0b728 (diff)
vcl: enable gso for 'sendmsg' in LDP mode.
Some upon apps(e.g. Nginx-quic) package it's several protocol buffers into a struct msg which is a combination of gso_buffer and gso_size. but if HostStack regardless the gso_size to the buffer and split the buffer with default mss, that cause peer client failed on parsing the package. Type: improvement Signed-off-by: Dou Chao <chao.dou@intel.com> Change-Id: I805eb642be826038ba96d1b85dad8ec0c0f6c459 Signed-off-by: Dou Chao <chao.dou@intel.com>
Diffstat (limited to 'src/vnet/session/application_interface.h')
-rw-r--r--src/vnet/session/application_interface.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index e634a06b532..138953b4ed4 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -643,14 +643,18 @@ app_send_io_evt_to_vpp (svm_msg_q_t * mq, u32 session_index, u8 evt_type,
}
}
+#define app_send_dgram_raw(f, at, vpp_evt_q, data, len, evt_type, do_evt, \
+ noblock) \
+ app_send_dgram_raw_gso (f, at, vpp_evt_q, data, len, 0, evt_type, do_evt, \
+ noblock)
+
always_inline int
-app_send_dgram_raw (svm_fifo_t * f, app_session_transport_t * at,
- svm_msg_q_t * vpp_evt_q, u8 * data, u32 len, u8 evt_type,
- u8 do_evt, u8 noblock)
+app_send_dgram_raw_gso (svm_fifo_t *f, app_session_transport_t *at,
+ svm_msg_q_t *vpp_evt_q, u8 *data, u32 len,
+ u16 gso_size, u8 evt_type, u8 do_evt, u8 noblock)
{
session_dgram_hdr_t hdr;
int rv;
-
if (svm_fifo_max_enqueue_prod (f) < (sizeof (session_dgram_hdr_t) + len))
return 0;
@@ -661,7 +665,7 @@ app_send_dgram_raw (svm_fifo_t * f, app_session_transport_t * at,
hdr.rmt_port = at->rmt_port;
clib_memcpy_fast (&hdr.lcl_ip, &at->lcl_ip, sizeof (ip46_address_t));
hdr.lcl_port = at->lcl_port;
-
+ hdr.gso_size = gso_size;
/* *INDENT-OFF* */
svm_fifo_seg_t segs[2] = {{ (u8 *) &hdr, sizeof (hdr) }, { data, len }};
/* *INDENT-ON* */