Skip to content

Commit

Permalink
cxgb4vf: small changes to message processing structures/macros
Browse files Browse the repository at this point in the history
Split cpl_tx_pkt_lso into core message structure and encapsulated message,
make RSPD_LEN macro match other response descriptor macros.

Signed-off-by: Casey Leedom
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Casey Leedom authored and David S. Miller committed Jun 29, 2010
1 parent a71e832 commit 1704d74
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/net/cxgb4/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ out_free: dev_kfree_skb(skb);

ssi = skb_shinfo(skb);
if (ssi->gso_size) {
struct cpl_tx_pkt_lso *lso = (void *)wr;
struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1);
bool v6 = (ssi->gso_type & SKB_GSO_TCPV6) != 0;
int l3hdr_len = skb_network_header_len(skb);
int eth_xtra_len = skb_network_offset(skb) - ETH_HLEN;
Expand Down Expand Up @@ -1718,7 +1718,7 @@ static int process_responses(struct sge_rspq *q, int budget)
free_rx_bufs(q->adap, &rxq->fl, 1);
q->offset = 0;
}
len &= RSPD_LEN;
len = RSPD_LEN(len);
}
si.tot_len = len;

Expand Down
4 changes: 3 additions & 1 deletion drivers/net/cxgb4/t4_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ struct rsp_ctrl {
};

#define RSPD_NEWBUF 0x80000000U
#define RSPD_LEN 0x7fffffffU
#define RSPD_LEN(x) (((x) >> 0) & 0x7fffffffU)
#define RSPD_QID(x) RSPD_LEN(x)

#define RSPD_GEN(x) ((x) >> 7)
#define RSPD_TYPE(x) (((x) >> 4) & 3)

#define QINTR_CNT_EN 0x1
#define QINTR_TIMER_IDX(x) ((x) << 1)
#define QINTR_TIMER_IDX_GET(x) (((x) << 1) & 0x7)
#endif /* __T4_HW_H */
14 changes: 12 additions & 2 deletions drivers/net/cxgb4/t4_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,7 @@ struct cpl_tx_pkt {

#define cpl_tx_pkt_xt cpl_tx_pkt

struct cpl_tx_pkt_lso {
WR_HDR;
struct cpl_tx_pkt_lso_core {
__be32 lso_ctrl;
#define LSO_TCPHDR_LEN(x) ((x) << 0)
#define LSO_IPHDR_LEN(x) ((x) << 4)
Expand All @@ -460,6 +459,12 @@ struct cpl_tx_pkt_lso {
/* encapsulated CPL (TX_PKT, TX_PKT_XT or TX_DATA) follows here */
};

struct cpl_tx_pkt_lso {
WR_HDR;
struct cpl_tx_pkt_lso_core c;
/* encapsulated CPL (TX_PKT, TX_PKT_XT or TX_DATA) follows here */
};

struct cpl_iscsi_hdr {
union opcode_tid ot;
__be16 pdu_len_ddp;
Expand Down Expand Up @@ -623,6 +628,11 @@ struct cpl_fw6_msg {
__be64 data[4];
};

/* cpl_fw6_msg.type values */
enum {
FW6_TYPE_CMD_RPL = 0,
};

enum {
ULP_TX_MEM_READ = 2,
ULP_TX_MEM_WRITE = 3,
Expand Down

0 comments on commit 1704d74

Please sign in to comment.