All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] openvswitch: Use eth_mac_addr() instead of duplicating it
@ 2012-12-03 22:17 Thomas Graf
       [not found] ` <20121203221732.GA14494-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Graf @ 2012-12-03 22:17 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA


bonus: if we ever are to use IFF_LIVE_ADDR_CHANGE for
anything further than to check availability in eth_mac_addr(),
Open vSwitch will be ready for that.

Signed-off-by: Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org>
---
 net/openvswitch/vport-internal_dev.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
index 5d460c3..90816c7 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
@@ -63,17 +63,6 @@ static struct rtnl_link_stats64 *internal_dev_get_stats(struct net_device *netde
 	return stats;
 }
 
-static int internal_dev_mac_addr(struct net_device *dev, void *p)
-{
-	struct sockaddr *addr = p;
-
-	if (!is_valid_ether_addr(addr->sa_data))
-		return -EADDRNOTAVAIL;
-	dev->addr_assign_type &= ~NET_ADDR_RANDOM;
-	memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
-	return 0;
-}
-
 /* Called with rcu_read_lock_bh. */
 static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
 {
@@ -127,7 +116,7 @@ static const struct net_device_ops internal_dev_netdev_ops = {
 	.ndo_open = internal_dev_open,
 	.ndo_stop = internal_dev_stop,
 	.ndo_start_xmit = internal_dev_xmit,
-	.ndo_set_mac_address = internal_dev_mac_addr,
+	.ndo_set_mac_address = eth_mac_addr,
 	.ndo_change_mtu = internal_dev_change_mtu,
 	.ndo_get_stats64 = internal_dev_get_stats,
 };
@@ -139,6 +128,7 @@ static void do_setup(struct net_device *netdev)
 	netdev->netdev_ops = &internal_dev_netdev_ops;
 
 	netdev->priv_flags &= ~IFF_TX_SKB_SHARING;
+	netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
 	netdev->destructor = internal_dev_destructor;
 	SET_ETHTOOL_OPS(netdev, &internal_dev_ethtool_ops);
 	netdev->tx_queue_len = 0;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] openvswitch: Use eth_mac_addr() instead of duplicating it
       [not found] ` <20121203221732.GA14494-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
@ 2012-12-03 22:36   ` Jesse Gross
  2012-12-03 22:47     ` Thomas Graf
  2012-12-04 18:11   ` Jesse Gross
  1 sibling, 1 reply; 6+ messages in thread
From: Jesse Gross @ 2012-12-03 22:36 UTC (permalink / raw)
  To: Thomas Graf
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Mon, Dec 3, 2012 at 2:17 PM, Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org> wrote:
>
> bonus: if we ever are to use IFF_LIVE_ADDR_CHANGE for
> anything further than to check availability in eth_mac_addr(),
> Open vSwitch will be ready for that.
>
> Signed-off-by: Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org>

There's no need to send this patch twice (especially to a different
set of people).  I'm currently reviewing a large patchset that was
submitted before yours.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] openvswitch: Use eth_mac_addr() instead of duplicating it
  2012-12-03 22:36   ` Jesse Gross
@ 2012-12-03 22:47     ` Thomas Graf
       [not found]       ` <20121203224721.GC14494-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Graf @ 2012-12-03 22:47 UTC (permalink / raw)
  To: Jesse Gross; +Cc: davem, netdev, dev

On 12/03/12 at 02:36pm, Jesse Gross wrote:
> On Mon, Dec 3, 2012 at 2:17 PM, Thomas Graf <tgraf@suug.ch> wrote:
> >
> > bonus: if we ever are to use IFF_LIVE_ADDR_CHANGE for
> > anything further than to check availability in eth_mac_addr(),
> > Open vSwitch will be ready for that.
> >
> > Signed-off-by: Thomas Graf <tgraf@suug.ch>
> 
> There's no need to send this patch twice (especially to a different
> set of people).  I'm currently reviewing a large patchset that was
> submitted before yours.

It's a trivial patch, you seemed busy and we might as well make use
of the open net-next window. I see nothing wrong with that.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] openvswitch: Use eth_mac_addr() instead of duplicating it
       [not found]       ` <20121203224721.GC14494-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
@ 2012-12-03 22:55         ` Jesse Gross
  2012-12-03 23:16           ` Thomas Graf
  0 siblings, 1 reply; 6+ messages in thread
From: Jesse Gross @ 2012-12-03 22:55 UTC (permalink / raw)
  To: Thomas Graf
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Mon, Dec 3, 2012 at 2:47 PM, Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org> wrote:
> On 12/03/12 at 02:36pm, Jesse Gross wrote:
>> On Mon, Dec 3, 2012 at 2:17 PM, Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org> wrote:
>> >
>> > bonus: if we ever are to use IFF_LIVE_ADDR_CHANGE for
>> > anything further than to check availability in eth_mac_addr(),
>> > Open vSwitch will be ready for that.
>> >
>> > Signed-off-by: Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org>
>>
>> There's no need to send this patch twice (especially to a different
>> set of people).  I'm currently reviewing a large patchset that was
>> submitted before yours.
>
> It's a trivial patch, you seemed busy and we might as well make use
> of the open net-next window. I see nothing wrong with that.

If you send patches like this to two different trees then it will
result in merge conflicts later.  Please just wait a few days; as you
say, it's a trivial patch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] openvswitch: Use eth_mac_addr() instead of duplicating it
  2012-12-03 22:55         ` Jesse Gross
@ 2012-12-03 23:16           ` Thomas Graf
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Graf @ 2012-12-03 23:16 UTC (permalink / raw)
  To: Jesse Gross; +Cc: davem, netdev, dev

On 12/03/12 at 02:55pm, Jesse Gross wrote:
> If you send patches like this to two different trees then it will
> result in merge conflicts later.  Please just wait a few days; as you
> say, it's a trivial patch.

I CC'ed dev@openvswitch.org on both patch submissions as well so if
davem merges it you will know.

It's no the lack of response to this patch but the discontinuation
of discussion on the previous patchset without any reason that gave
me the impression of being ignored. When I feel ignored, I go
somehwere else.

Besides, it would have taken less time to just apply the patch than
to have this discussion.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] openvswitch: Use eth_mac_addr() instead of duplicating it
       [not found] ` <20121203221732.GA14494-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
  2012-12-03 22:36   ` Jesse Gross
@ 2012-12-04 18:11   ` Jesse Gross
  1 sibling, 0 replies; 6+ messages in thread
From: Jesse Gross @ 2012-12-04 18:11 UTC (permalink / raw)
  To: Thomas Graf
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
	davem-fT/PcQaiUtIeIZ0/mPfg9Q

On Mon, Dec 3, 2012 at 2:17 PM, Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org> wrote:
>
> bonus: if we ever are to use IFF_LIVE_ADDR_CHANGE for
> anything further than to check availability in eth_mac_addr(),
> Open vSwitch will be ready for that.
>
> Signed-off-by: Thomas Graf <tgraf-G/eBtMaohhA@public.gmane.org>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-04 18:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-03 22:17 [PATCH net-next] openvswitch: Use eth_mac_addr() instead of duplicating it Thomas Graf
     [not found] ` <20121203221732.GA14494-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2012-12-03 22:36   ` Jesse Gross
2012-12-03 22:47     ` Thomas Graf
     [not found]       ` <20121203224721.GC14494-FZi0V3Vbi30CUdFEqe4BF2D2FQJk+8+b@public.gmane.org>
2012-12-03 22:55         ` Jesse Gross
2012-12-03 23:16           ` Thomas Graf
2012-12-04 18:11   ` Jesse Gross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.