RDS/IB: Handle connections using RDS 3.0 wire protocol
The big differences between RDS 3.0 and 3.1 are protocol-level flow control, and with 3.1 the header is in front of the data. The header always ends up in the header buffer, and the data goes in the data page. In 3.0 our "header" is a trailer, and will end up either in the data page, the header buffer, or split across the two. Since 3.1 is backwards- compatible with 3.0, we need to continue to support these cases. This patch does that -- if using RDS 3.0 wire protocol, it will copy the header from wherever it ended up into the header buffer. Signed-off-by: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Цей коміт міститься в:

зафіксовано
David S. Miller

джерело
9ddbcfa098
коміт
02a6a2592e
12
net/rds/ib.h
12
net/rds/ib.h
@@ -358,17 +358,25 @@ extern ctl_table rds_ib_sysctl_table[];
|
||||
/*
|
||||
* Helper functions for getting/setting the header and data SGEs in
|
||||
* RDS packets (not RDMA)
|
||||
*
|
||||
* From version 3.1 onwards, header is in front of data in the sge.
|
||||
*/
|
||||
static inline struct ib_sge *
|
||||
rds_ib_header_sge(struct rds_ib_connection *ic, struct ib_sge *sge)
|
||||
{
|
||||
return &sge[0];
|
||||
if (ic->conn->c_version > RDS_PROTOCOL_3_0)
|
||||
return &sge[0];
|
||||
else
|
||||
return &sge[1];
|
||||
}
|
||||
|
||||
static inline struct ib_sge *
|
||||
rds_ib_data_sge(struct rds_ib_connection *ic, struct ib_sge *sge)
|
||||
{
|
||||
return &sge[1];
|
||||
if (ic->conn->c_version > RDS_PROTOCOL_3_0)
|
||||
return &sge[1];
|
||||
else
|
||||
return &sge[0];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Посилання в новій задачі
Заблокувати користувача