[ovs-dev] [RFC net-next 12/22] arp: Inherit metadata dst when creating ARP requests
Sergei Shtylyov
sergei.shtylyov at cogentembedded.com
Fri Jul 10 18:55:52 UTC 2015
On 07/10/2015 05:19 PM, Thomas Graf wrote:
> If output device wants to see the dst, inherit the dst of the
> original skb and pass it on to generate the ARP request.
> Signed-off-by: Thomas Graf <tgraf at suug.ch>
> ---
> net/ipv4/arp.c | 71 +++++++++++++++++++++++++++++++++++-----------------------
> 1 file changed, 43 insertions(+), 28 deletions(-)
> diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
> index 933a928..3400aea 100644
> --- a/net/ipv4/arp.c
> +++ b/net/ipv4/arp.c
> @@ -291,6 +291,46 @@ static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)
> kfree_skb(skb);
> }
>
> +/*
> + * Create and send an arp packet.
> + */
> +static void arp_send_dst(int type, int ptype, __be32 dest_ip,
> + struct net_device *dev, __be32 src_ip,
> + const unsigned char *dest_hw,
> + const unsigned char *src_hw,
> + const unsigned char *target_hw, struct sk_buff *oskb)
> +{
> + struct sk_buff *skb;
> +
> + /*
> + * No arp on this interface.
> + */
The networking code, we do multi-line comments this way:
/* bla
* bla
*/
> +
> + if (dev->flags&IFF_NOARP)
Please surround & with spaces.
[...]
> @@ -597,32 +638,6 @@ void arp_xmit(struct sk_buff *skb)
> EXPORT_SYMBOL(arp_xmit);
>
> /*
> - * Create and send an arp packet.
> - */
> -void arp_send(int type, int ptype, __be32 dest_ip,
> - struct net_device *dev, __be32 src_ip,
> - const unsigned char *dest_hw, const unsigned char *src_hw,
> - const unsigned char *target_hw)
> -{
> - struct sk_buff *skb;
> -
> - /*
> - * No arp on this interface.
> - */
> -
> - if (dev->flags&IFF_NOARP)
> - return;
Ah, you're moving the code...
[...]
WBR, Sergei
More information about the dev
mailing list