aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libtle_l4p/tcp_tx_seg.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libtle_l4p/tcp_tx_seg.h')
-rw-r--r--lib/libtle_l4p/tcp_tx_seg.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libtle_l4p/tcp_tx_seg.h b/lib/libtle_l4p/tcp_tx_seg.h
index ac2b13b..b64aa77 100644
--- a/lib/libtle_l4p/tcp_tx_seg.h
+++ b/lib/libtle_l4p/tcp_tx_seg.h
@@ -27,7 +27,7 @@ tcp_segmentation(struct rte_mbuf *mbin, struct rte_mbuf *mbout[], uint16_t num,
struct rte_mbuf *in_seg = NULL;
uint32_t nbseg, in_seg_data_pos;
uint32_t more_in_segs;
- uint16_t bytes_left;
+ uint16_t out_bytes_remain;
in_seg = mbin;
in_seg_data_pos = 0;
@@ -35,7 +35,7 @@ tcp_segmentation(struct rte_mbuf *mbin, struct rte_mbuf *mbout[], uint16_t num,
/* Check that pkts_out is big enough to hold all fragments */
if (mss * num < (uint16_t)mbin->pkt_len)
- return -ENOSPC;
+ return -EAGAIN;
more_in_segs = 1;
while (more_in_segs) {
@@ -49,7 +49,7 @@ tcp_segmentation(struct rte_mbuf *mbin, struct rte_mbuf *mbout[], uint16_t num,
return -ENOMEM;
}
- bytes_left = mss;
+ out_bytes_remain = mss;
out_seg_prev = out_pkt;
more_out_segs = 1;
while (more_out_segs && more_in_segs) {
@@ -68,7 +68,7 @@ tcp_segmentation(struct rte_mbuf *mbin, struct rte_mbuf *mbout[], uint16_t num,
/* Prepare indirect buffer */
rte_pktmbuf_attach(out_seg, in_seg);
- len = bytes_left;
+ len = out_bytes_remain;
if (len > (in_seg->data_len - in_seg_data_pos))
len = in_seg->data_len - in_seg_data_pos;
@@ -77,10 +77,10 @@ tcp_segmentation(struct rte_mbuf *mbin, struct rte_mbuf *mbout[], uint16_t num,
out_pkt->pkt_len = (uint16_t)(len + out_pkt->pkt_len);
out_pkt->nb_segs += 1;
in_seg_data_pos += len;
- bytes_left -= len;
+ out_bytes_remain -= len;
/* Current output packet (i.e. fragment) done ? */
- if (bytes_left == 0)
+ if (out_bytes_remain == 0)
more_out_segs = 0;
/* Current input segment done ? */