Well I've been thought about this too, but I used modprobe to install the kernel module while right after make and make install and make module_install, is that OK? If I have to use insmode, shoulde I go to the openvswitch/datapath/linux/ directory and use insmod openvswitch.ko? also when I make modules_install there is something I can't understand: root@sdcn-ProLiant-DL380p-Gen8:~/openvswitch-2.3.1# make modules_install cd datapath/linux && make modules_install make[1]: 正在进入目录 `/root/openvswitch-2.3.1/datapath/linux' make -C /lib/modules/3.11.0-15-generic/build M=/root/openvswitch-2.3.1/datapath/linux modules_install make[2]: 正在进入目录 `/usr/src/linux-headers-3.11.0-15-generic' INSTALL /root/openvswitch-2.3.1/datapath/linux/openvswitch.ko Can't read private key DEPMOD 3.11.0-15-generic make[2]:正在离开目录 `/usr/src/linux-headers-3.11.0-15-generic' depmod `sed -n 's/#define UTS_RELEASE "\([^"]*\)"/\1/p' /lib/modules/3.11.0-15-generic/build/include/generated/utsrelease.h` make[1]:正在离开目录 `/root/openvswitch-2.3.1/datapath/linux' Why is there a "Can't read private key DEPMOD 3.11.0-15-generic"?Does this mean that modules installed failed?
Sorry for so many questions. And Thank you for replying. Have a nice weekend! 祝好, 刘畅 From: Jesse Gross Date: 2015-09-18 23:46 To: liu_ch...@buaa.edu.cn CC: dev Subject: Re: Re: [ovs-dev] How to debug openvswitch >This looks fine, so my guess is that you aren't actually inserting the >new kernel module with this code. You should be sure that you use >insmod to load the file that you compiled >On Thu, Sep 17, 2015 at 10:22 PM, liu_ch...@buaa.edu.cn ><liu_ch...@buaa.edu.cn> wrote: >> Oh I'm sorry for dropping the mailing list. >> >> I think I do put the printk in the packet processing path. I am going to >> describe what I did below: >> >> I put printk in the function ovs_vport_recieve() in vport.c, in >> ovs_dp_process_recieved_packet() in datapath.c, in ovs_flow_key_extract() >> and key_extract() in flow.c >> Here is what I put in the vport.c file, the italic and bold code is what I >> added, just a test code. >> void ovs_vport_receive(struct vport *vport, struct sk_buff *skb, >> struct ovs_key_ipv4_tunnel *tun_key) >> { >> struct pcpu_sw_netstats *stats; >> >> stats = this_cpu_ptr(vport->percpu_stats); >> >> u64_stats_update_begin(&stats->syncp); >> stats->rx_packets++; >> stats->rx_bytes += skb->len; >> u64_stats_update_end(&stats->syncp); >> pr_info("*****This is in ovs_vport_recieve() function*****\n"); >> pr_info("Packet recieved.\n"); >> pr_info("*****End of this test place*****\n"); >> OVS_CB(skb)->tun_key = tun_key; >> ovs_dp_process_received_packet (vport, skb); >> } >> There is function pr_info in the posted code, but I do tried printk first >> and it did not work so I try this. I also define the macro #define >> pr_fmt(fmt) KBUILD_MODNAME ": " fmt at the first of these files. >> BTW, the ovs version I use is ovs-2.3.1, my OS is Ubuntu 12.04. >> >> I am really appreciate for your reply and I am looking forward to your >> opinion. >> Thanks a lot! >> Chang >> ________________________________ >> 祝好, >> 刘畅 >> >> >> From: Jesse Gross >> Date: 2015-09-18 00:34 >> To: liu_ch...@buaa.edu.cn >> CC: dev@openvswitch.org >> Subject: Re: [ovs-dev] How to debug openvswitch >> On Thursday, September 17, 2015, liu_ch...@buaa.edu.cn >> <liu_ch...@buaa.edu.cn> wrote: >>> >>> Thanks a lot for your reply! >>> But I have tried this command many times, what I saw was something like >>> "br0 is left/enter promiscuous mode" which occures when I use ovs-vsctl >>> add-br or ovs-vsctl add-port commands. >>> If there any tips of the methods or functions I can use to see the kernel >>> output information? I've tried printk() and pr_info() in datapath.c, flow.c >>> and vport.c, but they didn't work. >>> What I want is let ovs output some information to the console (or log file >>> is OK) when the datapath recieves and processes packets. >> >> >> Please don't drop the mailing list. >> >> printk should output to dmesg. Without seeing the code, it's impossible to >> know why it is not showing up. Are you sure that you put the printk in a >> location on the packet processing path? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev