Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1462545

Re: [RFC 1/2] netvsc: reference counting fix

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [RFC 1/2] netvsc: reference counting fix
Date 2016-08-15 06:40 +0200
Message-ID <s6hQR-OZ-9@gated-at.bofh.it> (permalink)
References <s4VSv-2Iy-13@gated-at.bofh.it> <s4VSv-2Iy-11@gated-at.bofh.it> <s61Cr-7hw-63@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 13 Aug 2016 11:35:59 -0700

> This is how I think it should be fixed, but not tested yet.
> 
> Subjec: netvsc: use device not module reference counts
> 
> Fix how the cross-device reference counting is handled.  When VF is
> associated with the synthetic interface, the VF driver module should
> still be able to be unloaded.  The module unload code will callback
> with NETDEV_UNREGISTER event which breaks the connection safely.
> (Fixes 9f4b5ba5db4 hv_netvsc: Implement support for VF drivers on Hyper-V)
> 
> Signed-off-by: Stephen Hemminger <sthemmin@linuxonhyperv.com>

This might not work.

It is assumed that when a netdev unregister happens, it may be done so
at any point in time.

Therefore that NETDEV_UNREGISTER event must eliminate any and all
references to a given netdev.  And that works perfectly fine right now
with all existing subsystems that take references to netdevs.

You'll have to add something so that a NETDEV_UNREGISTER event tears
this VF down and thus releases it's reference to the synthetic device.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-11 13:00 +0200
  RE: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal Yuval Mintz <Yuval.Mintz@qlogic.com> - 2016-08-11 13:50 +0200
    Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-11 14:20 +0200
      Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal Stephen Hemminger <stephen@networkplumber.org> - 2016-08-12 16:50 +0200
  Re: [PATCH net 2/4] hv_netvsc: reset vf_inject on VF removal David Miller <davem@davemloft.net> - 2016-08-13 05:50 +0200
  [RFC 2/2] netvsc: use RCU for VF net device reference Stephen Hemminger <stephen@networkplumber.org> - 2016-08-14 13:20 +0200
    Re: [RFC 2/2] netvsc: use RCU for VF net device reference Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-08-15 12:10 +0200
  [RFC 1/2] netvsc: reference counting fix Stephen Hemminger <stephen@networkplumber.org> - 2016-08-14 13:30 +0200
    Re: [RFC 1/2] netvsc: reference counting fix David Miller <davem@davemloft.net> - 2016-08-15 06:40 +0200

csiph-web