lkml.org 
[lkml]   [2015]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode
Date
>-----Original Message-----
>From: Hiroshi Shimamoto [mailto:h-shimamoto@ct.jp.nec.com]
>Sent: Thursday, February 19, 2015 5:01 PM
> Subject: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode
>
>From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>
>Implements the new netdev op to allow VF multicast promiscuous mode.
>
>The administrator can allow to VF multicast promiscuous mode for only
>trusted VM. After allowing multicast promiscuous mode from the host,
>we can use over 30 IPv6 addresses on VM.
> # ./ip link set dev eth0 vf 1 mc_promisc on
>
>When disallowing multicast promiscuous mode, we can only use 30 IPv6 addresses.
> # ./ip link set dev eth0 vf 1 mc_promisc off
>
>Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>Reviewed-by: Hayato Momma <h-momma@ce.jp.nec.com>
>CC: Choi, Sy Jong <sy.jong.choi@intel.com>

<snip>

+int ixgbe_ndo_set_vf_mc_promisc(struct net_device *netdev, int vf, bool setting)
+{
+ struct ixgbe_adapter *adapter = netdev_priv(netdev);
+ struct ixgbe_hw *hw = &adapter->hw;
+ u32 vmolr;

vmolr is unused variable in this function.

+
+ if (vf >= adapter->num_vfs)
+ return -EINVAL;
+
+ /* nothing to do */
+ if (adapter->vfinfo[vf].mc_promisc_allowed == setting)
+ return 0;
+
+ adapter->vfinfo[vf].mc_promisc_allowed = setting;
+
+ /* if VF requests multicast promiscuous */
+ if (adapter->vfinfo[vf].mc_promisc) {
+ if (setting)
+ ixgbe_enable_vf_mc_promisc(adapter, vf);
+ else
+ ixgbe_disable_vf_mc_promisc(adapter, vf);
+ }
+
+ return 0;
+}

Thanks,
Emil



\
 
 \ /
  Last update: 2015-02-24 21:41    [W:1.086 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site