RDMA/cxgb4: export T4 TCP MIB.
Subsystems (2)
PATCH RESEND 1/2 RDMA/cxgb4: export T4 TCP MIB.
Signed-off-by Steve Wise <[email protected]>
---
drivers/infiniband/hw/cxgb4/provider.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
drivers/infiniband/hw/cxgb4/provider.c +11 -1
@@ -391,7 +391,17 @@ static ssize_t show_board(struct device *dev, struct device_attribute *attr,static int c4iw_get_mib (struct ib_device *ibdev,union rdma_protocol_stats *stats) { -return -ENOSYS ; +struct tp_tcp_stats v4, v6; +struct c4iw_dev *c4iw_dev =to_c4iw_dev (ibdev); + +cxgb4_get_tcp_stats (c4iw_dev->rdev.lldi.pdev, &v4, &v6); +memset (stats,0 ,sizeof *stats); + stats->iw.tcpInSegs = v4.tcpInSegs + v6.tcpInSegs; + stats->iw.tcpOutSegs = v4.tcpOutSegs + v6.tcpOutSegs; + stats->iw.tcpRetransSegs = v4.tcpRetransSegs + v6.tcpRetransSegs; + stats->iw.tcpOutRsts = v4.tcpOutRsts + v6.tcpOutSegs; + +return 0 ; } static DEVICE_ATTR(hw_rev, S_IRUGO, show_rev, NULL);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20101018151640.32196.78946.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org
PATCH RESEND 2/2 RDMA/cxgb4: Use cxgb4 service for packet gl to skb.
Remove the local service t4_pktgl_to_skb() and use cxgb4_pktgl_to_skb() exported by cxgb4.
Signed-off-by Steve Wise <[email protected]>
---
drivers/infiniband/hw/cxgb4/device.c | 42 +--------------------------------- 1 files changed, 1 insertions(+), 41 deletions(-)
drivers/infiniband/hw/cxgb4/device.c +1 -41
@@ -454,46 +454,6 @@ out:return dev; } -static struct sk_buff *t4_pktgl_to_skb (const struct pkt_gl *gl, -unsigned int skb_len, -unsigned int pull_len) -{ -struct sk_buff *skb; -struct skb_shared_info *ssi; - -if (gl->tot_len <=512 ) { - skb =alloc_skb (gl->tot_len,GFP_ATOMIC ); -if (unlikely (!skb)) - goto out; -__skb_put (skb, gl->tot_len); -skb_copy_to_linear_data (skb, gl->va, gl->tot_len); - }else { - skb =alloc_skb (skb_len,GFP_ATOMIC ); -if (unlikely (!skb)) - goto out; -__skb_put (skb, pull_len); -skb_copy_to_linear_data (skb, gl->va, pull_len); - - ssi =skb_shinfo (skb); - ssi->frags[0 ].page = gl->frags[0 ].page; - ssi->frags[0 ].page_offset = gl->frags[0 ].page_offset + pull_len; - ssi->frags[0 ].size = gl->frags[0 ].size - pull_len; -if (gl->nfrags >1 ) -memcpy (&ssi->frags[1 ], &gl->frags[1 ], - (gl->nfrags -1 ) *sizeof (skb_frag_t)); - ssi->nr_frags = gl->nfrags; - - skb->len = gl->tot_len; - skb->data_len = skb->len - pull_len; - skb->truesize += skb->data_len; - -/* Get a reference for the last page, we don't own it */ -get_page (gl->frags[gl->nfrags -1 ].page); - } -out: -return skb; -} -static int c4iw_uld_rx_handler (void *handle,const __be64 *rsp,const struct pkt_gl *gl) {
@@ -518,7 +478,7 @@ static int c4iw_uld_rx_handler(void *handle, const __be64 *rsp,c4iw_ev_handler (dev, qid);return 0 ; }else { - skb =t4_pktgl_to_skb (gl,128 ,128 ); + skb =cxgb4_pktgl_to_skb (gl,128 ,128 );if (unlikely (!skb)) goto nomem; }
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html