Skip to content

packet was dropped when transparent cube sends packet to slow path #217

@goldenrye

Description

@goldenrye

Describe the bug

Attaching a transparent cube to a interface and if the cube's egress handler has to send packet to the slow path and then back to fast path, existing framework doesn't work. There are a few issues in exiting implementation: polycubed cores dump, packet dropped and dead loop happens .

To Reproduce

Steps to reproduce the behavior:

  1. Modify the transparent hello world cube packet_in() to call send_packet_out(), this expects the packet sent back to fast path without doing anything
  2. Create a cube and configure the cube ingress action to "pass", egress action to "slowpath", and attach the cube to a interface
  3. Send ICMP echo request from remote host to the interface
  4. ICMP echo reply won't be able to send back to remote host

Expected behavior

Attaching interface to helloworld cube shouldn't drop the packet

Please tell us about your environment:

  1. OS details: Ubuntu 18.04.1 LTS
  2. Kernel details: Linux 4.19.56
  3. Polycube Version: master/f4dd91d7

Additional context

[Jianwen Pi]
@mauriciovasquezbernal In existing design, the control plane builds the topology (NH chain) for cubes when transparent cubes were attached to a interface. when a cube decides to forward a packet to slow path, the packet will be forwarded to controller and come back to the cube itself or next cube depending on the parameter of API send_packet_out(). No matter if a packet is sent to the slow path in ingress or egress TC hook, the packet will be injected into the ingress context via pcn_tc_cp interface, the 2 diagram I present in the doc is trying to illustrate the packet path in different scenarioes.

[mauriciovasquezbernal]
So basically the egress is broken
the packet out in egress is broken, because the pcn pass is not able to send it in egress actually.
I'll go a step back first, do you have a use case in mind for this?

[Jianwen Pi]
yes, the egress is broken. Even for ingress if the packet is coming back to itself there is still issues. I don’t have solid use case, but as framework we have to support this or being able to detect the loop and drop the packet. BTW in controller fast path code, there is no code to handle the stack case.

[mauriciovasquezbernal]
ok, got it.
Unfortunately I don't have answer to all this points, the slow path support in transparent cubes is quite primitive as you already found. Honestly I don't know if this is a good idea to invest time on those cases or just document them as issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions