Re: [PATCH net-next v1 2/3] gtp: Support creating flow-based gtp net_device

2017-07-13 Thread Jiannan Ouyang
Hi Harald, > On 7/13/17, 12:35 AM, "Harald Welte" wrote: > > > +static int gtp_dev_open(struct net_device *dev) > > +{ > > + struct gtp_dev *gtp = netdev_priv(dev); > > + struct net *net = gtp->net; > > + struct socket *sock1u; > > + struct socket *sock0; > > + struct udp_tunnel_sock_c

Re: [PATCH net-next v1 1/3] gtp: refactor to support flow-based gtp encap and decap

2017-07-13 Thread Jiannan Ouyang
Hi Harald, > On 7/13/17, 12:26 AM, "Harald Welte" wrote: >ยท > > static inline void gtp_set_pktinfo_ipv4(struct gtp_pktinfo *pktinfo, > > struct sock *sk, struct iphdr *iph, > > - struct pdp_ctx *pctx, struct rtable *rt, > > - struct flowi4 *fl4, > > + struct rta

Re: [PATCH net-next v1 0/3] Flow Based GTP Tunneling

2017-07-13 Thread Jiannan Ouyang
Hi Harald and Jeo, Thank you for the code review. They are really helpful! > On 7/13/17, 11:14 AM, "Joe Stringer" wrote: > > On 13 July 2017 at 00:12, Harald Welte wrote: >> I'm not familiar with the details here, but does this imply that you >> are matching on the outer (transport

[PATCH net-next v1 2/3] gtp: Support creating flow-based gtp net_device

2017-07-12 Thread Jiannan Ouyang
Add the gtp_create_flow_based_dev() interface to create flow-based gtp net_device, which sets gtp->collect_md. Under flow-based mode, UDP sockets are created and maintained in kernel. Signed-off-by: Jiannan Ouyang --- drivers/net/gtp.c |

[PATCH net-next v1 3/3] openvswitch: Add GPRS Tunnel Protocol (GTP) vport support

2017-07-12 Thread Jiannan Ouyang
Add OVS_VPORT_TYPE_GTP type and vport-gtp support. Signed-off-by: Jiannan Ouyang --- include/uapi/linux/openvswitch.h | 1 + net/openvswitch/Kconfig | 10 +++ net/openvswitch/Makefile | 1 + net/openvswitch/vport-gtp.c | 144 +++ 4

[PATCH net-next v1 1/3] gtp: refactor to support flow-based gtp encap and decap

2017-07-12 Thread Jiannan Ouyang
skb. - for TX, pdp lookup is bypassed. Packets are encapsulated following instructions specified in metadata_dst. Signed-off-by: Jiannan Ouyang --- drivers/net/gtp.c | 162 ++ 1 file changed, 102 insertions(+), 60 deletions(-) diff --git a

[PATCH net-next v1 0/3] Flow Based GTP Tunneling

2017-07-12 Thread Jiannan Ouyang
0.141,tun_id=123, \ actions=set_field:02:00:00:00:00:00->eth_src, \ set_field:ff:ff:ff:ff:ff:ff->eth_dst,LOCAL" ovs-ofctl add-flow br0 \ "in_port=LOCAL,actions=set_tunnel:888, \ set_field:192.168.60.141->tun_dst,2" arp -s 10.1.1.122 02:00:00:00:00:00 Jiannan O