lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <c61b3176-60b2-9b42-5566-6fa8d76960f4@oracle.com>
Date:   Fri, 8 Mar 2019 09:16:56 +0800
From:   Yanjun Zhu <yanjun.zhu@...cle.com>
To:     Gerd Rausch <gerd.rausch@...cle.com>,
        Santosh Shilimkar <santosh.shilimkar@...cle.com>,
        netdev@...r.kernel.org
Cc:     David Miller <davem@...emloft.net>
Subject: Re: [net-next PATCH] net/rds: Return proper "tos" value to user-space


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@...cle.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ