kernel_optimize_test/net/ipv4
YOSHIFUJI Hideaki / 吉藤英明 6752c8db8e firewire net, ipv4 arp: Extend hardware address and remove driver-level packet inspection.
Inspection of upper layer protocol is considered harmful, especially
if it is about ARP or other stateful upper layer protocol; driver
cannot (and should not) have full state of them.

IPv4 over Firewire module used to inspect ARP (both in sending path
and in receiving path), and record peer's GUID, max packet size, max
speed and fifo address.  This patch removes such inspection by extending
our "hardware address" definition to include other information as well:
max packet size, max speed and fifo.  By doing this, The neighbour
module in networking subsystem can cache them.

Note: As we have started ignoring sspd and max_rec in ARP/NDP, those
      information will not be used in the driver when sending.

When a packet is being sent, the IP layer fills our pseudo header with
the extended "hardware address", including GUID and fifo.  The driver
can look-up node-id (the real but rather volatile low-level address)
by GUID, and then the module can send the packet to the wire using
parameters provided in the extendedn hardware address.

This approach is realistic because IP over IEEE1394 (RFC2734) and IPv6
over IEEE1394 (RFC3146) share same "hardware address" format
in their address resolution protocols.

Here, extended "hardware address" is defined as follows:

union fwnet_hwaddr {
	u8 u[16];
	struct {
		__be64 uniq_id;		/* EUI-64			*/
		u8 max_rec;		/* max packet size		*/
		u8 sspd;		/* max speed			*/
		__be16 fifo_hi;		/* hi 16bits of FIFO addr	*/
		__be32 fifo_lo;		/* lo 32bits of FIFO addr	*/
	} __packed uc;
};

Note that Hardware address is declared as union, so that we can map full
IP address into this, when implementing MCAP (Multicast Cannel Allocation
Protocol) for IPv6, but IP and ARP subsystem do not need to know this
format in detail.

One difference between original ARP (RFC826) and 1394 ARP (RFC2734)
is that 1394 ARP Request/Reply do not contain the target hardware address
field (aka ar$tha).  This difference is handled in the ARP subsystem.

CC: Stephan Gatzka <stephan.gatzka@gmail.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-26 12:32:13 -04:00
..
netfilter Merge branch 'master' of git://1984.lsi.us.es/nf-next 2013-03-25 12:11:44 -04:00
af_inet.c GRE: Refactor GRE tunneling code. 2013-03-26 12:27:18 -04:00
ah4.c
arp.c firewire net, ipv4 arp: Extend hardware address and remove driver-level packet inspection. 2013-03-26 12:32:13 -04:00
cipso_ipv4.c
datagram.c
devinet.c ipv4: provide addr and netconf dump consistency info 2013-03-24 17:16:29 -04:00
esp4.c
fib_frontend.c rtnetlink: Remove passing of attributes into rtnl_doit functions 2013-03-22 10:31:16 -04:00
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c
gre.c GRE: Refactor GRE tunneling code. 2013-03-26 12:27:18 -04:00
icmp.c
igmp.c
inet_connection_sock.c tcp: Remove TCPCT 2013-03-17 14:35:13 -04:00
inet_diag.c
inet_fragment.c inet: generalize ipv4-only RFC3168 5.3 ecn fragmentation handling for future use by ipv6 2013-03-24 17:16:30 -04:00
inet_hashtables.c
inet_lro.c ipv4: replace ip_fast_csum with csum_replace2 2013-03-15 09:12:25 -04:00
inet_timewait_sock.c
inetpeer.c
ip_forward.c
ip_fragment.c inet: generalize ipv4-only RFC3168 5.3 ecn fragmentation handling for future use by ipv6 2013-03-24 17:16:30 -04:00
ip_gre.c GRE: Refactor GRE tunneling code. 2013-03-26 12:27:18 -04:00
ip_input.c
ip_options.c
ip_output.c
ip_sockglue.c
ip_tunnel.c GRE: Refactor GRE tunneling code. 2013-03-26 12:27:18 -04:00
ip_vti.c Tunneling: use IP Tunnel stats APIs. 2013-03-26 12:27:19 -04:00
ipcomp.c
ipconfig.c ipconfig: Fix newline handling in log message. 2013-03-20 12:15:58 -04:00
ipip.c IPIP: Use ip-tunneling code. 2013-03-26 12:27:18 -04:00
ipmr.c GRE: Refactor GRE tunneling code. 2013-03-26 12:27:18 -04:00
Kconfig Tunneling: use IP Tunnel stats APIs. 2013-03-26 12:27:19 -04:00
Makefile GRE: Refactor GRE tunneling code. 2013-03-26 12:27:18 -04:00
netfilter.c
ping.c
proc.c
protocol.c
raw.c
route.c rtnetlink: Remove passing of attributes into rtnl_doit functions 2013-03-22 10:31:16 -04:00
syncookies.c tcp: Remove TCPCT 2013-03-17 14:35:13 -04:00
sysctl_net_ipv4.c tcp: refactor F-RTO 2013-03-21 11:47:50 -04:00
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_diag.c
tcp_fastopen.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: implement RFC5682 F-RTO 2013-03-21 11:47:51 -04:00
tcp_ipv4.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-03-20 12:46:26 -04:00
tcp_lp.c
tcp_memcontrol.c
tcp_metrics.c
tcp_minisocks.c tcp: refactor F-RTO 2013-03-21 11:47:50 -04:00
tcp_output.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-03-22 12:53:09 -04:00
tcp_probe.c
tcp_scalable.c
tcp_timer.c tcp: refactor F-RTO 2013-03-21 11:47:50 -04:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c tcp: refactor F-RTO 2013-03-21 11:47:50 -04:00
tcp_yeah.c
tcp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-03-20 12:46:26 -04:00
tunnel4.c
udp_diag.c
udp_impl.h
udp.c Revert "udp: increase inner ip header ID during segmentation" 2013-03-25 12:29:54 -04:00
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c
xfrm4_tunnel.c