# Can p4runtime controller coexist with root namespace switch?

**URL:** <https://forum.p4.org/t/can-p4runtime-controller-coexist-with-root-namespace-switch/976>\
**Category:** P4 Dev\
**Created:** [October 2, 2023, 8:42am UTC](https://forum.p4.org/t/can-p4runtime-controller-coexist-with-root-namespace-switch/976 "2023-10-02T08:42:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gxpy](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@gxpy](https://forum.p4.org/u/gxpy)\
**Post date:** [October 2, 2023, 8:42am UTC](https://forum.p4.org/t/can-p4runtime-controller-coexist-with-root-namespace-switch/976/1 "2023-10-02T08:42:44Z")

</div>

Hi there, my problem is that the controller I use need to take information from a mininet host (say, H3) so that it can insert or delete corresponding entry to the p4switch.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/p4/original/1X/02f079ebfba0c5d3488605f080111c20e083aa4b.png)

According to this post [Connect mininet hosts to root namespace](https://forum.p4.org/t/connect-mininet-hosts-to-root-namespace/91), in which it suggests that we can use the actual host as H3. So I followed his step, set H2 to be 10.0.3.3 and root-eth0 on my actual host to be 10.0.3.4. Now I can successfully ping between H2 and my actual host. **However, if I try to run my p4runtime python code, the connection between H2 and the actual host seems broken.**

 ![image](https://us1.discourse-cdn.com/flex019/uploads/p4/original/1X/621a5257c560539bbc84e43727963041a879bc51.png)  
I don’t know what the cause may be, this problem seems wierd to me. Is it because the controller cannot work with the root namespace scenario?  
Thanks!

---

<div class="post-metadata">

**Author:** ![DavideS](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/davides/32/120_2.png) [@DavideS](https://forum.p4.org/u/DavideS)\
**Post date:** [October 2, 2023, 10:04am UTC](https://forum.p4.org/t/can-p4runtime-controller-coexist-with-root-namespace-switch/976/2 "2023-10-02T10:04:23Z")

</div>

Hi @gxpy

Did you tried to inspect the table/s of the switches, in other word are you sure that when you connect the controller to the switch the flow rules remain there/are correct

---

<div class="post-metadata">

**Author:** ![gxpy](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@gxpy](https://forum.p4.org/u/gxpy)\
**Post date:** [October 2, 2023, 10:41am UTC](https://forum.p4.org/t/can-p4runtime-controller-coexist-with-root-namespace-switch/976/3 "2023-10-02T10:41:03Z")

</div>

Thanks a lot for your advice! After checking the table I found that if using the p4runtime controller, the previous entry installed by runtime json will be gone. Sorry I didn’t know about that 😄.
