Giter Site home page Giter Site logo

igb_avb's People

Contributors

adiknoth avatar arndb avatar avinash-palleti avatar christopher-s-hall avatar cirust20 avatar craiggunther avatar cwyborny avatar edersondisouza avatar grandcat avatar heinemml avatar heosuabi avatar intel-ethernet avatar jacob-keller avatar jaehyungahn avatar jakubmielczarekstc avatar jfornal avatar keerockl avatar marcinmiklas avatar pawelmodrzejewski avatar psow avatar psykuter avatar quitschbo avatar rhii avatar richardcochran avatar sugnanprabhu avatar t12z avatar tblah avatar tnishiok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

igb_avb's Issues

igb_avb does not compile anymore with Linux 6.6-RT15

Steps to reproduce:
use this build script:
---- snip ----

#
# build Linux kernel 6.6-RT15
#

(
mkdir build_kernel
cd build_kernel/
git clone -b v6.6-rt15 git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
cd linux-rt-devel/
cp ../../myconfig_linux_v6_6_rt15.config .config
time nice -n 19 ksh -c 'CC="gcc -m32" make -j12 bindeb-pkg 2>&1 | tee buildlog.log'
cd ..
)


#
# build custom igb_avb module
#
(
mkdir build_igbavb
cd build_igbavb/

git clone https://github.com/Avnu/igb_avb.git

cd igb_avb/
git clone https://github.com/Avnu/igb_avb.git
cd igb_avb/
#cp /home/rmainz/work/debian_rt_kernel_src/linux_v6_5_rt5/igb_avb/0001-libigb-Use-PTHREAD_PRIO_INHERIT-for-mutex-to-avoid-r.patch ../..
#git am <../../0001-libigb-Use-PTHREAD_PRIO_INHERIT-for-mutex-to-avoid-r.patch

cd kmod/
make -C "$PWD/../../../build_kernel/linux-rt-devel/" KSRC="$PWD/../../../build_kernel/linux-rt-devel/" M=$PWD 
)

---- snip ----

Result:
The build fails like this (see https://rovema.kpaste.net/9d145d):
---- snip ----

rmainz@derfwpc5131:~/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod$ make -C "$PWD/../../../build_kernel/linux-rt-devel/" KSRC="$PWD/../../../build_kernel/linux-rt-devel/" M=$PWD 
make: Entering directory '/home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_kernel/linux-rt-devel'
  CC [M]  /home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod/igb_main.o
/home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod/igb_main.c: In function ‘igb_probe’:
/home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod/igb_main.c:2746:2: error: implicit declaration of function ‘pci_enable_pcie_error_reporting’ [-Werror=implicit-function-declaration]
 2746 |  pci_enable_pcie_error_reporting(pdev);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod/igb_main.c: In function ‘igb_remove’:
/home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod/igb_main.c:3310:2: error: implicit declaration of function ‘pci_disable_pcie_error_reporting’ [-Werror=implicit-function-declaration]
 3310 |  pci_disable_pcie_error_reporting(pdev);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/srcu.h:21,
                 from ./include/linux/notifier.h:16,
                 from ./arch/x86/include/asm/uprobes.h:13,
                 from ./include/linux/uprobes.h:49,
                 from ./include/linux/mm_types.h:16,
                 from ./include/linux/buildid.h:5,
                 from ./include/linux/module.h:14,
                 from /home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod/igb_main.c:43:
./include/linux/workqueue.h:631:2: warning: call to ‘__warn_flushing_systemwide_wq’ declared with attribute warning: Please avoid flushing system-wide workqueues. [-Wattribute-warning]
  631 |  __warn_flushing_systemwide_wq();    \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod/igb_main.c:3266:2: note: in expansion of macro ‘flush_scheduled_work’
 3266 |  flush_scheduled_work();
      |  ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243: /home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod/igb_main.o] Error 1
make[1]: *** [/home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_kernel/linux-rt-devel/Makefile:1913: /home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_igbavb/igb_avb/kmod] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/home/rmainz/work/debian_rt_kernel_src/linux_6_6_rt15/build_kernel/linux-rt-devel'

---- snip ----

Other queues doesn't exist?

Hi,
I'm trying to use this code, and running into some problems.
I installed everything, and tried to use the code in the README (or ./startup.sh), with interface eno1.

I get an error regarding the queues files-
./startup.sh: line 20: /sys/class/net/eno1/queues/tx-1/xps_cpus: No such file or directory
./startup.sh: line 21: /sys/class/net/eno1/queues/tx-2/xps_cpus: No such file or directory
./startup.sh: line 22: /sys/class/net/eno1/queues/tx-3/xps_cpus: No such file or directory

Checking the queues folder under /sys/class/net/eno1, there are only tx-0 and rx-0 folders.

I use Ubuntu 18.04, Intel I218-LM NIC.

Any idea what should I do? I couldn't find any reference to this over the internet...

Thanks

igb_avb with kernel 5.4.0

Is this supposed to build against 5.4.0? After adding M=$(shell pwd) to the makefile, I get:

root@bridgehead:/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod# make
make -C /lib/modules/5.4.0-33-generic/build M=/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod SUBDIRS=/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-33-generic'
  CC [M]  /home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.o
In file included from /home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb.h:61,
                 from /home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.c:69:
/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/kcompat.h:2579:10: fatal error: linux/pci-aspm.h: No such file or directory
 2579 | #include <linux/pci-aspm.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:275: /home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.o] Error 1
make[1]: *** [Makefile:1719: /home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-33-generic'
make: *** [Makefile:267: default] Error 2

Commenting out that include returns a bunch of other errors (truncated):

root@bridgehead:/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod# make
make -C /lib/modules/5.4.0-33-generic/build M=/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod SUBDIRS=/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-33-generic'
  CC [M]  /home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.o
/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.c: In function ‘igb_tx_map’:
/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.c:5590:12: error: assignment to ‘struct skb_frag_struct *’ from incompatible pointer type ‘skb_frag_t *’ {aka ‘struct bio_vec *’} [-Werror=incompatible-pointer-types]
 5590 |  for (frag = &skb_shinfo(skb)->frags[0];; frag++) {
      |            ^
/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.c:5590:47: error: increment of pointer to an incomplete type ‘struct skb_frag_struct’
 5590 |  for (frag = &skb_shinfo(skb)->frags[0];; frag++) {
      |                                               ^~
/home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.c:5631:24: error: passing argument 1 of ‘skb_frag_size’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 5631 |   size = skb_frag_size(frag);
      |                        ^~~~
      |                        |
      |                        struct skb_frag_struct *
In file included from ./include/linux/if_ether.h:19,
                 from ./include/uapi/linux/ethtool.h:19,
                 from ./include/linux/ethtool.h:18,
                 from ./include/linux/netdevice.h:37,
                 from /home/lukeh/CVSRoot/Avnu/OpenAvnu/lib/igb_avb/kmod/igb_main.c:48:
./include/linux/skbuff.h:325:60: note: expected ‘const skb_frag_t *’ {aka ‘const struct bio_vec *’} but argument is of type ‘struct skb_frag_struct *’
  325 | static inline unsigned int skb_frag_size(const skb_frag_t *frag)
      |                                          ~~~~~~~~~~~~~~~~~~^~~~

README is wrong

igb_avb is not the Intel IGB driver, so README.md should be a bit more descriptive, I believe.

igb_avb versioned releases

We'd like to propose versioned releases of igb_avb so that we can start pushing changes to the master and tag newer version as and when needed.

Since the last tagged release of Open AVnu was v1.1 released in Dec. 2013 https://github.com/AVnu/OpenAvnu/releases, we propose v1.1.1 for igb_avb.

Please comment as needed.

Thanks.

about XPS queue choose, we should remove ndo_select_queue

In the newest kernel(6.2.12).
image

seems the kernel doesn't have choice to get queue_index from XPS config if we define ndo_select_queue. so we should set NULL to it.

I try to disable ndo_select_queue, but I found the NIC will link down and link up Periodic.
image

igb_avb: Unknown symbol __stack_chk_fail (err 0)

Hi Avnu Team,

I try to compile and install igb_avb driver on my machine.
But I notice a problem with the module I'm loading into Linux.

modprobe igb_avb

modprobe: ERROR: could not insert 'igb_avb': Unknown symbol in module, or unknown parameter (see dmesg)

dmesg | tail -1

[ 209.171449] igb_avb: Unknown symbol __stack_chk_fail (err 0 )

HEAD: b659bce
Environment for build: Yocto Sumo
Kernel: 4.14.212 lts - https://github.com/intel/linux-intel-lts/tree/4.14/base
CFLAGS_append = " -fPIE"

Compiling / running on Fedora based system (RHEL 8), specifically Rocky 8.6

I apologize if this has been asked before, I did some checking and didn't find anything. I am trying to compile and use OpenAvnu (with the igb_avb driver) on a Fedora based system (RHEL 8 / Rocky 8.6). OpenAvnu compiles fine, but there are issues compiling the igb_avb kernel module that don't completely make sense. Note that I have used this in RHEL 7 / CentOS 7 successfully.

Output from uname (on Rocky 8.6 system):

Linux hostname 4.18.0-372.9.1.el8.x86_64 #1 SMP Tue May 10 14:48:47 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

First compilation error:

[user@hostname OpenAvnu-july]$ make -C lib/igb_avb/ kmod
make: Entering directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb'
make  subdir=kmod  -C kmod 
make[1]: Entering directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod'
make -C /lib/modules/4.18.0-372.9.1.el8.x86_64/build SUBDIRS=/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod modules
make[2]: Entering directory '/usr/src/kernels/4.18.0-372.9.1.el8.x86_64'
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.o
In file included from /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb.h:61,
                 from /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:69:
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/kcompat.h:2579:10: fatal error: linux/pci-aspm.h: No such file or directory
 #include <linux/pci-aspm.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:316: /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.o] Error 1
make[2]: *** [Makefile:1577: _module_/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod] Error 2
make[2]: Leaving directory '/usr/src/kernels/4.18.0-372.9.1.el8.x86_64'
make[1]: *** [Makefile:262: default] Error 2
make[1]: Leaving directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod'
make: *** [Makefile:13: kmod] Error 2
make: Leaving directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb'

I have tried various different versions (commits) and even though my kernel is 4.18 and does not seem to have linux/pci-aspm.h the check is looking for less than a 5.x kernel (assuming this is mostly developed against Ubuntu / Debian flavored systems). So if I manually remove / comment that line (easy enough), this leads to the next issue:

[user@hostname OpenAvnu-july]$ make -C lib/igb_avb/ kmod
make: Entering directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb'
make  subdir=kmod  -C kmod 
make[1]: Entering directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod'
make -C /lib/modules/4.18.0-372.9.1.el8.x86_64/build SUBDIRS=/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod modules
make[2]: Entering directory '/usr/src/kernels/4.18.0-372.9.1.el8.x86_64'
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.o
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:239:13: error: initialization of ‘vm_fault_t (*)(struct vm_fault *)’ {aka ‘unsigned int (*)(struct vm_fault *)’} from incompatible pointer type ‘int (*)(struct vm_fault *)’ [-Werror=incompatible-pointer-types]
   .fault  = igb_vm_fault
             ^~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:239:13: note: (near initialization for ‘igb_mmap_ops.fault’)
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:2360:22: error: initialization of ‘u16 (*)(struct net_device *, struct sk_buff *, struct net_device *, u16 (*)(struct net_device *, struct sk_buff *, struct net_device *))’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *, short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *))’} from incompatible pointer type ‘u16 (*)(struct net_device *, struct sk_buff *, void *, u16 (*)(struct net_device *, struct sk_buff *, struct net_device *))’ {aka ‘short unsigned int (*)(struct net_device *, struct sk_buff *, void *, short unsigned int (*)(struct net_device *, struct sk_buff *, struct net_device *))’} [-Werror=incompatible-pointer-types]
  .ndo_select_queue = igb_select_queue,
                      ^~~~~~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:2360:22: note: (near initialization for ‘igb_netdev_ops.ndo_select_queue’)
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:2366:21: error: initialization of ‘void (*)(struct net_device *, unsigned int)’ from incompatible pointer type ‘void (*)(struct net_device *)’ [-Werror=incompatible-pointer-types]
  .ndo_tx_timeout  = igb_tx_timeout,
                     ^~~~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:2366:21: note: (near initialization for ‘igb_netdev_ops.<anonymous>.ndo_tx_timeout’)
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:2394:18: error: initialization of ‘int (*)(struct ndmsg *, struct nlattr **, struct net_device *, const unsigned char *, u16,  u16,  struct netlink_ext_ack *)’ {aka ‘int (*)(struct ndmsg *, struct nlattr **, struct net_device *, const unsigned char *, short unsigned int,  short unsigned int,  struct netlink_ext_ack *)’} from incompatible pointer type ‘int (*)(struct ndmsg *, struct nlattr **, struct net_device *, const unsigned char *, u16,  u16)’ {aka ‘int (*)(struct ndmsg *, struct nlattr **, struct net_device *, const unsigned char *, short unsigned int,  short unsigned int)’} [-Werror=incompatible-pointer-types]
  .ndo_fdb_add  = igb_ndo_fdb_add,
                  ^~~~~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:2394:18: note: (near initialization for ‘igb_netdev_ops.<anonymous>.ndo_fdb_add’)
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:2400:24: error: initialization of ‘int (*)(struct net_device *, struct nlmsghdr *, u16,  struct netlink_ext_ack *)’ {aka ‘int (*)(struct net_device *, struct nlmsghdr *, short unsigned int,  struct netlink_ext_ack *)’} from incompatible pointer type ‘int (*)(struct net_device *, struct nlmsghdr *, u16)’ {aka ‘int (*)(struct net_device *, struct nlmsghdr *, short unsigned int)’} [-Werror=incompatible-pointer-types]
  .ndo_bridge_setlink = igb_ndo_bridge_setlink,
                        ^~~~~~~~~~~~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:2400:24: note: (near initialization for ‘igb_netdev_ops.<anonymous>.ndo_bridge_setlink’)
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c: In function ‘igb_io_error_detected’:
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.c:9579:3: error: implicit declaration of function ‘pci_cleanup_aer_uncorrect_error_status’ [-Werror=implicit-function-declaration]
   pci_cleanup_aer_uncorrect_error_status(pdev);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:316: /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.o] Error 1
make[2]: *** [Makefile:1577: _module_/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod] Error 2
make[2]: Leaving directory '/usr/src/kernels/4.18.0-372.9.1.el8.x86_64'
make[1]: *** [Makefile:262: default] Error 2
make[1]: Leaving directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod'
make: *** [Makefile:13: kmod] Error 2
make: Leaving directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb'

That fails due to the -Wall flag to gcc, which can obviously be overrode by adding -Wno-incompatible-pointer-types and -Wno-implicit-function-declaration. Doing so leads to the next issue:

[user@hostname OpenAvnu-july]$ make -C lib/igb_avb/ kmod
make: Entering directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb'
make  subdir=kmod  -C kmod 
make[1]: Entering directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod'
make -C /lib/modules/4.18.0-372.9.1.el8.x86_64/build SUBDIRS=/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod modules
make[2]: Entering directory '/usr/src/kernels/4.18.0-372.9.1.el8.x86_64'
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_main.o
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_82575.o
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_i210.o
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_mac.o
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_nvm.o
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_phy.o
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_phy.c: In function ‘e1000_read_phy_reg_mphy’:
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_phy.c:3294:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (locked)
  ^~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_phy.c:3296:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   if (!ready)
   ^~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_phy.c: In function ‘e1000_write_phy_reg_mphy’:
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_phy.c:3359:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (locked)
  ^~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_phy.c:3361:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   if (!ready)
   ^~
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/e1000_manage.o
  CC [M]  /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.o
In file included from ./include/linux/kernel.h:14,
                 from ./include/linux/list.h:9,
                 from ./include/linux/timer.h:5,
                 from ./include/linux/netdevice.h:28,
                 from /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.c:26:
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.c: In function ‘igb_check_options’:
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/kcompat.h:273:27: error: ‘smp_num_cpus’ undeclared (first use in this function); did you mean ‘setup_max_cpus’?
 #define num_online_cpus() smp_num_cpus
                           ^~~~~~~~~~~~
./include/linux/minmax.h:18:39: note: in definition of macro ‘__typecheck’
  (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                                       ^
./include/linux/minmax.h:42:24: note: in expansion of macro ‘__safe_cmp’
  __builtin_choose_expr(__safe_cmp(x, y), \
                        ^~~~~~~~~~
./include/linux/minmax.h:110:27: note: in expansion of macro ‘__careful_cmp’
 #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
                           ^~~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.c:647:27: note: in expansion of macro ‘min_t’
     adapter->rss_queues = min_t(u32, opt.arg.r.max,
                           ^~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.c:648:12: note: in expansion of macro ‘num_online_cpus’
            num_online_cpus());
            ^~~~~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/kcompat.h:273:27: note: each undeclared identifier is reported only once for each function it appears in
 #define num_online_cpus() smp_num_cpus
                           ^~~~~~~~~~~~
./include/linux/minmax.h:18:39: note: in definition of macro ‘__typecheck’
  (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                                       ^
./include/linux/minmax.h:42:24: note: in expansion of macro ‘__safe_cmp’
  __builtin_choose_expr(__safe_cmp(x, y), \
                        ^~~~~~~~~~
./include/linux/minmax.h:110:27: note: in expansion of macro ‘__careful_cmp’
 #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
                           ^~~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.c:647:27: note: in expansion of macro ‘min_t’
     adapter->rss_queues = min_t(u32, opt.arg.r.max,
                           ^~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.c:648:12: note: in expansion of macro ‘num_online_cpus’
            num_online_cpus());
            ^~~~~~~~~~~~~~~
./include/linux/minmax.h:42:2: error: first argument to ‘__builtin_choose_expr’ not a constant
  __builtin_choose_expr(__safe_cmp(x, y), \
  ^~~~~~~~~~~~~~~~~~~~~
./include/linux/minmax.h:110:27: note: in expansion of macro ‘__careful_cmp’
 #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
                           ^~~~~~~~~~~~~
/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.c:647:27: note: in expansion of macro ‘min_t’
     adapter->rss_queues = min_t(u32, opt.arg.r.max,
                           ^~~~~
make[3]: *** [scripts/Makefile.build:316: /home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod/igb_param.o] Error 1
make[2]: *** [Makefile:1577: _module_/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod] Error 2
make[2]: Leaving directory '/usr/src/kernels/4.18.0-372.9.1.el8.x86_64'
make[1]: *** [Makefile:262: default] Error 2
make[1]: Leaving directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb/kmod'
make: *** [Makefile:13: kmod] Error 2
make: Leaving directory '/home/user/Tools/openavb/OpenAvnu-july/lib/igb_avb'

At this point it becomes pretty obvious that this doesn't compile without some source changes / assistance. I have done that and can actually get it to compile (e.g., filling in a value for smp_num_cpus, adding NULL to a function call that has an extra parameter now, removing a declared but not defined function).

Once doing that I can unload the igb kernel module and load the igb_avb one but once there is any connection or negotation (at the Ethernet level, not AVB traffic, just normal networking) there is a kernel panic. I can post the kernel panic, but it seems that the first question is to get the complication to work (the right way, not my hacks).

Has anyone successfully compiled and used the igb_avb driver on Fedora / RedHat (RHEL) / Rocky / CentOS 8 systems?

Thank you in advance.

Question about strange indentation in e1000_phy.c

In kmod/e1000_phy.c, lines 3294-3300, it seems that parenthesis are missing:

        if (locked) **{**
                ready = e1000_is_mphy_ready(hw);
                if (!ready)
                        return -E1000_ERR_PHY;
                E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, E1000_MPHY_DIS_ACCESS);
          **}**

Is that the case?

igb_avb won't connect to my nic

Hello,

I have a problem when trying to use my I210 nic with the igb_avb driver. When i run rmmod igb and insmod igb_avb my NIC interface becomes UNCLAIMED.
Terminal logs:
ubuntu@ubuntu-All-Series:~/Desktop/igb_avb/kmod$ lshw -class network
WARNING: you should run this program as super-user.
*-network UNCLAIMED
description: Ethernet controller
product: I210 Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: cap_list
configuration: latency=0
resources: memory:f7d00000-f7dfffff memory:f7e00000-f7e03fff memory:f7c00000-f7cfffff

My kernel is 5.13.0-44-generic. Any help on the matter would be apretiated. I was trying to compile the OpenAvnu and gptp and try the simple listener/talker examples and later maybe a live stream video audio with multiple pcs.

igb_receive, more then one packet at one function call

API:
int igb_receive(device_t *dev, unsigned int queue_index,
struct igb_packet **received_packets, u_int32_t *count);

Question: Is it possible to receive more then one packet at once?, e.g.
count = 8, count = 16
The example "simple_rx" shows only one packet.
If possible, an code example would be very helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.