|WARNING| pw114214 [PATCH] 答复: [PATCH] gro: fix gro with tcp push flag

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Tue Jul 26 09:09:56 CEST 2022


Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/114214

_apply patch failure_

Submitter: Jun Qiu <jun.qiu at jaguarmicro.com>
Date: Tuesday, July 26 2022 06:57:27 
Applied on: CommitID:72206323a5dd3182b13f61b25a64abdddfee595c
Apply patch set 114214 failed:

Checking patch lib/gro/gro_tcp4.c...
error: while searching for:
       hdr_len = pkt->l2_len + pkt->l3_len + pkt->l4_len;

       /*
        * Don't process the packet which has FIN, SYN, RST, PSH, URG, ECE
        * or CWR set.
        */
       if (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG)
               return -1;
       /*
        * Don't process the packet whose payload length is less than or

error: patch failed: lib/gro/gro_tcp4.c:220
Checking patch lib/gro/gro_tcp4.h...
error: while searching for:
               uint16_t l2_offset)
{
       struct rte_mbuf *pkt_head, *pkt_tail, *lastseg;
       uint16_t hdr_len, l2_len;

       if (cmp > 0) {
               pkt_head = item->firstseg;

error: patch failed: lib/gro/gro_tcp4.h:210
error: while searching for:
       }

       /* check if the IPv4 packet length is greater than the max value */
       hdr_len = l2_offset + pkt_head->l2_len + pkt_head->l3_len +
               pkt_head->l4_len;
       l2_len = l2_offset > 0 ? pkt_head->outer_l2_len : pkt_head->l2_len;
       if (unlikely(pkt_head->pkt_len - l2_len + pkt_tail->pkt_len -
                               hdr_len > MAX_IPV4_PKT_LENGTH))
               return 0;

       /* remove the packet header for the tail packet */
       rte_pktmbuf_adj(pkt_tail, hdr_len);


error: patch failed: lib/gro/gro_tcp4.h:221
Checking patch lib/gro/gro_vxlan_tcp4.c...
error: while searching for:
       tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);

       /*
        * Don't process the packet which has FIN, SYN, RST, PSH, URG,
        * ECE or CWR set.
        */
       if (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG)
               return -1;

       hdr_len = pkt->outer_l2_len + pkt->outer_l3_len + pkt->l2_len +

error: patch failed: lib/gro/gro_vxlan_tcp4.c:326
Applying patch lib/gro/gro_tcp4.c with 1 reject...
Rejected hunk #1.
Applying patch lib/gro/gro_tcp4.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch lib/gro/gro_vxlan_tcp4.c with 1 reject...
Rejected hunk #1.
diff a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c	(rejected hunks)
@@ -220,10 +220,10 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
        hdr_len = pkt->l2_len + pkt->l3_len + pkt->l4_len;

        /*
-        * Don't process the packet which has FIN, SYN, RST, PSH, URG, ECE
+        * Don't process the packet which has FIN, SYN, RST, URG, ECE
         * or CWR set.
         */
-       if (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG)
+       if (tcp_hdr->tcp_flags & (~(RTE_TCP_ACK_FLAG | RTE_TCP_PSH_FLAG)))
                return -1;
        /*
         * Don't process the packet whose payload length is less than or
diff a/lib/gro/gro_tcp4.h b/lib/gro/gro_tcp4.h	(rejected hunks)
@@ -210,7 +210,8 @@ merge_two_tcp4_packets(struct gro_tcp4_item *item,
                uint16_t l2_offset)
 {
        struct rte_mbuf *pkt_head, *pkt_tail, *lastseg;
-       uint16_t hdr_len, l2_len;
+       struct rte_tcp_hdr *head_tcp_hdr, *tail_tcp_hdr;
+       uint16_t hdr_len, l2_len, l3_offset;

        if (cmp > 0) {
                pkt_head = item->firstseg;
@@ -221,13 +222,22 @@ merge_two_tcp4_packets(struct gro_tcp4_item *item,
        }

        /* check if the IPv4 packet length is greater than the max value */
-       hdr_len = l2_offset + pkt_head->l2_len + pkt_head->l3_len +
-               pkt_head->l4_len;
+       l3_offset = l2_offset + pkt_head->l2_len + pkt_head->l3_len;
+       hdr_len = l3_offset + pkt_head->l4_len;
        l2_len = l2_offset > 0 ? pkt_head->outer_l2_len : pkt_head->l2_len;
        if (unlikely(pkt_head->pkt_len - l2_len + pkt_tail->pkt_len -
                                hdr_len > MAX_IPV4_PKT_LENGTH))
                return 0;

+       /* merge push flag to pkt_head */
+       tail_tcp_hdr = rte_pktmbuf_mtod_offset(pkt_tail,
+                               struct rte_tcp_hdr *, l3_offset);
+       if (tail_tcp_hdr->tcp_flags & RTE_TCP_PSH_FLAG) {
+               head_tcp_hdr = rte_pktmbuf_mtod_offset(pkt_head,
+                                       struct rte_tcp_hdr *, l3_offset);
+               head_tcp_hdr->tcp_flags |= RTE_TCP_PSH_FLAG;
+       }
+
        /* remove the packet header for the tail packet */
        rte_pktmbuf_adj(pkt_tail, hdr_len);

diff a/lib/gro/gro_vxlan_tcp4.c b/lib/gro/gro_vxlan_tcp4.c	(rejected hunks)
@@ -326,10 +326,10 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
        tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);

        /*
-        * Don't process the packet which has FIN, SYN, RST, PSH, URG,
+        * Don't process the packet which has FIN, SYN, RST, URG,
         * ECE or CWR set.
         */
-       if (tcp_hdr->tcp_flags != RTE_TCP_ACK_FLAG)
+       if (tcp_hdr->tcp_flags & (~(RTE_TCP_ACK_FLAG | RTE_TCP_PSH_FLAG)))
                return -1;

        hdr_len = pkt->outer_l2_len + pkt->outer_l3_len + pkt->l2_len +

https://lab.dpdk.org/results/dashboard/patchsets/23070/

UNH-IOL DPDK Community Lab


More information about the test-report mailing list