* [PATCH 2/4] xen/netback: Split one page pool into two(tx/rx) page pool.
From: Annie Li @ 2012-11-15 7:04 UTC (permalink / raw)
To: xen-devel, netdev, konrad.wilk, Ian.Campbell; +Cc: annie.li
In-Reply-To: <1352962987-541-1-git-send-email-annie.li@oracle.com>
For tx path, this implementation simplifies the work of searching out
grant page from page pool based on grant reference.
Signed-off-by: Annie Li <annie.li@oracle.com>
---
drivers/net/xen-netback/common.h | 14 ++++++++++----
drivers/net/xen-netback/interface.c | 12 ++++++++----
drivers/net/xen-netback/netback.c | 15 +++++++++------
3 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
index a85cac6..02c8573 100644
--- a/drivers/net/xen-netback/common.h
+++ b/drivers/net/xen-netback/common.h
@@ -47,8 +47,6 @@
#define XEN_NETIF_TX_RING_SIZE __CONST_RING_SIZE(xen_netif_tx, PAGE_SIZE)
#define XEN_NETIF_RX_RING_SIZE __CONST_RING_SIZE(xen_netif_rx, PAGE_SIZE)
-#define MAXIMUM_OUTSTANDING_BLOCK_REQS \
- (XEN_NETIF_TX_RING_SIZE + XEN_NETIF_RX_RING_SIZE)
struct xen_netbk;
@@ -111,8 +109,16 @@ struct xenvif {
wait_queue_head_t waiting_to_free;
- struct persistent_entry *persistent_gnt[MAXIMUM_OUTSTANDING_BLOCK_REQS];
- unsigned int persistent_gntcnt;
+ struct persistent_entry *persistent_tx_gnt[XEN_NETIF_TX_RING_SIZE];
+
+ /*
+ * 2*XEN_NETIF_RX_RING_SIZE is for the case of each head/fragment page
+ * using 2 copy operations.
+ */
+ struct persistent_entry *persistent_rx_gnt[2*XEN_NETIF_RX_RING_SIZE];
+
+ unsigned int persistent_tx_gntcnt;
+ unsigned int persistent_rx_gntcnt;
};
static inline struct xenbus_device *xenvif_to_xenbus_device(struct xenvif *vif)
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index 226d159..ecbe116 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -300,7 +300,8 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
return ERR_PTR(err);
}
- vif->persistent_gntcnt = 0;
+ vif->persistent_tx_gntcnt = 0;
+ vif->persistent_rx_gntcnt = 0;
netdev_dbg(dev, "Successfully created xenvif\n");
return vif;
@@ -385,9 +386,12 @@ void xenvif_disconnect(struct xenvif *vif)
unregister_netdev(vif->dev);
xen_netbk_unmap_frontend_rings(vif);
- if (vif->persistent_grant)
- xenvif_free_grants(vif->persistent_gnt,
- vif->persistent_gntcnt);
+ if (vif->persistent_grant) {
+ xenvif_free_grants(vif->persistent_tx_gnt,
+ vif->persistent_tx_gntcnt);
+ xenvif_free_grants(vif->persistent_rx_gnt,
+ vif->persistent_rx_gntcnt);
+ }
free_netdev(vif->dev);
}
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index a26d3fc..ec59c73 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -208,14 +208,17 @@ grant_memory_copy_op(unsigned int cmd, void *vuop, unsigned int count,
BUG_ON(cmd != GNTTABOP_copy);
for (i = 0; i < count; i++) {
- if (tx_pool)
+ if (tx_pool) {
vif = netbk->gnttab_tx_vif[i];
- else
+ gnt_count = &vif->persistent_tx_gntcnt;
+ gnt_total = XEN_NETIF_TX_RING_SIZE;
+ pers_entry = vif->persistent_tx_gnt;
+ } else {
vif = netbk->gnttab_rx_vif[i];
-
- pers_entry = vif->persistent_gnt;
- gnt_count = &vif->persistent_gntcnt;
- gnt_total = MAXIMUM_OUTSTANDING_BLOCK_REQS;
+ gnt_count = &vif->persistent_rx_gntcnt;
+ gnt_total = 2*XEN_NETIF_RX_RING_SIZE;
+ pers_entry = vif->persistent_rx_gnt;
+ }
if (vif->persistent_grant) {
void *saddr, *daddr;
--
1.7.3.4
^ permalink raw reply related
* [PATCH 1/4] xen/netback: implements persistent grant with one page pool.
From: Annie Li @ 2012-11-15 7:04 UTC (permalink / raw)
To: xen-devel, netdev, konrad.wilk, Ian.Campbell; +Cc: annie.li
In-Reply-To: <1352962987-541-1-git-send-email-annie.li@oracle.com>
This patch implements persistent grant in netback driver. Tx and rx
share the same page pool, this pool will be split into two parts
in next patch.
Signed-off-by: Annie Li <annie.li@oracle.com>
---
drivers/net/xen-netback/common.h | 18 +++-
drivers/net/xen-netback/interface.c | 22 ++++
drivers/net/xen-netback/netback.c | 212 +++++++++++++++++++++++++++++++----
drivers/net/xen-netback/xenbus.c | 14 ++-
4 files changed, 239 insertions(+), 27 deletions(-)
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
index 94b79c3..a85cac6 100644
--- a/drivers/net/xen-netback/common.h
+++ b/drivers/net/xen-netback/common.h
@@ -45,8 +45,19 @@
#include <xen/grant_table.h>
#include <xen/xenbus.h>
+#define XEN_NETIF_TX_RING_SIZE __CONST_RING_SIZE(xen_netif_tx, PAGE_SIZE)
+#define XEN_NETIF_RX_RING_SIZE __CONST_RING_SIZE(xen_netif_rx, PAGE_SIZE)
+#define MAXIMUM_OUTSTANDING_BLOCK_REQS \
+ (XEN_NETIF_TX_RING_SIZE + XEN_NETIF_RX_RING_SIZE)
+
struct xen_netbk;
+struct persistent_entry {
+ grant_ref_t forgranted;
+ struct page *fpage;
+ struct gnttab_map_grant_ref map;
+};
+
struct xenvif {
/* Unique identifier for this interface. */
domid_t domid;
@@ -75,6 +86,7 @@ struct xenvif {
/* Internal feature information. */
u8 can_queue:1; /* can queue packets for receiver? */
+ u8 persistent_grant:1;
/*
* Allow xenvif_start_xmit() to peek ahead in the rx request
@@ -98,6 +110,9 @@ struct xenvif {
struct net_device *dev;
wait_queue_head_t waiting_to_free;
+
+ struct persistent_entry *persistent_gnt[MAXIMUM_OUTSTANDING_BLOCK_REQS];
+ unsigned int persistent_gntcnt;
};
static inline struct xenbus_device *xenvif_to_xenbus_device(struct xenvif *vif)
@@ -105,9 +120,6 @@ static inline struct xenbus_device *xenvif_to_xenbus_device(struct xenvif *vif)
return to_xenbus_device(vif->dev->dev.parent);
}
-#define XEN_NETIF_TX_RING_SIZE __CONST_RING_SIZE(xen_netif_tx, PAGE_SIZE)
-#define XEN_NETIF_RX_RING_SIZE __CONST_RING_SIZE(xen_netif_rx, PAGE_SIZE)
-
struct xenvif *xenvif_alloc(struct device *parent,
domid_t domid,
unsigned int handle);
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index b7d41f8..226d159 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -300,6 +300,8 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid,
return ERR_PTR(err);
}
+ vif->persistent_gntcnt = 0;
+
netdev_dbg(dev, "Successfully created xenvif\n");
return vif;
}
@@ -343,6 +345,23 @@ err:
return err;
}
+void xenvif_free_grants(struct persistent_entry **pers_entry,
+ unsigned int count)
+{
+ int i, ret;
+ struct gnttab_unmap_grant_ref unmap;
+
+ for (i = 0; i < count; i++) {
+ gnttab_set_unmap_op(&unmap,
+ (unsigned long)page_to_pfn(pers_entry[i]->fpage),
+ GNTMAP_host_map,
+ pers_entry[i]->map.handle);
+ ret = gnttab_unmap_refs(&unmap, &pers_entry[i]->fpage,
+ 1, false);
+ BUG_ON(ret);
+ }
+}
+
void xenvif_disconnect(struct xenvif *vif)
{
struct net_device *dev = vif->dev;
@@ -366,6 +385,9 @@ void xenvif_disconnect(struct xenvif *vif)
unregister_netdev(vif->dev);
xen_netbk_unmap_frontend_rings(vif);
+ if (vif->persistent_grant)
+ xenvif_free_grants(vif->persistent_gnt,
+ vif->persistent_gntcnt);
free_netdev(vif->dev);
}
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 2596401..a26d3fc 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -80,6 +80,8 @@ union page_ext {
void *mapping;
};
+struct xenvif;
+
struct xen_netbk {
wait_queue_head_t wq;
struct task_struct *task;
@@ -102,6 +104,7 @@ struct xen_netbk {
struct pending_tx_info pending_tx_info[MAX_PENDING_REQS];
struct gnttab_copy tx_copy_ops[MAX_PENDING_REQS];
+ struct xenvif *gnttab_tx_vif[MAX_PENDING_REQS];
u16 pending_ring[MAX_PENDING_REQS];
@@ -111,12 +114,139 @@ struct xen_netbk {
* straddles two buffers in the frontend.
*/
struct gnttab_copy grant_copy_op[2*XEN_NETIF_RX_RING_SIZE];
+ struct xenvif *gnttab_rx_vif[2*XEN_NETIF_RX_RING_SIZE];
struct netbk_rx_meta meta[2*XEN_NETIF_RX_RING_SIZE];
};
static struct xen_netbk *xen_netbk;
static int xen_netbk_group_nr;
+static struct persistent_entry*
+get_per_gnt(struct persistent_entry **pers_entry,
+ unsigned int count, grant_ref_t gref)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ if (gref == pers_entry[i]->forgranted)
+ return pers_entry[i];
+
+ return NULL;
+}
+
+static void*
+map_new_gnt(struct persistent_entry **pers_entry, unsigned int count,
+ grant_ref_t ref, domid_t domid)
+{
+ struct gnttab_map_grant_ref *map;
+ struct page *page;
+ unsigned long vaddr;
+ unsigned long pfn;
+ uint32_t flags;
+ int ret = 0;
+
+ pers_entry[count] = (struct persistent_entry *)
+ kmalloc(sizeof(struct persistent_entry),
+ GFP_KERNEL);
+ if (!pers_entry[count])
+ return ERR_PTR(-ENOMEM);
+
+ map = &pers_entry[count]->map;
+ page = alloc_page(GFP_KERNEL);
+ if (!page) {
+ kfree(pers_entry[count]);
+ pers_entry[count] = NULL;
+ return ERR_PTR(-ENOMEM);
+ }
+
+ pers_entry[count]->fpage = page;
+ pfn = page_to_pfn(page);
+ vaddr = (unsigned long)pfn_to_kaddr(pfn);
+ flags = GNTMAP_host_map;
+
+ gnttab_set_map_op(map, vaddr, flags, ref, domid);
+ ret = gnttab_map_refs(map, NULL, &page, 1);
+ BUG_ON(ret);
+
+ pers_entry[count]->forgranted = ref;
+
+ return page_address(page);
+}
+
+static void*
+get_ref_page(struct persistent_entry **pers_entry, unsigned int *count,
+ grant_ref_t ref, domid_t domid, unsigned int total)
+{
+ struct persistent_entry *per_gnt;
+ void *vaddr;
+
+ per_gnt = get_per_gnt(pers_entry, *count, ref);
+
+ if (per_gnt != NULL)
+ return page_address(per_gnt->fpage);
+ else {
+ BUG_ON(*count >= total);
+ vaddr = map_new_gnt(pers_entry, *count, ref, domid);
+ if (IS_ERR_OR_NULL(vaddr))
+ return vaddr;
+ *count += 1;
+ return vaddr;
+ }
+}
+
+static int
+grant_memory_copy_op(unsigned int cmd, void *vuop, unsigned int count,
+ struct xen_netbk *netbk, bool tx_pool)
+{
+ int i;
+ struct xenvif *vif;
+ struct gnttab_copy *uop = vuop;
+ unsigned int *gnt_count;
+ unsigned int gnt_total;
+ struct persistent_entry **pers_entry;
+ int ret = 0;
+
+ BUG_ON(cmd != GNTTABOP_copy);
+ for (i = 0; i < count; i++) {
+ if (tx_pool)
+ vif = netbk->gnttab_tx_vif[i];
+ else
+ vif = netbk->gnttab_rx_vif[i];
+
+ pers_entry = vif->persistent_gnt;
+ gnt_count = &vif->persistent_gntcnt;
+ gnt_total = MAXIMUM_OUTSTANDING_BLOCK_REQS;
+
+ if (vif->persistent_grant) {
+ void *saddr, *daddr;
+
+ saddr = uop[i].source.domid == DOMID_SELF ?
+ (void *) uop[i].source.u.gmfn :
+ get_ref_page(pers_entry, gnt_count,
+ uop[i].source.u.ref,
+ uop[i].source.domid,
+ gnt_total);
+ if (IS_ERR_OR_NULL(saddr))
+ return -ENOMEM;
+
+ daddr = uop[i].dest.domid == DOMID_SELF ?
+ (void *) uop[i].dest.u.gmfn :
+ get_ref_page(pers_entry, gnt_count,
+ uop[i].dest.u.ref,
+ uop[i].dest.domid,
+ gnt_total);
+ if (IS_ERR_OR_NULL(daddr))
+ return -ENOMEM;
+
+ memcpy(daddr+uop[i].dest.offset,
+ saddr+uop[i].source.offset, uop[i].len);
+ } else
+ ret = HYPERVISOR_grant_table_op(cmd, &uop[i], 1);
+ }
+
+ return ret;
+}
+
void xen_netbk_add_xenvif(struct xenvif *vif)
{
int i;
@@ -387,13 +517,15 @@ static struct netbk_rx_meta *get_next_rx_buffer(struct xenvif *vif,
* Set up the grant operations for this fragment. If it's a flipping
* interface, we also set up the unmap request from here.
*/
-static void netbk_gop_frag_copy(struct xenvif *vif, struct sk_buff *skb,
- struct netrx_pending_operations *npo,
- struct page *page, unsigned long size,
- unsigned long offset, int *head)
+static int netbk_gop_frag_copy(struct xenvif *vif, struct sk_buff *skb,
+ struct netrx_pending_operations *npo,
+ struct page *page, unsigned long size,
+ unsigned long offset, int *head,
+ struct xenvif **grxvif)
{
struct gnttab_copy *copy_gop;
struct netbk_rx_meta *meta;
+ int count = 0;
/*
* These variables are used iff get_page_ext returns true,
* in which case they are guaranteed to be initialized.
@@ -425,6 +557,10 @@ static void netbk_gop_frag_copy(struct xenvif *vif, struct sk_buff *skb,
bytes = MAX_BUFFER_OFFSET - npo->copy_off;
copy_gop = npo->copy + npo->copy_prod++;
+ *grxvif = vif;
+ grxvif++;
+ count++;
+
copy_gop->flags = GNTCOPY_dest_gref;
if (foreign) {
struct xen_netbk *netbk = &xen_netbk[group];
@@ -438,7 +574,10 @@ static void netbk_gop_frag_copy(struct xenvif *vif, struct sk_buff *skb,
} else {
void *vaddr = page_address(page);
copy_gop->source.domid = DOMID_SELF;
- copy_gop->source.u.gmfn = virt_to_mfn(vaddr);
+ if (!vif->persistent_grant)
+ copy_gop->source.u.gmfn = virt_to_mfn(vaddr);
+ else
+ copy_gop->source.u.gmfn = (unsigned long)vaddr;
}
copy_gop->source.offset = offset;
copy_gop->dest.domid = vif->domid;
@@ -460,6 +599,7 @@ static void netbk_gop_frag_copy(struct xenvif *vif, struct sk_buff *skb,
*head = 0; /* There must be something in this buffer now. */
}
+ return count;
}
/*
@@ -474,8 +614,10 @@ static void netbk_gop_frag_copy(struct xenvif *vif, struct sk_buff *skb,
* zero GSO descriptors (for non-GSO packets) or one descriptor (for
* frontend-side LRO).
*/
-static int netbk_gop_skb(struct sk_buff *skb,
- struct netrx_pending_operations *npo)
+static int netbk_gop_skb(struct xen_netbk *netbk,
+ struct sk_buff *skb,
+ struct netrx_pending_operations *npo,
+ struct xenvif **grxvif)
{
struct xenvif *vif = netdev_priv(skb->dev);
int nr_frags = skb_shinfo(skb)->nr_frags;
@@ -518,17 +660,19 @@ static int netbk_gop_skb(struct sk_buff *skb,
if (data + len > skb_tail_pointer(skb))
len = skb_tail_pointer(skb) - data;
- netbk_gop_frag_copy(vif, skb, npo,
- virt_to_page(data), len, offset, &head);
+ grxvif += netbk_gop_frag_copy(vif, skb, npo,
+ virt_to_page(data), len,
+ offset, &head, grxvif);
+
data += len;
}
for (i = 0; i < nr_frags; i++) {
- netbk_gop_frag_copy(vif, skb, npo,
- skb_frag_page(&skb_shinfo(skb)->frags[i]),
- skb_frag_size(&skb_shinfo(skb)->frags[i]),
- skb_shinfo(skb)->frags[i].page_offset,
- &head);
+ grxvif += netbk_gop_frag_copy(vif, skb, npo,
+ skb_frag_page(&skb_shinfo(skb)->frags[i]),
+ skb_frag_size(&skb_shinfo(skb)->frags[i]),
+ skb_shinfo(skb)->frags[i].page_offset,
+ &head, grxvif);
}
return npo->meta_prod - old_meta_prod;
@@ -593,6 +737,8 @@ struct skb_cb_overlay {
static void xen_netbk_rx_action(struct xen_netbk *netbk)
{
struct xenvif *vif = NULL, *tmp;
+ struct xenvif **grxvif = netbk->gnttab_rx_vif;
+ int old_copy_prod = 0;
s8 status;
u16 irq, flags;
struct xen_netif_rx_response *resp;
@@ -619,7 +765,9 @@ static void xen_netbk_rx_action(struct xen_netbk *netbk)
nr_frags = skb_shinfo(skb)->nr_frags;
sco = (struct skb_cb_overlay *)skb->cb;
- sco->meta_slots_used = netbk_gop_skb(skb, &npo);
+ sco->meta_slots_used = netbk_gop_skb(netbk, skb, &npo, grxvif);
+ grxvif += npo.copy_prod - old_copy_prod;
+ old_copy_prod = npo.copy_prod;
count += nr_frags + 1;
@@ -636,8 +784,10 @@ static void xen_netbk_rx_action(struct xen_netbk *netbk)
return;
BUG_ON(npo.copy_prod > ARRAY_SIZE(netbk->grant_copy_op));
- ret = HYPERVISOR_grant_table_op(GNTTABOP_copy, &netbk->grant_copy_op,
- npo.copy_prod);
+ ret = grant_memory_copy_op(GNTTABOP_copy,
+ &netbk->grant_copy_op,
+ npo.copy_prod, netbk,
+ false);
BUG_ON(ret != 0);
while ((skb = __skb_dequeue(&rxq)) != NULL) {
@@ -918,7 +1068,8 @@ static struct gnttab_copy *xen_netbk_get_requests(struct xen_netbk *netbk,
struct xenvif *vif,
struct sk_buff *skb,
struct xen_netif_tx_request *txp,
- struct gnttab_copy *gop)
+ struct gnttab_copy *gop,
+ struct xenvif **gtxvif)
{
struct skb_shared_info *shinfo = skb_shinfo(skb);
skb_frag_t *frags = shinfo->frags;
@@ -944,7 +1095,11 @@ static struct gnttab_copy *xen_netbk_get_requests(struct xen_netbk *netbk,
gop->source.domid = vif->domid;
gop->source.offset = txp->offset;
- gop->dest.u.gmfn = virt_to_mfn(page_address(page));
+ if (!vif->persistent_grant)
+ gop->dest.u.gmfn = virt_to_mfn(page_address(page));
+ else
+ gop->dest.u.gmfn = (unsigned long)page_address(page);
+
gop->dest.domid = DOMID_SELF;
gop->dest.offset = txp->offset;
@@ -952,6 +1107,9 @@ static struct gnttab_copy *xen_netbk_get_requests(struct xen_netbk *netbk,
gop->flags = GNTCOPY_source_gref;
gop++;
+ *gtxvif = vif;
+ gtxvif++;
+
memcpy(&pending_tx_info[pending_idx].req, txp, sizeof(*txp));
xenvif_get(vif);
@@ -1218,6 +1376,7 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size)
static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
{
struct gnttab_copy *gop = netbk->tx_copy_ops, *request_gop;
+ struct xenvif **gtxvif = netbk->gnttab_tx_vif;
struct sk_buff *skb;
int ret;
@@ -1338,7 +1497,11 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
gop->source.domid = vif->domid;
gop->source.offset = txreq.offset;
- gop->dest.u.gmfn = virt_to_mfn(page_address(page));
+ if (!vif->persistent_grant)
+ gop->dest.u.gmfn = virt_to_mfn(page_address(page));
+ else
+ gop->dest.u.gmfn = (unsigned long)page_address(page);
+
gop->dest.domid = DOMID_SELF;
gop->dest.offset = txreq.offset;
@@ -1346,6 +1509,7 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
gop->flags = GNTCOPY_source_gref;
gop++;
+ *gtxvif++ = vif;
memcpy(&netbk->pending_tx_info[pending_idx].req,
&txreq, sizeof(txreq));
@@ -1369,12 +1533,13 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk)
netbk->pending_cons++;
request_gop = xen_netbk_get_requests(netbk, vif,
- skb, txfrags, gop);
+ skb, txfrags, gop, gtxvif);
if (request_gop == NULL) {
kfree_skb(skb);
netbk_tx_err(vif, &txreq, idx);
continue;
}
+ gtxvif += request_gop - gop;
gop = request_gop;
vif->tx.req_cons = idx;
@@ -1467,8 +1632,9 @@ static void xen_netbk_tx_action(struct xen_netbk *netbk)
if (nr_gops == 0)
return;
- ret = HYPERVISOR_grant_table_op(GNTTABOP_copy,
- netbk->tx_copy_ops, nr_gops);
+ ret = grant_memory_copy_op(GNTTABOP_copy,
+ netbk->tx_copy_ops, nr_gops,
+ netbk, true);
BUG_ON(ret);
xen_netbk_tx_submit(netbk);
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index 410018c..938e908 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -114,6 +114,13 @@ static int netback_probe(struct xenbus_device *dev,
goto abort_transaction;
}
+ err = xenbus_printf(xbt, dev->nodename,
+ "feature-persistent-grants", "%u", 1);
+ if (err) {
+ message = "writing feature-persistent-grants";
+ goto abort_transaction;
+ }
+
err = xenbus_transaction_end(xbt, 0);
} while (err == -EAGAIN);
@@ -453,7 +460,12 @@ static int connect_rings(struct backend_info *be)
val = 0;
vif->csum = !val;
- /* Map the shared frame, irq etc. */
+ if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-persistent-grants",
+ "%u", &val) < 0)
+ val = 0;
+ vif->persistent_grant = !!val;
+
+/* Map the shared frame, irq etc. */
err = xenvif_connect(vif, tx_ring_ref, rx_ring_ref, evtchn);
if (err) {
xenbus_dev_fatal(dev, err,
--
1.7.3.4
^ permalink raw reply related
* [PATCH 0/4] Implement persistent grant in xen-netfront/netback
From: Annie Li @ 2012-11-15 7:03 UTC (permalink / raw)
To: xen-devel, netdev, konrad.wilk, Ian.Campbell; +Cc: annie.li
This patch implements persistent grants for xen-netfront/netback. This
mechanism maintains page pools in netback/netfront, these page pools is used to
save grant pages which are mapped. This way improve performance which is wasted
when doing grant operations.
Current netback/netfront does map/unmap grant operations frequently when
transmitting/receiving packets, and grant operations costs much cpu clock. In
this patch, netfront/netback maps grant pages when needed and then saves them
into a page pool for future use. All these pages will be unmapped when
removing/releasing the net device.
In netfront, two pools are maintained for transmitting and receiving packets.
When new grant pages are needed, the driver gets grant pages from this pool
first. If no free grant page exists, it allocates new page, maps it and then
saves it into the pool. The pool size for transmit/receive is exactly tx/rx
ring size. The driver uses memcpy(not grantcopy) to copy data grant pages.
Here, memcpy is copying the whole page size data. I tried to copy len size data
from offset, but network does not seem work well. I am trying to find the root
cause now.
In netback, it also maintains two page pools for tx/rx. When netback gets a
request, it does a search first to find out whether the grant reference of
this request is already mapped into its page pool. If the grant ref is mapped,
the address of this mapped page is gotten and memcpy is used to copy data
between grant pages. However, if the grant ref is not mapped, a new page is
allocated, mapped with this grant ref, and then saved into page pool for
future use. Similarly, memcpy replaces grant copy to copy data between grant
pages. In this implementation, two arrays(gnttab_tx_vif,gnttab_rx_vif) are
used to save vif pointer for every request because current netback is not
per-vif based. This would be changed after implementing 1:1 model in netback.
This patch supports both persistent-grant and non persistent grant. A new
xenstore key "feature-persistent-grants" is used to represent this feature.
This patch is based on linux3.4-rc3. I hit netperf/netserver failure on
linux latest version v3.7-rc1, v3.7-rc2 and v3.7-rc4. Not sure whether this
netperf/netserver failure connects compound page commit in v3.7-rc1, but I did
hit BUG_ON with debug patch from thread
http://lists.xen.org/archives/html/xen-devel/2012-10/msg00893.html
Annie Li (4):
xen/netback: implements persistent grant with one page pool.
xen/netback: Split one page pool into two(tx/rx) page pool.
Xen/netfront: Implement persistent grant in netfront.
fix code indent issue in xen-netfront.
drivers/net/xen-netback/common.h | 24 ++-
drivers/net/xen-netback/interface.c | 26 +++
drivers/net/xen-netback/netback.c | 215 ++++++++++++++++++--
drivers/net/xen-netback/xenbus.c | 14 ++-
drivers/net/xen-netfront.c | 378 +++++++++++++++++++++++++++++------
5 files changed, 570 insertions(+), 87 deletions(-)
--
1.7.3.4
^ permalink raw reply
* [net-next:master 37/50] net/ipv6/sit.c:1243:34: sparse: incorrect type in assignment (different base types)
From: kbuild test robot @ 2012-11-15 5:42 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev
tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 702ed3c1a9dfe4dfe112f13542d0c9d689f5008b
commit: f37234160233561f2a2e3332272ae5b3725b620b [37/50] sit: add support of link creation via rtnl
sparse warnings:
net/ipv6/sit.c:231:21: sparse: restricted __be16 degrades to integer
+ net/ipv6/sit.c:1243:34: sparse: incorrect type in assignment (different base types)
net/ipv6/sit.c:1243:34: expected restricted __be32 [usertype] saddr
net/ipv6/sit.c:1243:34: got unsigned int
net/ipv6/sit.c:1246:34: sparse: incorrect type in assignment (different base types)
net/ipv6/sit.c:1246:34: expected restricted __be32 [usertype] daddr
net/ipv6/sit.c:1246:34: got unsigned int
net/ipv6/sit.c:1261:32: sparse: incorrect type in assignment (different base types)
net/ipv6/sit.c:1261:32: expected restricted __be16 [usertype] i_flags
net/ipv6/sit.c:1261:32: got unsigned short
net/ipv6/sit.c:1340:52: sparse: incorrect type in argument 3 (different base types)
net/ipv6/sit.c:1340:52: expected unsigned short [unsigned] [usertype] value
net/ipv6/sit.c:1340:52: got restricted __be16 [usertype] i_flags
vim +1243 net/ipv6/sit.c
f3723416 Nicolas Dichtel 2012-11-14 1227 struct ip_tunnel_parm *parms)
f3723416 Nicolas Dichtel 2012-11-14 1228 {
f3723416 Nicolas Dichtel 2012-11-14 1229 memset(parms, 0, sizeof(*parms));
f3723416 Nicolas Dichtel 2012-11-14 1230
f3723416 Nicolas Dichtel 2012-11-14 1231 parms->iph.version = 4;
f3723416 Nicolas Dichtel 2012-11-14 1232 parms->iph.protocol = IPPROTO_IPV6;
f3723416 Nicolas Dichtel 2012-11-14 1233 parms->iph.ihl = 5;
f3723416 Nicolas Dichtel 2012-11-14 1234 parms->iph.ttl = 64;
f3723416 Nicolas Dichtel 2012-11-14 1235
f3723416 Nicolas Dichtel 2012-11-14 1236 if (!data)
f3723416 Nicolas Dichtel 2012-11-14 1237 return;
f3723416 Nicolas Dichtel 2012-11-14 1238
f3723416 Nicolas Dichtel 2012-11-14 1239 if (data[IFLA_IPTUN_LINK])
f3723416 Nicolas Dichtel 2012-11-14 1240 parms->link = nla_get_u32(data[IFLA_IPTUN_LINK]);
f3723416 Nicolas Dichtel 2012-11-14 1241
f3723416 Nicolas Dichtel 2012-11-14 1242 if (data[IFLA_IPTUN_LOCAL])
f3723416 Nicolas Dichtel 2012-11-14 @1243 parms->iph.saddr = nla_get_u32(data[IFLA_IPTUN_LOCAL]);
f3723416 Nicolas Dichtel 2012-11-14 1244
f3723416 Nicolas Dichtel 2012-11-14 1245 if (data[IFLA_IPTUN_REMOTE])
f3723416 Nicolas Dichtel 2012-11-14 1246 parms->iph.daddr = nla_get_u32(data[IFLA_IPTUN_REMOTE]);
f3723416 Nicolas Dichtel 2012-11-14 1247
f3723416 Nicolas Dichtel 2012-11-14 1248 if (data[IFLA_IPTUN_TTL]) {
f3723416 Nicolas Dichtel 2012-11-14 1249 parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]);
f3723416 Nicolas Dichtel 2012-11-14 1250 if (parms->iph.ttl)
f3723416 Nicolas Dichtel 2012-11-14 1251 parms->iph.frag_off = htons(IP_DF);
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
^ permalink raw reply
* [net-next:master 35/50] net/ipv6/sit.c:1232:52: sparse: incorrect type in argument 3 (different base types)
From: kbuild test robot @ 2012-11-15 5:31 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev
tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 702ed3c1a9dfe4dfe112f13542d0c9d689f5008b
commit: a12c9a85813e927e1143989876d70697eb85aac9 [35/50] sit/rtnl: add missing parameters on dump
sparse warnings:
net/ipv6/sit.c:263:18: sparse: restricted __be16 degrades to integer
+ net/ipv6/sit.c:1232:52: sparse: incorrect type in argument 3 (different base types)
net/ipv6/sit.c:1232:52: expected unsigned short [unsigned] [usertype] value
net/ipv6/sit.c:1232:52: got restricted __be16 [usertype] i_flags
vim +1232 net/ipv6/sit.c
a12c9a85 Nicolas Dichtel 2012-11-14 1216 nla_total_size(2) +
ba3e3f50 Nicolas Dichtel 2012-11-09 1217 0;
ba3e3f50 Nicolas Dichtel 2012-11-09 1218 }
ba3e3f50 Nicolas Dichtel 2012-11-09 1219
ba3e3f50 Nicolas Dichtel 2012-11-09 1220 static int sit_fill_info(struct sk_buff *skb, const struct net_device *dev)
ba3e3f50 Nicolas Dichtel 2012-11-09 1221 {
ba3e3f50 Nicolas Dichtel 2012-11-09 1222 struct ip_tunnel *tunnel = netdev_priv(dev);
ba3e3f50 Nicolas Dichtel 2012-11-09 1223 struct ip_tunnel_parm *parm = &tunnel->parms;
ba3e3f50 Nicolas Dichtel 2012-11-09 1224
ba3e3f50 Nicolas Dichtel 2012-11-09 1225 if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
ba3e3f50 Nicolas Dichtel 2012-11-09 1226 nla_put_be32(skb, IFLA_IPTUN_LOCAL, parm->iph.saddr) ||
ba3e3f50 Nicolas Dichtel 2012-11-09 1227 nla_put_be32(skb, IFLA_IPTUN_REMOTE, parm->iph.daddr) ||
ba3e3f50 Nicolas Dichtel 2012-11-09 1228 nla_put_u8(skb, IFLA_IPTUN_TTL, parm->iph.ttl) ||
a12c9a85 Nicolas Dichtel 2012-11-14 1229 nla_put_u8(skb, IFLA_IPTUN_TOS, parm->iph.tos) ||
a12c9a85 Nicolas Dichtel 2012-11-14 1230 nla_put_u8(skb, IFLA_IPTUN_PMTUDISC,
a12c9a85 Nicolas Dichtel 2012-11-14 1231 !!(parm->iph.frag_off & htons(IP_DF))) ||
a12c9a85 Nicolas Dichtel 2012-11-14 @1232 nla_put_u16(skb, IFLA_IPTUN_FLAGS, parm->i_flags))
ba3e3f50 Nicolas Dichtel 2012-11-09 1233 goto nla_put_failure;
ba3e3f50 Nicolas Dichtel 2012-11-09 1234 return 0;
ba3e3f50 Nicolas Dichtel 2012-11-09 1235
ba3e3f50 Nicolas Dichtel 2012-11-09 1236 nla_put_failure:
ba3e3f50 Nicolas Dichtel 2012-11-09 1237 return -EMSGSIZE;
ba3e3f50 Nicolas Dichtel 2012-11-09 1238 }
ba3e3f50 Nicolas Dichtel 2012-11-09 1239
ba3e3f50 Nicolas Dichtel 2012-11-09 1240 static struct rtnl_link_ops sit_link_ops __read_mostly = {
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
^ permalink raw reply
* [net-next:master 33/50] net/ipv4/ipip.c:867:34: sparse: incorrect type in assignment (different base types)
From: kbuild test robot @ 2012-11-15 5:16 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev
tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 702ed3c1a9dfe4dfe112f13542d0c9d689f5008b
commit: be42da0e1012bf67d8f6899b7d9162e35527da4b [33/50] ipip: add support of link creation via rtnl
sparse warnings:
+ net/ipv4/ipip.c:867:34: sparse: incorrect type in assignment (different base types)
net/ipv4/ipip.c:867:34: expected restricted __be32 [usertype] saddr
net/ipv4/ipip.c:867:34: got unsigned int
net/ipv4/ipip.c:870:34: sparse: incorrect type in assignment (different base types)
net/ipv4/ipip.c:870:34: expected restricted __be32 [usertype] daddr
net/ipv4/ipip.c:870:34: got unsigned int
vim +867 net/ipv4/ipip.c
be42da0e Nicolas Dichtel 2012-11-14 851 static void ipip_netlink_parms(struct nlattr *data[],
be42da0e Nicolas Dichtel 2012-11-14 852 struct ip_tunnel_parm *parms)
be42da0e Nicolas Dichtel 2012-11-14 853 {
be42da0e Nicolas Dichtel 2012-11-14 854 memset(parms, 0, sizeof(*parms));
be42da0e Nicolas Dichtel 2012-11-14 855
be42da0e Nicolas Dichtel 2012-11-14 856 parms->iph.version = 4;
be42da0e Nicolas Dichtel 2012-11-14 857 parms->iph.protocol = IPPROTO_IPIP;
be42da0e Nicolas Dichtel 2012-11-14 858 parms->iph.ihl = 5;
be42da0e Nicolas Dichtel 2012-11-14 859
be42da0e Nicolas Dichtel 2012-11-14 860 if (!data)
be42da0e Nicolas Dichtel 2012-11-14 861 return;
be42da0e Nicolas Dichtel 2012-11-14 862
be42da0e Nicolas Dichtel 2012-11-14 863 if (data[IFLA_IPTUN_LINK])
be42da0e Nicolas Dichtel 2012-11-14 864 parms->link = nla_get_u32(data[IFLA_IPTUN_LINK]);
be42da0e Nicolas Dichtel 2012-11-14 865
be42da0e Nicolas Dichtel 2012-11-14 866 if (data[IFLA_IPTUN_LOCAL])
be42da0e Nicolas Dichtel 2012-11-14 @867 parms->iph.saddr = nla_get_u32(data[IFLA_IPTUN_LOCAL]);
be42da0e Nicolas Dichtel 2012-11-14 868
be42da0e Nicolas Dichtel 2012-11-14 869 if (data[IFLA_IPTUN_REMOTE])
be42da0e Nicolas Dichtel 2012-11-14 870 parms->iph.daddr = nla_get_u32(data[IFLA_IPTUN_REMOTE]);
be42da0e Nicolas Dichtel 2012-11-14 871
be42da0e Nicolas Dichtel 2012-11-14 872 if (data[IFLA_IPTUN_TTL]) {
be42da0e Nicolas Dichtel 2012-11-14 873 parms->iph.ttl = nla_get_u8(data[IFLA_IPTUN_TTL]);
be42da0e Nicolas Dichtel 2012-11-14 874 if (parms->iph.ttl)
be42da0e Nicolas Dichtel 2012-11-14 875 parms->iph.frag_off = htons(IP_DF);
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
^ permalink raw reply
* [net-next:master 30/50] net/ipv6/ip6_tunnel.c:1571:33: sparse: incorrect type in assignment (different base types)
From: kbuild test robot @ 2012-11-15 4:53 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev
tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 702ed3c1a9dfe4dfe112f13542d0c9d689f5008b
commit: 0b112457229d8a17198a02f3cca32922d2e374f1 [30/50] ip6tnl: add support of link creation via rtnl
sparse warnings:
+ net/ipv6/ip6_tunnel.c:1571:33: sparse: incorrect type in assignment (different base types)
net/ipv6/ip6_tunnel.c:1571:33: expected restricted __be32 [usertype] flowinfo
net/ipv6/ip6_tunnel.c:1571:33: got unsigned int
vim +1571 net/ipv6/ip6_tunnel.c
0b112457 Nicolas Dichtel 2012-11-14 1555
0b112457 Nicolas Dichtel 2012-11-14 1556 if (data[IFLA_IPTUN_LOCAL])
0b112457 Nicolas Dichtel 2012-11-14 1557 nla_memcpy(&parms->laddr, data[IFLA_IPTUN_LOCAL],
0b112457 Nicolas Dichtel 2012-11-14 1558 sizeof(struct in6_addr));
0b112457 Nicolas Dichtel 2012-11-14 1559
0b112457 Nicolas Dichtel 2012-11-14 1560 if (data[IFLA_IPTUN_REMOTE])
0b112457 Nicolas Dichtel 2012-11-14 1561 nla_memcpy(&parms->raddr, data[IFLA_IPTUN_REMOTE],
0b112457 Nicolas Dichtel 2012-11-14 1562 sizeof(struct in6_addr));
0b112457 Nicolas Dichtel 2012-11-14 1563
0b112457 Nicolas Dichtel 2012-11-14 1564 if (data[IFLA_IPTUN_TTL])
0b112457 Nicolas Dichtel 2012-11-14 1565 parms->hop_limit = nla_get_u8(data[IFLA_IPTUN_TTL]);
0b112457 Nicolas Dichtel 2012-11-14 1566
0b112457 Nicolas Dichtel 2012-11-14 1567 if (data[IFLA_IPTUN_ENCAP_LIMIT])
0b112457 Nicolas Dichtel 2012-11-14 1568 parms->encap_limit = nla_get_u8(data[IFLA_IPTUN_ENCAP_LIMIT]);
0b112457 Nicolas Dichtel 2012-11-14 1569
0b112457 Nicolas Dichtel 2012-11-14 1570 if (data[IFLA_IPTUN_FLOWINFO])
0b112457 Nicolas Dichtel 2012-11-14 @1571 parms->flowinfo = nla_get_u32(data[IFLA_IPTUN_FLOWINFO]);
0b112457 Nicolas Dichtel 2012-11-14 1572
0b112457 Nicolas Dichtel 2012-11-14 1573 if (data[IFLA_IPTUN_FLAGS])
0b112457 Nicolas Dichtel 2012-11-14 1574 parms->flags = nla_get_u32(data[IFLA_IPTUN_FLAGS]);
0b112457 Nicolas Dichtel 2012-11-14 1575
0b112457 Nicolas Dichtel 2012-11-14 1576 if (data[IFLA_IPTUN_PROTO])
0b112457 Nicolas Dichtel 2012-11-14 1577 parms->proto = nla_get_u8(data[IFLA_IPTUN_PROTO]);
0b112457 Nicolas Dichtel 2012-11-14 1578 }
0b112457 Nicolas Dichtel 2012-11-14 1579
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
^ permalink raw reply
* Re: [PATCHES] Networking fixes for -stable.
From: Greg KH @ 2012-11-15 4:06 UTC (permalink / raw)
To: David Miller; +Cc: ben, peter.senna, stable, netdev
In-Reply-To: <20121114.223145.1718907430767854932.davem@davemloft.net>
On Wed, Nov 14, 2012 at 10:31:45PM -0500, David Miller wrote:
> From: Ben Hutchings <ben@decadent.org.uk>
> Date: Tue, 13 Nov 2012 19:51:26 +0000
>
> > On Mon, 2012-11-12 at 00:25 -0500, David Miller wrote:
> >> Please queue up the following networking bug fixes for
> >> 3.0.x, 3.2.x, 3.4.x, and 3.6.x, respectively.
> > [...]
> >> From 2204849a85383fbde75680aa199142abe504adbb Mon Sep 17 00:00:00 2001
> >> From: Peter Senna Tschudin <peter.senna@gmail.com>
> >> Date: Sun, 28 Oct 2012 06:12:01 +0000
> >> Subject: [PATCH 7/9] drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister
> >> before mdiobus_free
> >>
> >> [ Upstream commit aa731872f7d33dcb8b54dad0cfb82d4e4d195d7e ]
> >>
> >> Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0
> >>
> >> Calling mdiobus_free without calling mdiobus_unregister causes
> >> BUG_ON(). This patch fixes the issue.
> > [...]
> >
> > This introduces a regresssion, as mdiobus_unregister() is not safe to
> > call if the bus isn't registered. Registration is controlled by the
> > drivers that use mdio-bitbang, and they should take care of
> > unregistration too - and most of them do.
> >
> > This should be reverted in mainline and not applied to any stable
> > series.
>
> Ok, I'll revert.
>
> Greg, please toss it from your -stable queue as well.
Now tossed, thanks.
greg k-h
^ permalink raw reply
* Re: Latest 3.6.6 are not compiling due tg3 network driver, hwmon_device_unregister
From: Nithin Nayak Sujir @ 2012-11-15 3:43 UTC (permalink / raw)
To: David Rientjes
Cc: Paul Gortmaker, Denys Fedoryshchenko, Michael Chan, netdev,
linux-kernel
In-Reply-To: <alpine.DEB.2.00.1211141929510.14414@chino.kir.corp.google.com>
On 11/14/2012 07:30 PM, David Rientjes wrote:
> On Wed, 14 Nov 2012, Nithin Nayak Sujir wrote:
>
>> This was fixed by
>>
>> commit de0a41484c47d783dd4d442914815076aa2caac2
>> Author: Paul Gortmaker <paul.gortmaker@windriver.com>
>> Date: Mon Oct 1 11:43:49 2012 -0400
>>
>> tg3: unconditionally select HWMON support when tg3 is enabled.
>>
> Would you mind submitting this for stable by following the procedure
> described in Documentation/stable_kernel_rules.txt?
>
Will do. Thank you for bringing this to our attention.
Nithin.
^ permalink raw reply
* [PATCH] Revert "drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free"
From: David Miller @ 2012-11-15 3:34 UTC (permalink / raw)
To: netdev
This reverts commit aa731872f7d33dcb8b54dad0cfb82d4e4d195d7e.
As pointed out by Ben Hutchings, this change is not correct.
mdiobus_unregister() can't be called if the bus isn't registered yet,
however this change can result in situations which cause that to
happen.
Part of the confusion here revolves around the fact that the
callers of this module control registration/unregistration,
rather than the module itself.
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/phy/mdio-bitbang.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c
index 6428fcb..daec9b0 100644
--- a/drivers/net/phy/mdio-bitbang.c
+++ b/drivers/net/phy/mdio-bitbang.c
@@ -234,7 +234,6 @@ void free_mdio_bitbang(struct mii_bus *bus)
struct mdiobb_ctrl *ctrl = bus->priv;
module_put(ctrl->ops->owner);
- mdiobus_unregister(bus);
mdiobus_free(bus);
}
EXPORT_SYMBOL(free_mdio_bitbang);
--
1.7.11.7
^ permalink raw reply related
* Re: [PATCHES] Networking fixes for -stable.
From: David Miller @ 2012-11-15 3:31 UTC (permalink / raw)
To: ben; +Cc: gregkh, peter.senna, stable, netdev
In-Reply-To: <1352836286.16264.102.camel@deadeye.wl.decadent.org.uk>
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 13 Nov 2012 19:51:26 +0000
> On Mon, 2012-11-12 at 00:25 -0500, David Miller wrote:
>> Please queue up the following networking bug fixes for
>> 3.0.x, 3.2.x, 3.4.x, and 3.6.x, respectively.
> [...]
>> From 2204849a85383fbde75680aa199142abe504adbb Mon Sep 17 00:00:00 2001
>> From: Peter Senna Tschudin <peter.senna@gmail.com>
>> Date: Sun, 28 Oct 2012 06:12:01 +0000
>> Subject: [PATCH 7/9] drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister
>> before mdiobus_free
>>
>> [ Upstream commit aa731872f7d33dcb8b54dad0cfb82d4e4d195d7e ]
>>
>> Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0
>>
>> Calling mdiobus_free without calling mdiobus_unregister causes
>> BUG_ON(). This patch fixes the issue.
> [...]
>
> This introduces a regresssion, as mdiobus_unregister() is not safe to
> call if the bus isn't registered. Registration is controlled by the
> drivers that use mdio-bitbang, and they should take care of
> unregistration too - and most of them do.
>
> This should be reverted in mainline and not applied to any stable
> series.
Ok, I'll revert.
Greg, please toss it from your -stable queue as well.
Thanks!
^ permalink raw reply
* Re: Latest 3.6.6 are not compiling due tg3 network driver, hwmon_device_unregister
From: David Rientjes @ 2012-11-15 3:30 UTC (permalink / raw)
To: Nithin Nayak Sujir, Paul Gortmaker
Cc: Denys Fedoryshchenko, Michael Chan, netdev, linux-kernel
In-Reply-To: <50A4606D.4020402@broadcom.com>
On Wed, 14 Nov 2012, Nithin Nayak Sujir wrote:
> This was fixed by
>
> commit de0a41484c47d783dd4d442914815076aa2caac2
> Author: Paul Gortmaker <paul.gortmaker@windriver.com>
> Date: Mon Oct 1 11:43:49 2012 -0400
>
> tg3: unconditionally select HWMON support when tg3 is enabled.
>
Would you mind submitting this for stable by following the procedure
described in Documentation/stable_kernel_rules.txt?
^ permalink raw reply
* Re: Latest 3.6.6 are not compiling due tg3 network driver, hwmon_device_unregister
From: Nithin Nayak Sujir @ 2012-11-15 3:24 UTC (permalink / raw)
To: Denys Fedoryshchenko; +Cc: Michael Chan, netdev, linux-kernel
In-Reply-To: <8b566c4a9ee622737212dc17291ee238@visp.net.lb>
This was fixed by
commit de0a41484c47d783dd4d442914815076aa2caac2
Author: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Mon Oct 1 11:43:49 2012 -0400
tg3: unconditionally select HWMON support when tg3 is enabled.
Nithin.
On 11/14/2012 07:03 PM, Denys Fedoryshchenko wrote:
> Hi
>
> During compiling i am getting that:
>
> drivers/built-in.o: In function `tg3_close':
> tg3.c:(.text+0x12902e): undefined reference to `hwmon_device_unregister'
> drivers/built-in.o: In function `tg3_hwmon_open':
> tg3.c:(.text+0x12ae09): undefined reference to `hwmon_device_register'
>
> Kernel config are at http://nuclearcat.com/config-tg3.txt , but i noticed this error are
> appearing at x86, x64 kernels, probably also other 3.6.x series kernels.
> Disabling TG3 driver helps, but i believe it is not a solution.
>
> ---
> Denys Fedoryshchenko, Network Engineer, Virtual ISP S.A.L.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH v2 0/3] macb add support for phy gpio interrupt
From: David Miller @ 2012-11-15 3:23 UTC (permalink / raw)
To: manabian; +Cc: nicolas.ferre, plagnioj, netdev
In-Reply-To: <1352678188-18647-1-git-send-email-manabian@gmail.com>
From: Joachim Eastwood <manabian@gmail.com>
Date: Mon, 12 Nov 2012 00:56:25 +0100
> Main feature of this patch set is phy gpio interrupt for macb.
...
> Patch series was tested on a custom board with DM9161AEP and AT91RM9200 EMAC.
Applied.
If there are problems found during testing we can fix or revert.
^ permalink raw reply
* Re: pull request: batman-adv 2012-11-14
From: David Miller @ 2012-11-15 3:11 UTC (permalink / raw)
To: ordex; +Cc: netdev, b.a.t.m.a.n
In-Reply-To: <1352924189-18843-1-git-send-email-ordex@autistici.org>
From: Antonio Quartulli <ordex@autistici.org>
Date: Wed, 14 Nov 2012 21:16:18 +0100
> here is again our new patchset intended for net-next/linux-3.8.
> Patch 1/11 has been modified to address the problems you pointed out last time;
> however hash_bytes has kept its inline tag and it has been moved to hash.h (in
> this way it becomes usable by the rest of the batman-adv code for new changes).
Pulled, thanks.
^ permalink raw reply
* Re: [PATCH V5 0/7] ARM: AM33XX: net: Add DT support to CPSW and MDIO driver
From: David Miller @ 2012-11-15 3:09 UTC (permalink / raw)
To: mugunthanvnm
Cc: netdev, devicetree-discuss, linux-arm-kernel, linux-omap,
b-cousson, paul
In-Reply-To: <1352920080-6179-1-git-send-email-mugunthanvnm@ti.com>
From: Mugunthan V N <mugunthanvnm@ti.com>
Date: Thu, 15 Nov 2012 00:37:53 +0530
> This patch-series adds support for,
>
> [1/7]: Typo mistake in CPSW driver while invoking runtime_pm api's
>
> [2/7]: Adds parent<->child relation between CPSW & MDIO module inside cpsw
> driver, as in case of AM33XX, the resources are shared and common
> register bit-field is provided to control module/clock enable/disable,
> makes it difficult to handle common resource.
>
> So the solution here is, to create parent<->child relation between them.
>
> [3/7]: cpsw: simplify the setup of the register pointers
>
> [4/7]: cpsw: Kernel warn fix during suspend
>
> [5/7]: Add hwmod entry for MDIO module, required for MDIO driver.
>
> [6/7]: Enable CPSW support to omap2plus_defconfig
>
> [7/7]: Add DT device nodes for both CPSW and MDIO modules in am33xx.dtsi,
> am335x-evm.dts and am335x-bone.dts file
>
> This patch series has been created on top of net-next/master and tested
> on BeagleBone platform for NFS boot and basic ping test cases.
All applied, thanks.
^ permalink raw reply
* Re: pull request: wireless-next 2012-11-14
From: David Miller @ 2012-11-15 3:07 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20121114190510.GA6128@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Wed, 14 Nov 2012 14:05:11 -0500
> This pull request is intended for the 3.8 stream...
Pulled, thanks John.
^ permalink raw reply
* Re: [PATCH net-next 4/4] tg3: Use tp->rxq_cnt when checking RSS tables.
From: David Miller @ 2012-11-15 3:05 UTC (permalink / raw)
To: mchan; +Cc: netdev, nsujir
In-Reply-To: <1352940269-23821-4-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 14 Nov 2012 16:44:29 -0800
> irq_cnt is no longer reliable since rxq_cnt can be independently configured.
>
> Update version to 3.127.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 3/4] tg3: Cleanup hardcoded ethtool test array indexes
From: David Miller @ 2012-11-15 3:05 UTC (permalink / raw)
To: mchan; +Cc: netdev, nsujir
In-Reply-To: <1352940269-23821-3-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 14 Nov 2012 16:44:28 -0800
> From: Nithin Nayak Sujir <nsujir@broadcom.com>
>
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 2/4] tg3: Prevent spurious tx timeout by setting carrier off before tx disable.
From: David Miller @ 2012-11-15 3:05 UTC (permalink / raw)
To: mchan; +Cc: netdev, nsujir
In-Reply-To: <1352940269-23821-2-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 14 Nov 2012 16:44:27 -0800
> From: Nithin Nayak Sujir <nsujir@broadcom.com>
>
> The watchdog will not trigger when the carrier is off when reconfiguring
> the device. Because carrier state is now off during reset, we need to
> introduce a link_up flag to keep track of link state during PHY setup.
>
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 1/4] tg3: Set 10_100_ONLY flag for additional 10/100 Mbps devices
From: David Miller @ 2012-11-15 3:05 UTC (permalink / raw)
To: mchan; +Cc: netdev, nsujir
In-Reply-To: <1352940269-23821-1-git-send-email-mchan@broadcom.com>
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 14 Nov 2012 16:44:26 -0800
> From: Nithin Nayak Sujir <nsujir@broadcom.com>
>
> - Also refactor the conditional to use the existing tg3_pci_tbl array.
> - Set flags in the driver_data field of the pci_device_id structure to
> identify these devices.
> - Add PCI_DEVICE_SUB() to pci.h to declare PCI 4-part IDs to match these
> devices.
>
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
Applied.
^ permalink raw reply
* Latest 3.6.6 are not compiling due tg3 network driver, hwmon_device_unregister
From: Denys Fedoryshchenko @ 2012-11-15 3:03 UTC (permalink / raw)
To: Matt Carlson, Michael Chan, netdev, linux-kernel
Hi
During compiling i am getting that:
drivers/built-in.o: In function `tg3_close':
tg3.c:(.text+0x12902e): undefined reference to
`hwmon_device_unregister'
drivers/built-in.o: In function `tg3_hwmon_open':
tg3.c:(.text+0x12ae09): undefined reference to `hwmon_device_register'
Kernel config are at http://nuclearcat.com/config-tg3.txt , but i
noticed this error are appearing at x86, x64 kernels, probably also
other 3.6.x series kernels.
Disabling TG3 driver helps, but i believe it is not a solution.
---
Denys Fedoryshchenko, Network Engineer, Virtual ISP S.A.L.
^ permalink raw reply
* Re: [PATCH net-next 0/10] Add support of tunnel management via rtnetlink
From: David Miller @ 2012-11-15 3:03 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: netdev, eric.dumazet
In-Reply-To: <1352906047-11604-1-git-send-email-nicolas.dichtel@6wind.com>
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Wed, 14 Nov 2012 16:13:57 +0100
> The goal of this serie is to add the support of ipip, sit and ip6tnl tunnels
> via rtnetlink.
>
> The patch against iproute2 will be sent once the patches are included and
> net-next merged. I can send it on demand.
Great work, all applied to net-next.
Thanks Nicolas!
^ permalink raw reply
* Re: [PATCH v7] Network driver for the Armada 370 and Armada XP ARM Marvell SoCs
From: David Miller @ 2012-11-15 2:59 UTC (permalink / raw)
To: thomas.petazzoni
Cc: romieu, kernel, netdev, linux-arm-kernel, jason, andrew,
gregory.clement, alior, dima
In-Reply-To: <1352905010-24172-1-git-send-email-thomas.petazzoni@free-electrons.com>
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 14 Nov 2012 15:56:44 +0100
> The previous versions of this patch set have been sent on September
> 4th (v1), October 11th (v2), October 23rd (v3), October 26th (v4),
> November 12th (v5), November 13th (v6) and now comes the v7 of the
> driver. The number of comments over the last versions have been really
> small, and I would really appreciate if this driver could land into
> the 3.8 kernel release.
I can't apply this patch to net-next, because for one thing there
are missing dependencies. For example, the file:
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
doesn't exist there, therefore patch #6 won't apply.
^ permalink raw reply
* Re: [patch net] net: correct check in dev_addr_del()
From: David Miller @ 2012-11-15 2:52 UTC (permalink / raw)
To: jiri; +Cc: netdev, eric.dumazet, shemminger, john.r.fastabend
In-Reply-To: <1352897464-832-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Wed, 14 Nov 2012 13:51:04 +0100
> Check (ha->addr == dev->dev_addr) is always true because dev_addr_init()
> sets this. Correct the check to behave properly on addr removal.
>
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
I'm pretty sure this is very intentional.
It's trying to prevent deletion of the implicit dev->dev_addr
entry. But it will allow decementing the reference count to
1, but no further.
I'm not applying this.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox