Hi Lollita, > Thank you for update. I have do quick browse on the source code of > "punt socket", but what is your consider about supporting VRF?
The current packet descriptor is: /* * Packet descriptor header. Version 1 * If this header changes, the version must also change to notify clients. */ #define PUNT_PACKETDESC_VERSION 1 typedef struct __attribute__ ((packed)) { u32 sw_if_index; /* RX or TX interface */ enum punt_action_e action; } punt_packetdesc_t; It should be just add fib_index to that structure and modify punt.c:punt_socket_rx_fd() to set the fib_index in packet. Same in the other direction. Cheers, Ole > BR/Lollita Liu > > -----Original Message----- > From: Ole Troan [mailto:otr...@employees.org] > Sent: Thursday, March 01, 2018 6:35 PM > To: Lollita Liu <lollita....@ericsson.com> > Cc: vpp-dev@lists.fd.io > Subject: Re: [vpp-dev] FW: method for forward pacekt between vpp and kernel > > Lollita, > >> We are plan to implement application based on VPP with following >> architecture. The application is running on container. All traffic will be >> received by physical NIC take over by VPP via DPDK. Data plane traffic will >> be handled by nodes developed by ourselves, and control plane traffic should >> be sent to or from Linux socket. >> <image001.png> >> >> Looks there are plenty of method on VPP can forward traffic with Kernel: >> • Using tuntap with: enable tuntap in startup.conf and configure “set >> punt udp” >> It works, but only packet received from interface belong to IP table 0 will >> be send to Linux. VRF is not supported by tuntap. What is t >> • Using stn plugin. UDP packet can not handle by VPP but match STN rule >> will be sent to Linux via tap interface, but the ethernet header is >> hardcoded. The packet is able be captured by tcpdump, but will not arrive on >> socket layer. Looks it is been droped because of wrong MAC address. Then >> what is the use case of stn? >> • Using ip punt redirect via tap device. We have do simple test on it >> and looks vpp is plan to send arp to kernel via node ip4-arp. I just want >> check what is the standard use case of “ip punt redirect”? Is there any >> standard sample based on punt redirect? >> >> In general, we have another question, is there any other method can fulfill >> our requirement with VRF support in vpp? > > The short answer is of course "it depends". > > If you want an unchanged Linux application you get into the issues of > mirroring each VPP interface into Linux and having the same IP address / MAC > address be used both in VPP and in Linux. > And you can make hacks around those issues NAT or MAC NAT. I wouldn't go down > this path. > > On the other hand if you can change the application, then you could have a > single punt socket. Currently we have base implementation in: > > https://gerrit.fd.io/r/#/c/6721/ > > It supports meta-data, which allows the control plane application to set > outgoing interface, and next-node (ip4-lookup, ip6-lookup or > interface-output). > It's currently limited to UDP applications, but I have been thinking of > extending it to any type of control traffic. No limitation in what you can > send. > We have also been thinking of extending it to using the memif interface for > higher performance than Unix domain sockets. Patches are welcome! > > Cheers, > Ole > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8386): https://lists.fd.io/g/vpp-dev/message/8386 View All Messages In Topic (1): https://lists.fd.io/g/vpp-dev/topic/13285373 Mute This Topic: https://lists.fd.io/mt/13285373/21656 New Topic: https://lists.fd.io/g/vpp-dev/post Change Your Subscription: https://lists.fd.io/g/vpp-dev/editsub/21656 Group Home: https://lists.fd.io/g/vpp-dev Contact Group Owner: vpp-dev+ow...@lists.fd.io Terms of Service: https://lists.fd.io/static/tos Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub -=-=-=-=-=-=-=-=-=-=-=-
signature.asc
Description: Message signed with OpenPGP