I found the problem, it's in unformat_l4_match(). On 21.06, it "return 0" for "else", this make it can't take anything after the "l4 dst_port" while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "src_port %d", &src_port)) ; else if (unformat (input, "dst_port %d", &dst_port)) ; else return 0; }
Wei ________________________________ From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> on behalf of Benoit Ganne (bganne) via lists.fd.io <bganne=cisco....@lists.fd.io> Sent: Tuesday, December 7, 2021 8:55 AM To: Wei Huang <wei.hu.hu...@oracle.com>; vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> Subject: [External] : Re: [vpp-dev] Use classify to direct specific udp packets to use different path I'm on master (note that I just rebased the plugin on master to accommodate fib_node_register_new_type() change). Best ben > -----Original Message----- > From: Wei Huang <wei.hu.hu...@oracle.com> > Sent: mardi 7 décembre 2021 14:43 > To: vpp-dev@lists.fd.io; Benoit Ganne (bganne) <bga...@cisco.com> > Subject: Re: [vpp-dev] Use classify to direct specific udp packets to use > different path > > Tried same, still have problem. What version are you using? > > vpp# loop create-interface > loop0 > vpp# classify table mask l3 ip4 dst l4 dst_port > vpp# ip session redirect table 0 match l3 ip4 dst 192.168.21.2 l4 dst_port > 2156 via loop0 > ip session redirect: parse error `l4 dst_port 2156 via loop0' > vpp# show version > vpp v21.06.0-1~10-gd9d52f1 built by root on OS-70-BUILD at 2021-12- > 06T19:10:22 > > > > Wei > ________________________________ > > From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> on behalf of Benoit Ganne > (bganne) via lists.fd.io <bganne=cisco....@lists.fd.io> > Sent: Tuesday, December 7, 2021 5:00 AM > To: Wei Huang <wei.hu.hu...@oracle.com>; vpp-dev@lists.fd.io <vpp- > d...@lists.fd.io> > Subject: [External] : Re: [vpp-dev] Use classify to direct specific udp > packets to use different path > > Hi, > > > vpp# classify table mask l3 ip4 dst l4 dst_port > > vpp# ip session redirect table 0 match l3 ip4 dst 192.168.21.2 l4 > dst_port > > 2156 via ipip0 > > ip session redirect: parse error `l4 dst_port 2156 via ipip0' > > Not sure what is wrong, this works for me: > > DBGvpp# loop create-interface > loop0 > DBGvpp# classify table mask l3 ip4 dst l4 dst_port > DBGvpp# ip session redirect table 0 match l3 ip4 dst 192.168.21.2 l4 > dst_port 2156 via loop0 > DBGvpp# sh ip session redirect > [0] table 0 key 00000000: > 000000000000000000000000000000000000000000000000000000000000c0a8 > 00000020: 15020000086c00000000000000000000 > via: > path-list:[13] locks:1 flags:shared,no-uRPF, uRPF-list: None > path:[13] pl-index:13 ip4 weight=1 pref=0 attached: > loop0 > forwarding > [@0]: dpo-drop ip4 > DBGvpp# > > ben
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20595): https://lists.fd.io/g/vpp-dev/message/20595 Mute This Topic: https://lists.fd.io/mt/87544298/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-