Hi,

        in below  fun ip4_lookup_inline,i have a question,  please see also the 
following red part.


        always_inline uword


        ip4_lookup_inline (vlib_main_t * vm,


                   vlib_node_runtime_t * node,


                   vlib_frame_t * frame,


                   int lookup_for_responses_to_locally_received_packets)





          fib_index0 =


            vec_elt (im->fib_index_by_sw_if_index,


                     vnet_buffer (p0)->sw_if_index[VLIB_RX]);


            //above code ,get fib table index from vnet_buffer 
(p0)->sw_if_index[VLIB_RX] by vec_elt 






          fib_index0 =


            (vnet_buffer (p0)->sw_if_index[VLIB_TX] ==


             (u32) ~ 0) ? fib_index0 : vnet_buffer (p0)->sw_if_index[VLIB_TX];


          // here my question:if vnet_buffer (p0)->sw_if_index[VLIB_TX] is 
valid(not -1) , direct use vnet_buffer (p0)->sw_if_index[VLIB_TX] as fib table  
                     index  .why direct use  vnet_buffer 
(p0)->sw_if_index[VLIB_TX]  instead of use vec_elt to get ?



regards,


chenghu yao
_______________________________________________
vpp-dev mailing list
[email protected]
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to