From d8081d3c1cc8e92671ee27cb042f67ad76e8c096 Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Thu, 28 Sep 2023 11:50:55 -0400 Subject: [PATCH] cnet: tcp/udp input s/csum/verify Signed-off-by: Maryam Tahhan --- lib/cnet/tcp/tcp_input.c | 8 ++++---- lib/cnet/udp/udp_input.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/cnet/tcp/tcp_input.c b/lib/cnet/tcp/tcp_input.c index e2d2a413..fd45a1b4 100644 --- a/lib/cnet/tcp/tcp_input.c +++ b/lib/cnet/tcp/tcp_input.c @@ -48,7 +48,7 @@ tcp_input_lookup(struct cne_node *node, pktmbuf_t *m, struct pcb_hd *hd) struct pcb_key key = {0}; struct pcb_entry *pcb; struct cnet_metadata *md; - int16_t csum; + int16_t verify; int a_family, a_len; struct pcb_entry *pcb2; @@ -96,10 +96,10 @@ tcp_input_lookup(struct cne_node *node, pktmbuf_t *m, struct pcb_hd *hd) if (likely(pcb)) { int rc = TCP_INPUT_NEXT_PKT_DROP; if (is_pcb_dom_inet6(pcb)) - csum = cne_ipv6_udptcp_cksum_verify(l3, tcp); + verify = cne_ipv6_udptcp_cksum_verify(l3, tcp); else - csum = cne_ipv4_udptcp_cksum_verify(l3, tcp); - if (csum < 0) + verify = cne_ipv4_udptcp_cksum_verify(l3, tcp); + if (verify < 0) return rc; m->userptr = pcb; diff --git a/lib/cnet/udp/udp_input.c b/lib/cnet/udp/udp_input.c index 282aec31..ad9fe8d7 100644 --- a/lib/cnet/udp/udp_input.c +++ b/lib/cnet/udp/udp_input.c @@ -50,7 +50,7 @@ udp_input_lookup(pktmbuf_t *m, struct pcb_hd *hd) struct pcb_key key = {0}; struct pcb_entry *pcb; struct cnet_metadata *md; - int16_t csum; + int16_t verify; int a_family, a_len; struct pcb_entry *pcb2; @@ -100,11 +100,11 @@ udp_input_lookup(pktmbuf_t *m, struct pcb_hd *hd) if (likely(pcb)) { if ((pcb->opt_flag & UDP_CHKSUM_FLAG) && udp->dgram_cksum) { if (is_pcb_dom_inet6(pcb)) - csum = cne_ipv6_udptcp_cksum_verify(l3, udp); + verify = cne_ipv6_udptcp_cksum_verify(l3, udp); else { - csum = cne_ipv4_udptcp_cksum_verify(l3, udp); + verify = cne_ipv4_udptcp_cksum_verify(l3, udp); } - if (csum < 0) + if (verify < 0) return UDP_INPUT_NEXT_PKT_DROP; } m->userptr = pcb;