Subject: Re: [RFC PATCH 6/6] ipv6: IPv6 over IEEE1394 (RFC3146) support.

From: YOSHIFUJI Hideaki <[email-masked]>
Date: Sun, 13 Jan 2013 01:39:43 +0900

Stefan Richter wrote:
> On Jan 12 YOSHIFUJI Hideaki wrote:

>>  static struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur,
>> @@ -366,6 +395,19 @@ static void pndisc_destructor(struct pneigh_entry *n)
>>  	ipv6_dev_mc_dec(dev, &maddr);
>>  }
>>  
>> +void ndisc_update_peerinfo(struct net_device *dev, void *lladdr)
>> +{
>> +#if defined(CONFIG_FIREWIRE_NET)
>> +	switch (dev->type) {
>> +	case ARPHRD_IEEE1394:
>> +		fwnet_update_peerinfo(dev, lladdr, (struct fwnet_peerinfo *)((__u64 *)lladdr + 1));
>> +		break;
>> +	default:
>> +		break;
>> +	}
>> +#endif
> [...]
> 
> Dito, please do not solve this with an EXPORT from drivers/firewire/net.c.
> 
> Either a new driver callback is required, and the function pointer to this
> callback needs to be reachable indirectly via the skb pointer.
> 
> Or drivers/firewire/net.c needs to be aware that it just received an NDP
> packet, and then call a parser function in net/ipv6/ndisc.c which returns
> the data that drivers/firewire/net.c wants to know.

How about putting EUI64, maxrec, sspd and fifo in dev->dev_addr?
This enable us to send NDISC/ARP packet easily (based on neighbor
cache entry), and driver can be notified for new neighbors (thus
new peers). Driver can manage peer information based on this
notification.

Note that notification mechanism is used in Chelsio cxgbe4
driver, for example.

It requires some further modification to driver itself, but I
guess we do not need any exports with this, and I guess most
of most of arp related code can be removed from the driver.

--yoshfuji