cnplab / xennet

Xen optimizations for fast packet I/O
Other
11 stars 7 forks source link

Failed Hunk: LINUX/xen-netback/interface.c.rej #10

Closed wenhuizhang closed 8 years ago

wenhuizhang commented 8 years ago

wenhui@nimbnode34:~/xennet/LINUX$ make KSRC=/home/wenhui/xennet/linux-3.16.0 prepare
rm -rf xen-netback/ xen-netfront/
cp -aR /home/wenhui/xennet/linux-3.16.0/drivers/net/xen-netback .
mkdir -p xen-netfront
cp -aR /home/wenhui/xennet/linux-3.16.0/drivers/net/xen-netfront.c xen-netfront
(cd .. ; \
    for i in diff--xen-netback--30f00--99999 diff--xen-netfront--30e00--99999 ; \
    do patch -p1 < LINUX/patches/$i; \
    done ; cd -);
patching file LINUX/xen-netback/common.h
Hunk #1 succeeded at 197 with fuzz 2 (offset 98 lines).
Hunk #2 FAILED at 193.
1 out of 2 hunks FAILED -- saving rejects to file LINUX/xen-netback/common.h.rej
patching file LINUX/xen-netback/common.h.orig
patching file LINUX/xen-netback/interface.c
Hunk #2 FAILED at 55.
Hunk #3 FAILED at 89.
Hunk #4 FAILED at 170.
Hunk #5 FAILED at 179.
Hunk #6 succeeded at 471 (offset 53 lines).
Hunk #7 FAILED at 440.
Hunk #8 FAILED at 479.
Hunk #9 succeeded at 724 with fuzz 2 (offset 117 lines).
6 out of 9 hunks FAILED -- saving rejects to file LINUX/xen-netback/interface.c.rej
patching file LINUX/xen-netback/interface.c.orig
The next patch would create the file LINUX/xen-netback/interface.c.rej,
which already exists!  Assume -R? [n] y
patching file LINUX/xen-netback/interface.c.rej
Hunk #1 FAILED at 1.
File LINUX/xen-netback/interface.c.rej is not empty after patch; not deleting
1 out of 1 hunk FAILED -- saving rejects to file LINUX/xen-netback/interface.c.rej.rej
patching file LINUX/xen-netback/xenbus.c
Hunk #1 succeeded at 98 (offset 7 lines).
Hunk #2 FAILED at 527.
Hunk #3 succeeded at 694 with fuzz 2 (offset 141 lines).
Hunk #4 FAILED at 631.
2 out of 4 hunks FAILED -- saving rejects to file LINUX/xen-netback/xenbus.c.rej
patching file LINUX/xen-netfront/xen-netfront.c
Hunk #1 succeeded at 158 with fuzz 2 (offset 77 lines).
Hunk #2 succeeded at 179 (offset 35 lines).
Hunk #3 succeeded at 1590 with fuzz 2 (offset 105 lines).
Hunk #4 succeeded at 2029 with fuzz 2 (offset 399 lines).
Hunk #5 succeeded at 2049 with fuzz 2 (offset 399 lines).
Hunk #6 succeeded at 2150 (offset 418 lines).
Hunk #7 succeeded at 2392 (offset 449 lines).
/home/wenhui/xennet/LINUX
(cd /home/wenhui/xennet/netmap ;\
    git reset --hard ;\
    patch -p1 < ../LINUX/patches/0001-ixgbe-driver-support-for-XEN_PV-IOMMU-cases.patch ;\
    patch -p1 < ../LINUX/patches/0002-Expose-bridge-txsync-rxsync-functions.patch ;\
    cd LINUX ;\
    rm -rf patches/diff--virtio_net.c--30b00--99999 ;\
    export KSRC=/home/wenhui/xennet/linux-3.16.0;\
    make -j1 DESTDIR= get-drivers;\
    cd /home/wenhui/xennet/netmap;)
HEAD is now at 3ccdada remove trailing whitespace
patching file LINUX/forcedeth_netmap.h
patching file LINUX/ixgbe_netmap_linux.h
Hunk #1 succeeded at 179 (offset 1 line).
Hunk #2 succeeded at 353 (offset 2 lines).
Hunk #3 succeeded at 399 (offset 2 lines).
Hunk #4 succeeded at 409 (offset 2 lines).
Hunk #5 succeeded at 471 (offset 2 lines).
patching file sys/dev/netmap/netmap_kern.h
Hunk #1 succeeded at 1101 (offset 80 lines).
patching file sys/dev/netmap/netmap_vale.c
make[1]: Entering directory `/home/wenhui/xennet/netmap/LINUX'
make[1]: `get-drivers' is up to date.
make[1]: Leaving directory `/home/wenhui/xennet/netmap/LINUX'
#cp ../LINUX/ixgbe/ixgbe.h LINUX/ixgbe/ixgbe.h)
wenhui@nimbnode34:~/xennet/LINUX$ make KSRC=/home/wenhui/xennet/linux-3.16.0 
(cd /home/wenhui/xennet/netmap/LINUX && \
        export KSRC=/home/wenhui/xennet/linux-3.16.0 && \
        make -j1 DESTDIR= )
make[1]: Entering directory `/home/wenhui/xennet/netmap/LINUX'
make -C /home/wenhui/xennet/linux-3.16.0 M=/home/wenhui/xennet/netmap/LINUX CONFIG_NETMAP=m CONFIG_E1000=m CONFIG_E1000E=m CONFIG_IXGBE=m CONFIG_IGB=m CONFIG_BNX2X=m CONFIG_MLX4=m CONFIG_VIRTIO_NET=m \
        EXTRA_CFLAGS='-I/home/wenhui/xennet/netmap/LINUX -I/home/wenhui/xennet/netmap/LINUX/../sys -I/home/wenhui/xennet/netmap/LINUX/../sys/dev -DCONFIG_NETMAP -Wno-unused-but-set-variable'          \
        O_DRIVERS="e1000/ e1000e/ forcedeth.o igb/ ixgbe/" modules
make[2]: Entering directory `/home/wenhui/xennet/linux-3.16.0'

  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /home/wenhui/xennet/netmap/LINUX/netmap.o
In file included from /home/wenhui/xennet/netmap/LINUX/../sys/dev/netmap/netmap.c:187:0:
/home/wenhui/xennet/netmap/LINUX/../sys/dev/netmap/netmap_kern.h: In function ‘nm_set_native_flags’:
/home/wenhui/xennet/netmap/LINUX/../sys/dev/netmap/netmap_kern.h:792:2: error: implicit declaration of function ‘SET_ETHTOOL_OPS’ [-Werror=implicit-function-declaration]
  SET_ETHTOOL_OPS(ifp, &((struct netmap_hw_adapter*)na)->nm_eto);
  ^
cc1: some warnings being treated as errors
make[3]: *** [/home/wenhui/xennet/netmap/LINUX/netmap.o] Error 1
make[2]: *** [_module_/home/wenhui/xennet/netmap/LINUX] Error 2
make[2]: Leaving directory `/home/wenhui/xennet/linux-3.16.0'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/wenhui/xennet/netmap/LINUX'
make: *** [/home/wenhui/xennet/netmap/LINUX/Module.symvers] Error 2
fmanco commented 8 years ago

Hi

Linux 3.16 doesn't work, please use 3.6.

wenhuizhang commented 8 years ago

Thanks Fillipe, yep "#define SET_ETHTOOL_OPS(netdev,ops) ( (netdev)->ethtool_ops = (ops) ) was removed in kernel 3.16" . That is probably what happened, pls correct me if I made it wrong.

fmanco commented 8 years ago

On top of that the patches don't cleanly apply on versions higher than 3.6.

wenhuizhang commented 8 years ago

Okay, thanks that makes sense~