]> git.karo-electronics.de Git - linux-beck.git/commitdiff
cxgb4: Add device node to ULD info
authorHariprasad Shenai <hariprasad@chelsio.com>
Tue, 5 May 2015 09:29:54 +0000 (14:59 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 May 2015 23:31:50 +0000 (19:31 -0400)
Adds device node to ULD info. Use the node info to alloc_ring() for ctrl
TX queues

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h
drivers/net/ethernet/chelsio/cxgb4/sge.c

index 12cd8e4cc63c730c7c8cdf444b667d09225a8540..6c781c1b8fb8b341e516ef3409e202af4bb82387 100644 (file)
@@ -2434,6 +2434,7 @@ static void uld_attach(struct adapter *adap, unsigned int uld)
        lli.max_ordird_qp = adap->params.max_ordird_qp;
        lli.max_ird_adapter = adap->params.max_ird_adapter;
        lli.ulptx_memwrite_dsgl = adap->params.ulptx_memwrite_dsgl;
+       lli.nodeid = dev_to_node(adap->pdev_dev);
 
        handle = ulds[uld].add(&lli);
        if (IS_ERR(handle)) {
index 78ab4d406ce277509eb6da61780903129596e7ee..df34293f35e867aa533d2e0da142726d4f9752b7 100644 (file)
@@ -264,6 +264,7 @@ struct cxgb4_lld_info {
        unsigned int max_ordird_qp;          /* Max ORD/IRD depth per RDMA QP */
        unsigned int max_ird_adapter;        /* Max IRD memory per adapter */
        bool ulptx_memwrite_dsgl;            /* use of T5 DSGL allowed */
+       int nodeid;                          /* device numa node id */
 };
 
 struct cxgb4_uld_info {
index a9002b1a8ea91f1c3dcc6ac02838f26c9d871baa..354480dab23934662d77ea179e224ff1c9f1dc42 100644 (file)
@@ -2691,7 +2691,7 @@ int t4_sge_alloc_ctrl_txq(struct adapter *adap, struct sge_ctrl_txq *txq,
 
        txq->q.desc = alloc_ring(adap->pdev_dev, nentries,
                                 sizeof(struct tx_desc), 0, &txq->q.phys_addr,
-                                NULL, 0, NUMA_NO_NODE);
+                                NULL, 0, dev_to_node(adap->pdev_dev));
        if (!txq->q.desc)
                return -ENOMEM;