On Mon, Feb 4, 2019 at 6:27 PM Alexander Aring <aring@xxxxxxxxxxxx> wrote: > > Hi, > > On Mon, Feb 04, 2019 at 11:50:30AM -0800, Peter Oskolkov wrote: > > Hello! > > > > I'd like to change 6lowpan defragmentation > > (net/ieee802154/6lowpan/reassembly.c) code to match that of regular > > IPv6, as in https://www.spinics.net/lists/netdev/msg546133.html. > > > > cool. > > I am curious, what is your exact testing plan for 6lowpan fragmentation? I plan to add a 6lowpan test case to tools/testing/selftests/net/ip_defrag.[sh|c] > Or just cc me, then I will take a look. :-) Will definitely cc you. > > > However, I don't have a physical Linux/6lowpan setup to test my > > changes. Is it possible to create a virtual 6lowpan device/network > > inside net namespaces to run tests like these: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/tree/tools/testing/selftests/net/ip_defrag.c > > ? > > yes, on kernel since 4.19 you can setup a virtual phy network with the > mac802154_hwsim driver, which works basic similar like the wireless > mac80211_hwsim driver. > > Unfortunately you need iwpan to setup basic specific L2 configuration. > It is part of wpan-tools [0]. > > When you load mac802154_hwsim it will register two phy's which can > reach each other virtually. I guess it will be enough for your test > setup. > > Sample setup: > > --- snip > modprobe mac802154_hwsim > > iwpan dev wpan0 set pan_id 0xbeef > ip link add link wpan0 name lowpan0 type lowpan > ip link set wpan0 up > ip link set lowpan0 up > > iwpan dev wpan1 set pan_id 0xbeef > ip netns add foo > iwpan phy1 set netns name foo > ip netns exec foo ip link add link wpan1 name lowpan1 type lowpan > ip netns exec foo ip link set wpan1 up > ip netns exec foo ip link set lowpan1 up > --- snap > > I hope this answers your question, let me know if I you have still > questions. Thanks a lot, Alex! Yes, it seems exactly what I need! > > Thank you! > > - Alex > > [0] https://github.com/linux-wpan/wpan-tools