ia64/xen-unstable

changeset 3769:ce135fa88699

bitkeeper revision 1.1159.258.1 (420b963fGDqQqmlp_DO3u-T_klF82g)

Fixes to make the vnet module compile under 2.6.10.
Thanks to Brian Bruce for spotting the problem and
suggesting fixes.

Signed-off-by: Mike Wray <mike.wray@hp.com>
author mjw@wray-m-3.hpl.hp.com
date Thu Feb 10 17:13:35 2005 +0000 (2005-02-10)
parents 9376fcbfd5a0
children 2ba061595230 fb3675bdcce5
files .rootkeys tools/vnet/00INSTALL tools/vnet/Makefile tools/vnet/vnet-module/if_varp.h tools/vnet/vnet-module/varp.c
line diff
     1.1 --- a/.rootkeys	Wed Feb 09 19:44:49 2005 +0000
     1.2 +++ b/.rootkeys	Thu Feb 10 17:13:35 2005 +0000
     1.3 @@ -555,6 +555,7 @@ 4104ffca-jPHLVOrW0n0VghEXXtKxg tools/sv/
     1.4  40fcefb3yMSrZvApO9ToIi-iQwnchA tools/sv/images/xen.png
     1.5  41013a83z27rKvWIxAfUBMVZ1eDCDg tools/sv/inc/script.js
     1.6  40fcefb3zGC9XNBkSwTEobCoq8YClA tools/sv/inc/style.css
     1.7 +420b963dK3yGNtqxRM8npGZtrCQd1g tools/vnet/00INSTALL
     1.8  41a21888_WlknVWjSxb32Fo13_ujsw tools/vnet/00README
     1.9  41a21888bOiOJc7blzRbe4MNJoaYTw tools/vnet/Makefile
    1.10  41a21888mg2k5HeiVjlQYEtJBZT4Qg tools/vnet/doc/vnet-module.txt
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/vnet/00INSTALL	Thu Feb 10 17:13:35 2005 +0000
     2.3 @@ -0,0 +1,31 @@
     2.4 +
     2.5 +To compile and install run "make install"; if it fails or you need to reinstall 
     2.6 +run "make clean" first or the build will fail, at least that is what I have 
     2.7 +found under 2.6.10.
     2.8 +
     2.9 +Other important items:
    2.10 +1)	You will need to have your xen0 kernel compiled with HMAC_SUPPORT 
    2.11 +	2.6.x = (MAIN MENU: Cryptographic Options -> HMAC Support)
    2.12 +	BEFORE running "make install".
    2.13 +
    2.14 +2)	You will want at least some of the other alogorithms listed under
    2.15 +	"Cryptographic Options" for the kernel compiled as modules.
    2.16 +
    2.17 +3)	You will want the networking IPsec/VLAN options compiled in as modules
    2.18 +	2.6.x = (MAIN MENU: Device Drivers -> Networking Support -> 
    2.19 +				Networking Options ->
    2.20 +					IP: AH transformation
    2.21 +					IP: ESP transformation
    2.22 +					IP: IPComp transformation 
    2.23 +					IP: tunnel transformation
    2.24 +
    2.25 +					IPsec user configuration interface
    2.26 +	
    2.27 +					802.1Q VLAN Support
    2.28 +
    2.29 +4)	The module (vnet_module) will not properly load from the command line
    2.30 +	with a "modprobe vnet_module".  Use network-vnet to properly configure
    2.31 +	your system and load the module for you.
    2.32 +
    2.33 +Please refer to the additional documentation found in tools/vnet/doc for
    2.34 +proper syntax and config file parameters.
     3.1 --- a/tools/vnet/Makefile	Wed Feb 09 19:44:49 2005 +0000
     3.2 +++ b/tools/vnet/Makefile	Thu Feb 10 17:13:35 2005 +0000
     3.3 @@ -20,10 +20,10 @@ gc: gc.tar.gz
     3.4  	tar xfz gc.tar.gz
     3.5  	ln -sf gc?.? gc
     3.6  
     3.7 -gc/Makefile:
     3.8 -	(cd gc && ./configure --prefix=`pwd`/install)
     3.9 +gc/.configure-makefile:
    3.10 +	(cd gc && ./configure --prefix=`pwd`/install && touch .configure-makefile)
    3.11  
    3.12 -gc-install: gc gc/Makefile
    3.13 +gc-install: gc gc/.configure-makefile
    3.14  	make -C gc
    3.15  	make -C gc install
    3.16  
     4.1 --- a/tools/vnet/vnet-module/if_varp.h	Wed Feb 09 19:44:49 2005 +0000
     4.2 +++ b/tools/vnet/vnet-module/if_varp.h	Thu Feb 10 17:13:35 2005 +0000
     4.3 @@ -36,7 +36,7 @@ typedef struct VnetMsgHdr {
     4.4  } __attribute__((packed)) VnetMsgHdr;
     4.5  
     4.6  typedef struct VarpHdr {
     4.7 -    VnetMsgHdr;
     4.8 +    VnetMsgHdr hdr;
     4.9      uint32_t vnet;
    4.10      Vmac vmac;
    4.11      uint32_t addr;
     5.1 --- a/tools/vnet/vnet-module/varp.c	Wed Feb 09 19:44:49 2005 +0000
     5.2 +++ b/tools/vnet/vnet-module/varp.c	Thu Feb 10 17:13:35 2005 +0000
     5.3 @@ -368,8 +368,8 @@ int varp_send(u16 opcode, struct net_dev
     5.4      // Varp header.
     5.5      varph = (void*)skb_put(skbout, varp_n);
     5.6      *varph = (VarpHdr){};
     5.7 -    varph->id                = htons(VARP_ID);
     5.8 -    varph->opcode            = htons(opcode);
     5.9 +    varph->hdr.id            = htons(VARP_ID);
    5.10 +    varph->hdr.opcode        = htons(opcode);
    5.11      varph->vnet              = htonl(vnet);
    5.12      varph->vmac              = *vmac;
    5.13      varph->addr              = saddr;
    5.14 @@ -1076,9 +1076,9 @@ int varp_handle_message(struct sk_buff *
    5.15          goto exit;
    5.16      }
    5.17      mine = 1;
    5.18 -    if(varph->id != htons(VARP_ID)){
    5.19 +    if(varph->hdr.id != htons(VARP_ID)){
    5.20          // It's not varp at all - ignore it.
    5.21 -        wprintf("> Unknown id: %d \n", ntohs(varph->id));
    5.22 +        wprintf("> Unknown id: %d \n", ntohs(varph->hdr.id));
    5.23          goto exit;
    5.24      }
    5.25      if(1){
    5.26 @@ -1086,13 +1086,13 @@ int varp_handle_message(struct sk_buff *
    5.27                  NIPQUAD(skb->nh.iph->saddr), NIPQUAD(skb->nh.iph->daddr));
    5.28          dprintf("> sport=%u dport=%u\n", ntohs(skb->h.uh->source), ntohs(skb->h.uh->dest));
    5.29          dprintf("> opcode=%d vnet=%u vmac=" MACFMT " addr=" IPFMT "\n",
    5.30 -                ntohs(varph->opcode),
    5.31 +                ntohs(varph->hdr.opcode),
    5.32                  ntohl(varph->vnet),
    5.33                  MAC6TUPLE(varph->vmac.mac),
    5.34                  NIPQUAD(varph->addr));
    5.35          varp_dprint();
    5.36      }
    5.37 -    switch(ntohs(varph->opcode)){
    5.38 +    switch(ntohs(varph->hdr.opcode)){
    5.39      case VARP_OP_REQUEST:
    5.40          err = varp_handle_request(skb, varph);
    5.41          break;
    5.42 @@ -1100,7 +1100,7 @@ int varp_handle_message(struct sk_buff *
    5.43          err = varp_handle_announce(skb, varph);
    5.44          break;
    5.45      default:
    5.46 -        wprintf("> Unknown opcode: %d \n", ntohs(varph->opcode));
    5.47 +        wprintf("> Unknown opcode: %d \n", ntohs(varph->hdr.opcode));
    5.48         break;
    5.49      }
    5.50    exit: