lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 May 2018 08:40:58 -0700
From:   "Samudrala, Sridhar" <sridhar.samudrala@...el.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     mst@...hat.com, davem@...emloft.net, netdev@...r.kernel.org,
        virtualization@...ts.linux-foundation.org,
        virtio-dev@...ts.oasis-open.org, jesse.brandeburg@...el.com,
        alexander.h.duyck@...el.com, kubakici@...pl, jasowang@...hat.com,
        loseweigh@...il.com, jiri@...nulli.us, aaron.f.brown@...el.com
Subject: Re: [PATCH net-next v10 2/4] net: Introduce generic failover module

On 5/7/2018 4:46 PM, Stephen Hemminger wrote:
> On Mon,  7 May 2018 15:10:44 -0700
> Sridhar Samudrala <sridhar.samudrala@...el.com> wrote:
>
>> This provides a generic interface for paravirtual drivers to listen
>> for netdev register/unregister/link change events from pci ethernet
>> devices with the same MAC and takeover their datapath. The notifier and
>> event handling code is based on the existing netvsc implementation.
>>
>> It exposes 2 sets of interfaces to the paravirtual drivers.
>> 1. For paravirtual drivers like virtio_net that use 3 netdev model, the
>>     the failover module provides interfaces to create/destroy additional
>>     master netdev and all the slave events are managed internally.
>>            net_failover_create()
>>            net_failover_destroy()
>>     A failover netdev is created that acts a master device and controls 2
>>     slave devices. The original virtio_net netdev is registered as 'standby'
>>     netdev and a passthru/vf device with the same MAC gets registered as
>>     'primary' netdev. Both 'standby' and 'failover' netdevs are associated
>>     with the same 'pci' device.  The user accesses the network interface via
>>     'failover' netdev. The 'failover' netdev chooses 'primary' netdev as
>>     default for transmits when it is available with link up and running.
>> 2. For existing netvsc driver that uses 2 netdev model, no master netdev
>>     is created. The paravirtual driver registers each instance of netvsc
>>     as a 'failover' netdev  along with a set of ops to manage the slave
>>     events. There is no 'standby' netdev in this model. A passthru/vf device
>>     with the same MAC gets registered as 'primary' netdev.
>>            net_failover_register()
>>            net_failover_unregister()
>>
>> Signed-off-by: Sridhar Samudrala <sridhar.samudrala@...el.com>
> You are conflating the net_failover device (3 device model) with
> the generic network failover infrastructure into one file. There should be two
> seperate files net/core/failover.c and drivers/net/failover.c which splits
> the work into two parts (and acts a check for the api).

OK. I started splitting net_failover.c into 2 files.

net/core/failover.c (CONFIG_FAILOVER)
- implements the generic failover infrastructure that exports failover_register(),
   failover_unregister() and failover_slave_unregister() as the API that will be
   used by netvsc and the net_failover drivers(3 netdev model)

drivers/net/net_failover.c (CONFIG_NET_FAILOVER)
- implements the net_failover netdev as the upper dev for the 3-netdev model and
   exports net_failover_create() and net_failover_destroy() as the API that is
   used by virtio_net.

HYPERV_NET and NET_FAILOVER selects FAILOVER
VIRTIO_NET selects NET_FAILOVER

Does this look good? Any better suggestion for the prefix to be used for generic
network failover api rather than 'failover'?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ