DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [dpdk_dev]bug report: create_proc_read_entry() is not supported from linux kernel 3.10.x
@ 2015-08-05  8:26 Chi, Xiaobo (Nokia - CN/Hangzhou)
  2015-08-14  8:55 ` Chi, Xiaobo (Nokia - CN/Hangzhou)
  0 siblings, 1 reply; 2+ messages in thread
From: Chi, Xiaobo (Nokia - CN/Hangzhou) @ 2015-08-05  8:26 UTC (permalink / raw)
  To: dev

Hi,
Anyone has ever tested the rte_kni.ko in igb mode?  If the following is confirmed as a bug, I would like to work out a patch. Thanks.
For file ~/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/ igb_procfs.c, there are following code. As to what I know, from Linux kernel 3.10.x, the functions create_proc_read_entry() and create_proc_entry() are not supported anymore, so we should use proc_create_data() for compatibility for both kernel 2.6 and 3.10.x and later versions.

/* called from igb_main.c */
int igb_procfs_init(struct igb_adapter *adapter)
{
......................
        for (index = 0; ; index++) {
                if (igb_proc_entries[index].read == NULL) {
                        break;
                }
                if (!(create_proc_read_entry(igb_proc_entries[index].name,
                                           0444,
                                           adapter->info_dir,
                                           igb_proc_entries[index].read,
                                           adapter))) {

                        rc = -ENOMEM;
                        goto fail;
                }
        }
......................
}

root@distro:~$ uname -a
Linux distro 3.18.9-pc64-distro.git-v1.7 #1 SMP Thu May 7 12:30:41 UTC 2015 x86_64 GNU/Linux
root@distro:~$ cat /proc/kallsyms | grep create_proc_read_entry
root@distro:~$ cat /proc/kallsyms | grep proc_create_data
ffffffff803e1fd0 T proc_create_data
ffffffff80a30dd0 R __ksymtab_proc_create_data
ffffffff80a4738a r __kstrtab_proc_create_data
root@distro:~$

brgs,
chi Xiaobo

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [dpdk_dev]bug report: create_proc_read_entry() is not supported from linux kernel 3.10.x
  2015-08-05  8:26 [dpdk-dev] [dpdk_dev]bug report: create_proc_read_entry() is not supported from linux kernel 3.10.x Chi, Xiaobo (Nokia - CN/Hangzhou)
@ 2015-08-14  8:55 ` Chi, Xiaobo (Nokia - CN/Hangzhou)
  0 siblings, 0 replies; 2+ messages in thread
From: Chi, Xiaobo (Nokia - CN/Hangzhou) @ 2015-08-14  8:55 UTC (permalink / raw)
  To: dev

Hi,
Anyone response to this? 

Brgs,
Chi Xiaobo


-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of ext Chi, Xiaobo (Nokia - CN/Hangzhou)
Sent: Wednesday, August 05, 2015 4:27 PM
To: dev@dpdk.org
Subject: [dpdk-dev] [dpdk_dev]bug report: create_proc_read_entry() is not supported from linux kernel 3.10.x

Hi,
Anyone has ever tested the rte_kni.ko in igb mode?  If the following is confirmed as a bug, I would like to work out a patch. Thanks.
For file ~/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/ igb_procfs.c, there are following code. As to what I know, from Linux kernel 3.10.x, the functions create_proc_read_entry() and create_proc_entry() are not supported anymore, so we should use proc_create_data() for compatibility for both kernel 2.6 and 3.10.x and later versions.

/* called from igb_main.c */
int igb_procfs_init(struct igb_adapter *adapter)
{
......................
        for (index = 0; ; index++) {
                if (igb_proc_entries[index].read == NULL) {
                        break;
                }
                if (!(create_proc_read_entry(igb_proc_entries[index].name,
                                           0444,
                                           adapter->info_dir,
                                           igb_proc_entries[index].read,
                                           adapter))) {

                        rc = -ENOMEM;
                        goto fail;
                }
        }
......................
}

root@distro:~$ uname -a
Linux distro 3.18.9-pc64-distro.git-v1.7 #1 SMP Thu May 7 12:30:41 UTC 2015 x86_64 GNU/Linux
root@distro:~$ cat /proc/kallsyms | grep create_proc_read_entry
root@distro:~$ cat /proc/kallsyms | grep proc_create_data
ffffffff803e1fd0 T proc_create_data
ffffffff80a30dd0 R __ksymtab_proc_create_data
ffffffff80a4738a r __kstrtab_proc_create_data
root@distro:~$

brgs,
chi Xiaobo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-14  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-05  8:26 [dpdk-dev] [dpdk_dev]bug report: create_proc_read_entry() is not supported from linux kernel 3.10.x Chi, Xiaobo (Nokia - CN/Hangzhou)
2015-08-14  8:55 ` Chi, Xiaobo (Nokia - CN/Hangzhou)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).