Hi Satya, it’s also necessary to enable full reassembly feature along with your feature by calling ip4_full_reass_enable_disable_with_refcnt().
You can take a look at NAT code which already does that - snat_interface_add_del(). Regards, Klement > On 4 Sep 2020, at 14:48, Satya Murthy <satyamurthy1...@gmail.com> wrote: > > > Hi , > > We wanted to have our custom graph node to receive all the IP packets that > are destined to our local interfaces. > However, we want the packets after reassmbly is done by the vnet reassembly > code, if needed. > > Hence, we added a custom_feature on the ip4-unicast feature-arc as below. > > VNET_FEATURE_INIT (custom_feature, static) = > { > .arc_name = "ip4-unicast", > .node_name = "custom_feature", > .runs_after = VNET_FEATURES ("ip4-full-reassembly-feature"), > }; > > Also, this feature is enabled on the interface in question. > > After this code, show features verbose is showing as below. > > [16] ip4-unicast: > [ 0]: ip4-rx-urpf-loose > [ 1]: ip4-rx-urpf-strict > [ 2]: svs-ip4 > .. > [39]: ip4-full-reassembly-feature > [40]: custom_feature > .. > > But, when the two fragments of a packet are received, they are given to > custom_feature node without reassembly. > > show trace is showing as below. > > 00:03:35:565905: ethernet-input > frame: flags 0x3, hw-if-index 1, sw-if-index 1 > IP4: fa:16:3e:e0:70:43 -> fa:16:3e:eb:fb:74 > 00:03:35:565942: ip4-input-no-checksum > UDP: 10.10.5.2 -> 10.10.5.1 > tos 0x00, ttl 64, length 1500, checksum 0x36fa dscp CS0 ecn NON_ECN > fragment id 0x0001, flags MORE_FRAGMENTS > UDP: 53 -> 53 > length 2008, checksum 0x0585 > 00:03:35:565968: custom_feature_node > custome_feature_node: sw_if_index 1, next_worker 5, buffer 0x4c7cc8 > > I wanted to put our custom_feature in ip4-local feature arc, as it seems more > logical. > However, i dont see reassembly feature in that feature arc. > > Is there any work around to achieve this functionality (or) > anything wrong that I am doing here. > > Appreciate any inputs regarding this. > > -- > Thanks & Regards, > Murthy
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#17341): https://lists.fd.io/g/vpp-dev/message/17341 Mute This Topic: https://lists.fd.io/mt/76628685/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-