All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yanjun Zhu <yanjun.zhu@oracle.com>
To: Gerd Rausch <gerd.rausch@oracle.com>,
	Santosh Shilimkar <santosh.shilimkar@oracle.com>,
	netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>
Subject: Re: [net-next PATCH] net/rds: Return proper "tos" value to user-space
Date: Fri, 8 Mar 2019 09:16:56 +0800	[thread overview]
Message-ID: <c61b3176-60b2-9b42-5566-6fa8d76960f4@oracle.com> (raw)
In-Reply-To: <20190307220106.9099-1-gerd.rausch@oracle.com>


On 2019/3/8 6:01, Gerd Rausch wrote:
> The proper "tos" value needs to be returned
> to user-space (sockopt RDS_INFO_CONNECTIONS).
>
> Fixes: 3eb450367d08 ("rds: add type of service(tos) infrastructure")
> Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>

In RDS/IB, tos is set in this function. Do you still use RoCE device?

static int rds_ib_conn_info_visitor(struct rds_connection *conn,

                                     void *buffer)
{
         struct rds_info_rdma_connection *iinfo = buffer;
         struct rds_ib_connection *ic;

         /* We will only ever look at IB transports */
         if (conn->c_trans != &rds_ib_transport)
                 return 0;
         if (conn->c_isv6)
                 return 0;

         iinfo->src_addr = conn->c_laddr.s6_addr32[3];
         iinfo->dst_addr = conn->c_faddr.s6_addr32[3];
         iinfo->tos = conn->c_tos;

         memset(&iinfo->src_gid, 0, sizeof(iinfo->src_gid));
         memset(&iinfo->dst_gid, 0, sizeof(iinfo->dst_gid));
         if (rds_conn_state(conn) == RDS_CONN_UP) {
                 struct rds_ib_device *rds_ibdev;

                 ic = conn->c_transport_data;

                 rdma_read_gids(ic->i_cm_id, (union ib_gid 
*)&iinfo->src_gid,
                                (union ib_gid *)&iinfo->dst_gid);

                 rds_ibdev = ic->rds_ibdev;
                 iinfo->max_send_wr = ic->i_send_ring.w_nr;
                 iinfo->max_recv_wr = ic->i_recv_ring.w_nr;
                 iinfo->max_send_sge = rds_ibdev->max_sge;
                 rds_ib_get_mr_info(rds_ibdev, iinfo);
         }
         return 1;

}

run rds-info, you can find tos with the above function.
> ---
>   net/rds/connection.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/net/rds/connection.c b/net/rds/connection.c
> index 7ea134f9a825..ed7f2133acc2 100644
> --- a/net/rds/connection.c
> +++ b/net/rds/connection.c
> @@ -736,6 +736,7 @@ static int rds_conn_info_visitor(struct rds_conn_path *cp, void *buffer)
>   	cinfo->next_rx_seq = cp->cp_next_rx_seq;
>   	cinfo->laddr = conn->c_laddr.s6_addr32[3];
>   	cinfo->faddr = conn->c_faddr.s6_addr32[3];
> +	cinfo->tos = conn->c_tos;

Without this commit, what will happen?

Zhu Yanjun

>   	strncpy(cinfo->transport, conn->c_trans->t_name,
>   		sizeof(cinfo->transport));
>   	cinfo->flags = 0;

  parent reply	other threads:[~2019-03-08  1:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05  0:04 [net-next][PATCH 0/5] rds: add tos support Santosh Shilimkar
2019-02-05  0:04 ` [net-next][PATCH 1/5] rds: make v3.1 as compat version Santosh Shilimkar
2019-02-05  0:04 ` [net-next][PATCH 2/5] rds: rdma: add consumer reject Santosh Shilimkar
2019-02-05  0:04 ` [net-next][PATCH 3/5] rds: add type of service(tos) infrastructure Santosh Shilimkar
     [not found]   ` <20190307220106.9099-1-gerd.rausch@oracle.com>
2019-03-08  1:16     ` Yanjun Zhu [this message]
2019-03-08  1:37     ` [net-next PATCH] net/rds: Return proper "tos" value to user-space santosh.shilimkar
2019-03-08 22:37       ` Gerd Rausch
2019-03-08 22:54         ` Santosh Shilimkar
2019-03-08 23:57         ` Zhu Yanjun
2019-02-05  0:04 ` [net-next][PATCH 4/5] rds: add transport specific tos_map hook Santosh Shilimkar
2019-02-05  0:04 ` [net-next][PATCH 5/5] rds: rdma: update rdma transport for tos Santosh Shilimkar
2019-03-05 16:33   ` Gerd Rausch
2019-03-05 16:41     ` Santosh Shilimkar
2019-03-05 16:48       ` Gerd Rausch
2019-03-05 17:02         ` Santosh Shilimkar
2019-03-06  5:28         ` Yanjun Zhu
     [not found]         ` <20190306070409.26840-1-gerd.rausch@oracle.com>
2019-03-06  8:41           ` [PATCH] net/rds: Accept peer connection reject messages due to incompatible version Yanjun Zhu
     [not found]             ` <20190307014920.24257-1-gerd.rausch@oracle.com>
2019-03-07  1:55               ` [net-next PATCH v2] " Santosh Shilimkar
2019-03-07  2:09                 ` Yanjun Zhu
2019-03-07  3:28                   ` Yanjun Zhu
2019-03-06 17:55           ` [PATCH] " Santosh Shilimkar
2019-02-07  1:01 ` [net-next][PATCH 0/5] rds: add tos support David Miller

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=c61b3176-60b2-9b42-5566-6fa8d76960f4@oracle.com \
    --to=yanjun.zhu@oracle.com \
    --cc=davem@davemloft.net \
    --cc=gerd.rausch@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=santosh.shilimkar@oracle.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.