The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 2110268 - Openvswitch module calls kfree_skb() under instead of __kfree_skb() no error condition
Summary: Openvswitch module calls kfree_skb() under instead of __kfree_skb() no error ...
Keywords:
Status: CLOSED DUPLICATE of bug 2109957
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: openvswitch
Version: RHEL 8.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Timothy Redaelli
QA Contact: qding
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-25 04:35 UTC by Jonathan Maxwell
Modified: 2024-03-12 14:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-03-12 14:51:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2087604 0 high CLOSED UDP Packet loss in OpenShift using IPv6 2022-11-23 00:29:48 UTC
Red Hat Issue Tracker FD-2151 0 None None None 2022-07-25 04:45:07 UTC

Description Jonathan Maxwell 2022-07-25 04:35:27 UTC
Kernel: kernel-4.18.0-305.el8

The Openvswitch module queue_userspace_packet() routine calls kfree_skb() when it should be calling __kfree_skb() under no error condition. This skews dropwatch results and makes it look like there was packet drop when in fact there was none:

git/rhel-8/net/openvswitch/datapath.c

 412 static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,↩
 413 ▹       ▹       ▹       ▹         const struct sw_flow_key *key,↩
 414 ▹       ▹       ▹       ▹         const struct dp_upcall_info *upcall_info,↩
 415 ▹       ▹       ▹       ▹         uint32_t cutlen)↩
 416 {↩
.
.

 560 ▹       err = genlmsg_unicast(ovs_dp_get_net(dp), user_skb, upcall_info->portid);↩ <---- this returns 0
 561 ▹       user_skb = NULL;↩
 562 out:↩
 563 ▹       if (err)↩
 564 ▹       ▹       skb_tx_error(skb);↩
 565 ▹       kfree_skb(user_skb);↩
 566 ▹       kfree_skb(nskb);↩ <---- and it call kfree_skb() instead of __kfree_skb() here incorrectly (this is a minor bug)
 567 ▹       return err;↩
 568 }↩

From dropwatch2.stp:

#! /usr/bin/env stap
### dropwatch2.stp - logs places where the kernel has called kfree_skb ###
# usage: stap dropwatch2.stp

# Array to hold the list of drop points we find
global locations

# Note when we turn the monitor on and off
probe begin { printf("Monitoring for dropped packets...\n") }
probe end { printf("Stopping dropped packet monitor.\n") }

# increment a drop counter for every location we drop at
probe kernel.trace("kfree_skb") { locations[$location] <<< 1 }

# Every 5 seconds report our drop locations
probe timer.sec(5)
{
  printf("\n")
  printf("%s\n", ctime(gettimeofday_s()))
  foreach (l in locations-) {
    printf("%d packets dropped at %s\n",
           @count(locations[l]), symname(l))
  }
  delete locations
}
### dropwatch2.stp ends ###

Result:

18 packets dropped at queue_userspace_packet

Comment 1 Eric Garver 2023-03-07 13:41:27 UTC
Jon, please see bug 2109957. I think we can close this bug as a duplicate of bug 2109957.

Comment 2 Flavio Leitner 2024-03-12 14:51:25 UTC

*** This bug has been marked as a duplicate of bug 2109957 ***


Note You need to log in before you can comment on or make changes to this bug.