Hi Yacan, 

At this point, only ipv6 link local packets end up in ip-rewrite. Because of 
the v4/v6 symmetry we have arcs for both address families. 

With respect to the two questions. First, tcp doesn’t cache the dpo for the 
remote ip because that would require tracking the dpo (in case it changes) and 
some of the apis involved are not thread safe. You can find some remnants of 
those attempts in tcp.c (eg tcp_connection_stack_on_fib_entry) although they’re 
compiled out and probably bit rotten at this point. 

Nonetheless, as you already found out, tcp-output can redirect packets to a 
custom node and provide some opaque context (next_node_opaque) but currently 
there are no apis for setting these two values. That is, the two are currently 
meant for vpp builtin applications that have access to the tcp connection. Does 
that fit your usecase? Otherwise, I am planning to add some apis that would 
allow vcl to change transport parameters soon.

Regards,
Florin

> On Apr 7, 2021, at 1:56 AM, liuyacan <[email protected]> wrote:
> 
> 
> Hi VPP experts,
> 
>      The command "show node tcp4-output" tell me that  ip4-lookup and 
> ip4-rewrite 
>      are both possible  nodes for  Tx  packets. But I never saw the count of 
> ip4-rewrite 
>      greater than zero.... 
>      The function tcp_output_handle_packet()  checks  tc0's next_node_index 
> to 
>      determine which node is appropriate, But I can not find any place that 
> modify 
>       the filed.. 
>
>       My question is can tcp_connection_t store the FIB lookup result so that 
> subsequent 
>       packets are able to bypass  ip4-lookup node ?
>     
> Best Regards,
> Yacan
> 
>   
>
> 
> 
> 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19125): https://lists.fd.io/g/vpp-dev/message/19125
Mute This Topic: https://lists.fd.io/mt/81911146/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to