DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 870] Fragmented packets incorrect RSS distribution with TAP PMD on Hyper-V platform
@ 2021-10-29 14:21 bugzilla
  2023-11-28 16:25 ` bugzilla
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla @ 2021-10-29 14:21 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=870

            Bug ID: 870
           Summary: Fragmented packets incorrect RSS distribution with TAP
                    PMD on Hyper-V platform
           Product: DPDK
           Version: 20.11
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: dev@dpdk.org
          Reporter: madhuker.mythri@oracle.com
  Target Milestone: ---

On Hyper-V based platforms(Azure with Accelerated-mode disabled), the network
ports come up on Failsafe-PMD(and underneath TAP PMD) configured with 4-queues
RSS enabled.
The normal Rx/Tx packets were received and transmitted well. But, when the IP
fragmented packets received on these ports, all the fragments of single-packet
were distributed across different queues, instead of arriving to single-queue.

As per the TAP PMD RSS(based on BPF) algorithm mentioned in the 
"tap_bpf_program.c" file, the RSS algorithm written based on 4-tuple(L3 Src/Dst
and L4 Src-port/Dst-port) as mentioned in below code snippet, the RSS algorithm
does not check for the IP fragmented packets.
It assumes all the incoming IP based packets will have L4-header and trying to
access the L4 Src-port/Dst-port fields using the pointer of L3-header
end-address  without cross checking the L4 header presence.  since, in-case of
fragmented packets the L4 header will not be present expect for first fragment
and thus should not consider L4 Src-port/Dst-port under the 4-tuple hash
calculation.

So, this RSS hash calculation has a bug in-case of fragmented packets.

File-name: ./drivers/net/tap/tap_bpf_program.c
================ =========================
rss_l3_l4(struct __sk_buff *skb)
{
.....
.....

  __u8 *src_dst_addr = data + off + offsetof(struct iphdr, saddr);
        __u8 *src_dst_port = data + off + sizeof(struct iphdr);
        struct ipv4_l3_l4_tuple v4_tuple = {
            .src_addr = IPv4(*(src_dst_addr + 0),
                    *(src_dst_addr + 1),
                    *(src_dst_addr + 2),
                    *(src_dst_addr + 3)),
            .dst_addr = IPv4(*(src_dst_addr + 4),
                    *(src_dst_addr + 5),
                    *(src_dst_addr + 6),
                    *(src_dst_addr + 7)),
            .sport = PORT(*(src_dst_port + 0),
                    *(src_dst_port + 1)),
            .dport = PORT(*(src_dst_port + 2),
                    *(src_dst_port + 3)),
        };
....
....

}
=========================================

So, here we can see the L4 src/dst ports were fetched without cross-checking
the packet has L4 header and in-case of fragmented packets the L4 src/dst ports
will be some junk values.

Due to this all the fragments of same packet were landing on to different
queues and thus re-assembling the fragments got failed.

Tested with DPDK-version "20.11.2" and the Linux Kernel-version is "5.4.17".

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug 870] Fragmented packets incorrect RSS distribution with TAP PMD on Hyper-V platform
  2021-10-29 14:21 [dpdk-dev] [Bug 870] Fragmented packets incorrect RSS distribution with TAP PMD on Hyper-V platform bugzilla
@ 2023-11-28 16:25 ` bugzilla
  0 siblings, 0 replies; 2+ messages in thread
From: bugzilla @ 2023-11-28 16:25 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=870

Thomas Monjalon (thomas@monjalon.net) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Thomas Monjalon (thomas@monjalon.net) ---
Resolved in http://git.dpdk.org/dpdk/commit/?id=db6a3ddb16

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 2697 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-28 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 14:21 [dpdk-dev] [Bug 870] Fragmented packets incorrect RSS distribution with TAP PMD on Hyper-V platform bugzilla
2023-11-28 16:25 ` bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).