netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net_failover: get rid of the limitaion receive packet from standy dev when primary exist
@ 2019-08-30  5:07 wenxu
  2019-09-02 18:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: wenxu @ 2019-08-30  5:07 UTC (permalink / raw)
  To: sridhar.samudrala; +Cc: netdev, davem

From: wenxu <wenxu@ucloud.cn>

For receive side the standby, primary and failover is the same one,
If the packet receive from standby or primary should can be deliver
to failover dev.

For example: there are VF and virtio device failover together.
When live migration the VF detached and send/recv packet through
virtio device. When VF attached again some ingress traffic may
receive from virtio device for cache reason(TC flower offload in
sw mode).

Signed-off-by: wenxu <wenxu@ucloud.cn>
---
 drivers/net/net_failover.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/net_failover.c b/drivers/net/net_failover.c
index b16a122..da3beb5 100644
--- a/drivers/net/net_failover.c
+++ b/drivers/net/net_failover.c
@@ -362,14 +362,6 @@ static rx_handler_result_t net_failover_handle_frame(struct sk_buff **pskb)
 {
 	struct sk_buff *skb = *pskb;
 	struct net_device *dev = rcu_dereference(skb->dev->rx_handler_data);
-	struct net_failover_info *nfo_info = netdev_priv(dev);
-	struct net_device *primary_dev, *standby_dev;
-
-	primary_dev = rcu_dereference(nfo_info->primary_dev);
-	standby_dev = rcu_dereference(nfo_info->standby_dev);
-
-	if (primary_dev && skb->dev == standby_dev)
-		return RX_HANDLER_EXACT;
 
 	skb->dev = dev;
 
-- 
1.8.3.1


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

* Re: [PATCH net-next] net_failover: get rid of the limitaion receive packet from standy dev when primary exist
  2019-08-30  5:07 [PATCH net-next] net_failover: get rid of the limitaion receive packet from standy dev when primary exist wenxu
@ 2019-09-02 18:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-09-02 18:42 UTC (permalink / raw)
  To: wenxu; +Cc: sridhar.samudrala, netdev

From: wenxu@ucloud.cn
Date: Fri, 30 Aug 2019 13:07:48 +0800

> From: wenxu <wenxu@ucloud.cn>
> 
> For receive side the standby, primary and failover is the same one,
> If the packet receive from standby or primary should can be deliver
> to failover dev.
> 
> For example: there are VF and virtio device failover together.
> When live migration the VF detached and send/recv packet through
> virtio device. When VF attached again some ingress traffic may
> receive from virtio device for cache reason(TC flower offload in
> sw mode).
> 
> Signed-off-by: wenxu <wenxu@ucloud.cn>

I don't understand, the device logic guarding the device rewriting in
this handler looks very much intentional.

After your changes we have no logic at all, we just unconditionally
always rewrite.


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

end of thread, other threads:[~2019-09-02 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30  5:07 [PATCH net-next] net_failover: get rid of the limitaion receive packet from standy dev when primary exist wenxu
2019-09-02 18:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).