All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] Protocol C
Date: Wed, 28 May 2014 13:56:54 +0200	[thread overview]
Message-ID: <20140528115654.GH17111@soda.linbit> (raw)
In-Reply-To: <85bebd869def7c9ebf198ee72baef5ba@ugr.es>

On Wed, May 28, 2014 at 12:14:30PM +0200, raulhp wrote:
> Hi Lars,
> 
> I´m trying to understand how ACK´s works en Protocol C to try to use
> it in Reliable Multicast in each receiver, I´m using a Reliable
> Multicast with NACK (Negative-ACKnowledgment) only in each loss
> packet.

Ok.

The entry point for requests from "upper layers" is
drbd_make_request
  __drbd_make_request
    drbd_request_prepare()
    drbd_send_and_submit(),
    which is in drbd_req.c

Everything "interesting" that happens to such a struct drbd_request
object is handled with req_mod(req, event, peer_device)
(or _req_mod ...) which are both a wrapper around
__req_mod(),
which calls into mod_rq_state();

"events" are drbd_req_events,
drbd requests state flags are from drbd_req_state_bits (__RQ_*)
(or the corresponding RQ_* defines).

grep for req_mod should be useful.

If you consider only the replication link(s),
the interesting functions are likely
drbd_sender.c,
  drbd_sender()
    wait_for_sender_todo()
    process_sender_todo()
      process_one_request()   

drbd_receiver.c
  drbd_asender()
     ... lots of other stuff ...
     cmd = &asender_tbl[pi.cmd];
     ...
     cmd->fn(connection, &pi);
with fn (see asender_tbl) being
  got_BlockAck()
  got_NegAck()

Where you would probabaly need a "got_mcast_neg_ack()",
which could maybe better be re-labeled as "got_mcast_retransmit_request()".

You would need to find the "relevant" requests on the
  resource->transfer_log(), and queue them for resend.
(Or abstract out your own primitives from the existing stuff,
 and implement both the existing TCP links and the new mcast
 with some additional auxiliary functions as needed).

Does that help?

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.

  reply	other threads:[~2014-05-28 11:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 15:33 [Drbd-dev] Protocol C raulhp
2014-05-27 22:40 ` Lars Ellenberg
2014-05-28 10:14   ` raulhp
2014-05-28 11:56     ` Lars Ellenberg [this message]
2014-05-28 12:32       ` raulhp
2014-05-28 12:49         ` Lars Ellenberg
2014-05-28 15:25           ` raulhp
2014-05-28 18:36             ` Lars Ellenberg
2014-05-29 10:45               ` raulhp
2014-05-29 21:29                 ` Lars Ellenberg
2014-05-30 10:28                   ` raulhp
2014-05-30 13:17                     ` Lars Ellenberg
2014-06-04 10:21                       ` raulhp

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=20140528115654.GH17111@soda.linbit \
    --to=lars.ellenberg@linbit.com \
    --cc=drbd-dev@lists.linbit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.