netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: chas3@users.sourceforge.net, chas@cmf.nrl.navy.mil
Cc: netdev@oss.sgi.com
Subject: Re: [rfc] sk_write_space() for atm
Date: Tue, 24 Jun 2003 16:35:17 -0700 (PDT)	[thread overview]
Message-ID: <20030624.163517.15237390.davem@redhat.com> (raw)
In-Reply-To: <200306241735.h5OHZCsG004098@ginger.cmf.nrl.navy.mil>

   From: chas williams <chas@cmf.nrl.navy.mil>
   Date: Tue, 24 Jun 2003 13:33:05 -0400

   i am thinking about the following for the atm protocol.
   the writable for atm has always been when you have enough
   space to send the next pdu.  i suppose this should be 
   preserved to be completely compat, but it might not be the
   best choice.  poll is interesting also.  it seems to me
   that vcc->reply should be atleast copied, since it could
   change during the poll function (or so i imagine).  its
   probably a better idea to just change WAITING to be a bit
   inside vcc->flags and remove vcc->error in favor of sk->sk_err.
   
You can achieve what you want with 'reply' via:

	reply = vcc->reply;
	barrier();

the code you have there will merely make gcc go to the
stack for 'reply' every time it is used and that's obviously
not what you want, you want a singular snapshot of vcc->reply.

This doesn't guarentee anything, if you want to test multiple
pieces of state and make a decision based upon a snapshot of
them you must do some more serious locking (such as lock_sock())
in the poll function.

  reply	other threads:[~2003-06-24 23:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-24 17:33 [rfc] sk_write_space() for atm chas williams
2003-06-24 23:35 ` David S. Miller [this message]
2003-06-25  0:30   ` chas williams
2003-06-25  0:40     ` David S. Miller
2003-06-25  2:31       ` chas williams

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=20030624.163517.15237390.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=chas3@users.sourceforge.net \
    --cc=chas@cmf.nrl.navy.mil \
    --cc=netdev@oss.sgi.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).