netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Nikolay Borisov <kernel@kyup.com>
Cc: netdev@vger.kernel.org,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	sean.hefty@intel.com, dledford@redhat.com,
	SiteGround Operations <operations@siteground.com>
Subject: Re: ref count of ib_ipoib.ko not incremented when an ip address is set
Date: Fri, 22 Jul 2016 15:23:18 -0700	[thread overview]
Message-ID: <20160722152318.6a1e5f1a@xeon-e3> (raw)
In-Reply-To: <5791D642.9050609@kyup.com>

On Fri, 22 Jul 2016 11:16:02 +0300
Nikolay Borisov <kernel@kyup.com> wrote:

> Hello, 
> 
> I accidentally saw that even having an ip address on an 
> ipoib interface doesn't increment the usage count of the 
> ib_ipoib.ko module: 
> 
> ip a l dev ib0
> 14: ib0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc pfifo_fast state UP qlen 256
>     link/infiniband 80:00:02:d4:fe:80:00:00:00:00:00:00:e4:1d:2d:03:00:00:f8:31 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
>     inet 172.16.0.150/24 brd 172.16.0.255 scope global ib0
>        valid_lft forever preferred_lft forever
> 
> lsmod | grep ib_ipoib
> ib_ipoib               79026  0 
> ib_cm                  34144  3 ib_ipoib,ib_ucm,rdma_cm
> ib_sa                  26598  5 ib_ipoib,rdma_ucm,rdma_cm,ib_cm,mlx4_ib
> ib_core                97620  10 ib_ipoib,ib_ucm,ib_uverbs,rdma_cm,iw_cm,ib_umad,ib_cm,mlx4_ib,ib_sa,ib_mad
> ipv6                  374806  259 ib_ipoib,rdma_cm,ib_addr,[permanent]
> 
> 
> In this case I can rmmod ib_ipoib.ko which would remove, 
> but in practice I've observed that when an ip address is set
> the underlying module providing the interface usually gets
> its ref count incremented. Is this normal or is a 
> refcount increment is amiss?
> 
> Regards, 
> Nikolay 

Network devices are always supposed to have module refcount of zero
and they can be rmmod'd safely.  This was an intentional design decision
all the way back to 2.5 version.

      reply	other threads:[~2016-07-22 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22  8:16 ref count of ib_ipoib.ko not incremented when an ip address is set Nikolay Borisov
2016-07-22 22:23 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160722152318.6a1e5f1a@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=kernel@kyup.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=operations@siteground.com \
    --cc=sean.hefty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).