RE: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode

2015-02-24 Thread Hiroshi Shimamoto
> >-Original Message-
> >From: Hiroshi Shimamoto [mailto:h-shimam...@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 
> >
> >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 
> >Reviewed-by: Hayato Momma 
> >CC: Choi, Sy Jong 
> 
> 
> 
> +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 = >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;
> +}

thank you for pointing it.
I realized it and am preparing a patch.

thanks,
Hiroshi


RE: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode

2015-02-24 Thread Tantilov, Emil S
>-Original Message-
>From: Hiroshi Shimamoto [mailto:h-shimam...@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 
>
>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 
>Reviewed-by: Hayato Momma 
>CC: Choi, Sy Jong 



+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 = >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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode

2015-02-24 Thread Tantilov, Emil S
-Original Message-
From: Hiroshi Shimamoto [mailto:h-shimam...@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-shimam...@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-shimam...@ct.jp.nec.com
Reviewed-by: Hayato Momma h-mo...@ce.jp.nec.com
CC: Choi, Sy Jong sy.jong.c...@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [E1000-devel] [PATCH v2 3/3] ixgbe: Add new ndo to allow VF multicast promiscuous mode

2015-02-24 Thread Hiroshi Shimamoto
 -Original Message-
 From: Hiroshi Shimamoto [mailto:h-shimam...@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-shimam...@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-shimam...@ct.jp.nec.com
 Reviewed-by: Hayato Momma h-mo...@ce.jp.nec.com
 CC: Choi, Sy Jong sy.jong.c...@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;
 +}

thank you for pointing it.
I realized it and am preparing a patch.

thanks,
Hiroshi