Re: [net-next-2.6 PATCH 7/8 RFC v2] macvtap: Add support to set MAC/VLAN filter rtnl link operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 18, 2011 at 11:26:30PM -0700, Roopa Prabhu wrote:
> From: Roopa Prabhu <roprabhu@xxxxxxxxx>
> 
> This patch adds support to set MAC and VLAN filter rtnl_link_ops
> on a macvtap interface. It adds support for set_rx_addr_filter and
> set_rx_vlan_filter rtnl link operations. These operations inturn call the
> equivalent operations defined in macvlan
> 
> Signed-off-by: Roopa Prabhu <roprabhu@xxxxxxxxx>
> Signed-off-by: Christian Benvenuti <benve@xxxxxxxxx>
> Signed-off-by: David Wang <dwang2@xxxxxxxxx>
> ---
>  drivers/net/macvtap.c |   22 ++++++++++++++++++----
>  1 files changed, 18 insertions(+), 4 deletions(-)
> 
> 
> diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
> index 3da5578..8a2cb59 100644
> --- a/drivers/net/macvtap.c
> +++ b/drivers/net/macvtap.c
> @@ -273,6 +273,18 @@ static int macvtap_receive(struct sk_buff *skb)
>  	return macvtap_forward(skb->dev, skb);
>  }
>  
> +static int macvtap_set_rx_addr_filter(struct net_device *dev,
> +	struct nlattr *tb[])
> +{
> +	return macvlan_set_rx_addr_filter(dev, tb);
> +}
> +
> +static int macvtap_set_rx_vlan_filter(struct net_device *dev,
> +	struct nlattr *tb[])
> +{
> +	return macvlan_set_rx_vlan_filter(dev, tb);
> +}
> +
>  static int macvtap_newlink(struct net *src_net,
>  			   struct net_device *dev,
>  			   struct nlattr *tb[],


Can use macvlanXXX directly here? Why wrap it?

> @@ -317,10 +329,12 @@ static void macvtap_setup(struct net_device *dev)
>  }
>  
>  static struct rtnl_link_ops macvtap_link_ops __read_mostly = {
> -	.kind		= "macvtap",
> -	.setup		= macvtap_setup,
> -	.newlink	= macvtap_newlink,
> -	.dellink	= macvtap_dellink,
> +	.kind				= "macvtap",
> +	.setup				= macvtap_setup,
> +	.newlink			= macvtap_newlink,
> +	.dellink			= macvtap_dellink,
> +	.set_rx_addr_filter		= macvtap_set_rx_addr_filter,
> +	.set_rx_vlan_filter		= macvtap_set_rx_vlan_filter,
>  };
>  
>  
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux