Skip to content

pcn_pkt_controller_with_metadata_stack() drops the packet #210

@goldenrye

Description

@goldenrye

Describe the bug

pcn_pkt_controller_with_metada_stack() API is supposed to send the packet to both the controller and stack, but in existing implementation the packet was only sent to the controller and packet was dropped in stack.

To Reproduce

Steps to reproduce the behavior:

  1. Go to src/services/pcn-transparent-helloworld/src
  2. Modify file TransparentHelloworld_dp_ingress.c replacing pcn_pkt_controller with pcn_pkt_controller_with_metadata_stack(), you need add one more parameter: uint32_t metadata[3] to make it compilable
  3. compile the code and execute the polycubed, create a transparent hello world cube, set the cube to slow path action and attach the cube to a interface
  4. before attach ping the interface is working, after attaching ping doesn't work

Expected behavior

after attach the cube the interface, ping should still works

Please tell us about your environment:

  1. OS details: Ubuntu 18.04.1 LTS
  2. Kernel details: 5.2.0-050200-generic
  3. Polycube Version: b84e3b2

Additional context

the problem is that to_stack flag carried by skb->cb[0] was overwritten when handle_rx returns RX_CONTROLLER,
case RX_CONTROLLER:
skb->cb[0] = CUBE_ID | TYPE << 16;
return to_controller(skb, md.reason);

Metadata

Metadata

Assignees

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