* [PATCH 1/5] ucc_geth: Reduce IRQ off in xmit path
From: Joakim Tjernlund @ 2012-09-18 16:56 UTC (permalink / raw)
To: netdev; +Cc: Joakim Tjernlund
Currently ucc_geth_start_xmit wraps IRQ off for the
whole body just to be safe.
Reduce the IRQ off period to a minimum.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
drivers/net/ethernet/freescale/ucc_geth.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 9ac14f8..e609c93 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3181,8 +3181,6 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
ugeth_vdbg("%s: IN", __func__);
- spin_lock_irqsave(&ugeth->lock, flags);
-
dev->stats.tx_bytes += skb->len;
/* Start from the next BD that should be filled */
@@ -3196,6 +3194,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
(ugeth->skb_curtx[txQ] +
1) & TX_RING_MOD_MASK(ugeth->ug_info->bdRingLenTx[txQ]);
+ spin_lock_irqsave(&ugeth->lock, flags);
/* set up the buffer descriptor */
out_be32(&((struct qe_bd __iomem *)bd)->buf,
dma_map_single(ugeth->dev, skb->data,
@@ -3207,6 +3206,8 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* set bd status and length */
out_be32((u32 __iomem *)bd, bd_status);
+ spin_unlock_irqrestore(&ugeth->lock, flags);
+
/* Move to next BD in the ring */
if (!(bd_status & T_W))
@@ -3238,8 +3239,6 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
uccf = ugeth->uccf;
out_be16(uccf->p_utodr, UCC_FAST_TOD);
#endif
- spin_unlock_irqrestore(&ugeth->lock, flags);
-
return NETDEV_TX_OK;
}
--
1.7.8.6
^ permalink raw reply related
* [PATCH 2/5] ucc_geth: Word align Ethernet RX data
From: Joakim Tjernlund @ 2012-09-18 16:56 UTC (permalink / raw)
To: netdev; +Cc: Joakim Tjernlund
In-Reply-To: <1347987385-19071-1-git-send-email-Joakim.Tjernlund@transmode.se>
UCC controller can shift received Ethernet frames 2 bytes into the buffer,
making IP data word aligned, this patch enables that feature.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
drivers/net/ethernet/freescale/ucc_geth.c | 19 +++++++++++--------
drivers/net/ethernet/freescale/ucc_geth.h | 1 +
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index e609c93..5f1460a 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -160,6 +160,7 @@ static struct ucc_geth_info ugeth_primary_info = {
.numThreadsRx = UCC_GETH_NUM_OF_THREADS_1,
.riscTx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
.riscRx = QE_RISC_ALLOCATION_RISC1_AND_RISC2,
+ .ipAddressAlignment = 1,
};
static struct ucc_geth_info ugeth_info[8];
@@ -211,12 +212,13 @@ static struct sk_buff *get_new_skb(struct ucc_geth_private *ugeth,
u8 __iomem *bd)
{
struct sk_buff *skb = NULL;
+ u16 buf_len = ugeth->ug_info->uf_info.max_rx_buf_length +
+ UCC_GETH_RX_DATA_BUF_ALIGNMENT +
+ UCC_GETH_RX_IP_ALIGNMENT;
skb = __skb_dequeue(&ugeth->rx_recycle);
if (!skb)
- skb = netdev_alloc_skb(ugeth->ndev,
- ugeth->ug_info->uf_info.max_rx_buf_length +
- UCC_GETH_RX_DATA_BUF_ALIGNMENT);
+ skb = netdev_alloc_skb(ugeth->ndev, buf_len);
if (skb == NULL)
return NULL;
@@ -231,10 +233,9 @@ static struct sk_buff *get_new_skb(struct ucc_geth_private *ugeth,
out_be32(&((struct qe_bd __iomem *)bd)->buf,
dma_map_single(ugeth->dev,
skb->data,
- ugeth->ug_info->uf_info.max_rx_buf_length +
- UCC_GETH_RX_DATA_BUF_ALIGNMENT,
+ buf_len,
DMA_FROM_DEVICE));
-
+ skb_reserve(skb, UCC_GETH_RX_IP_ALIGNMENT);
out_be32((u32 __iomem *)bd,
(R_E | R_I | (in_be32((u32 __iomem*)bd) & R_W)));
@@ -1877,7 +1878,8 @@ static void ucc_geth_free_rx(struct ucc_geth_private *ugeth)
in_be32(&((struct qe_bd __iomem *)bd)->buf),
ugeth->ug_info->
uf_info.max_rx_buf_length +
- UCC_GETH_RX_DATA_BUF_ALIGNMENT,
+ UCC_GETH_RX_DATA_BUF_ALIGNMENT +
+ UCC_GETH_RX_IP_ALIGNMENT,
DMA_FROM_DEVICE);
dev_kfree_skb_any(
ugeth->rx_skbuff[i][j]);
@@ -3352,7 +3354,8 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
if (skb_queue_len(&ugeth->rx_recycle) < RX_BD_RING_LEN &&
skb_recycle_check(skb,
ugeth->ug_info->uf_info.max_rx_buf_length +
- UCC_GETH_RX_DATA_BUF_ALIGNMENT))
+ UCC_GETH_RX_DATA_BUF_ALIGNMENT +
+ UCC_GETH_RX_IP_ALIGNMENT))
__skb_queue_head(&ugeth->rx_recycle, skb);
else
dev_kfree_skb(skb);
diff --git a/drivers/net/ethernet/freescale/ucc_geth.h b/drivers/net/ethernet/freescale/ucc_geth.h
index f71b3e7..aeb743c 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.h
+++ b/drivers/net/ethernet/freescale/ucc_geth.h
@@ -855,6 +855,7 @@ struct ucc_geth_hardware_statistics {
#define UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT 4
#define UCC_GETH_TX_BD_RING_SIZE_MEMORY_ALIGNMENT 32
#define UCC_GETH_RX_DATA_BUF_ALIGNMENT 64
+#define UCC_GETH_RX_IP_ALIGNMENT 2 /* IP word alignment */
#define UCC_GETH_TAD_EF 0x80
#define UCC_GETH_TAD_V 0x40
--
1.7.8.6
^ permalink raw reply related
* [PATCH 3/5] ucc_geth: Fix two gcc warnings
From: Joakim Tjernlund @ 2012-09-18 16:56 UTC (permalink / raw)
To: netdev; +Cc: Joakim Tjernlund
In-Reply-To: <1347987385-19071-1-git-send-email-Joakim.Tjernlund@transmode.se>
ucc_geth.c: In function 'ucc_geth_startup':
ucc_geth.c:3092:45: warning: comparison between 'enum qe_fltr_largest_external_tbl_lookup_key_size' and 'enum qe_fltr_tbl_lookup_key_size'
ucc_geth.c:3096:45: warning: comparison between 'enum qe_fltr_largest_external_tbl_lookup_key_size' and 'enum qe_fltr_tbl_lookup_key_size'
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
drivers/net/ethernet/freescale/ucc_geth.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 5f1460a..7d60b95 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3074,11 +3074,11 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
if (ug_info->rxExtendedFiltering) {
size += THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING;
if (ug_info->largestexternallookupkeysize ==
- QE_FLTR_TABLE_LOOKUP_KEY_SIZE_8_BYTES)
+ QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_8_BYTES)
size +=
THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_8;
if (ug_info->largestexternallookupkeysize ==
- QE_FLTR_TABLE_LOOKUP_KEY_SIZE_16_BYTES)
+ QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_16_BYTES)
size +=
THREAD_RX_PRAM_ADDITIONAL_FOR_EXTENDED_FILTERING_16;
}
--
1.7.8.6
^ permalink raw reply related
* [PATCH 4/5] ucc_geth: Increase RX ring buffer from 32 to 64
From: Joakim Tjernlund @ 2012-09-18 16:56 UTC (permalink / raw)
To: netdev; +Cc: Joakim Tjernlund
In-Reply-To: <1347987385-19071-1-git-send-email-Joakim.Tjernlund@transmode.se>
We still see dropped pkgs in a busy network, this makes it better.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
drivers/net/ethernet/freescale/ucc_geth.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.h b/drivers/net/ethernet/freescale/ucc_geth.h
index aeb743c..b68637e 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.h
+++ b/drivers/net/ethernet/freescale/ucc_geth.h
@@ -878,7 +878,7 @@ struct ucc_geth_hardware_statistics {
/* Driver definitions */
#define TX_BD_RING_LEN 0x10
-#define RX_BD_RING_LEN 0x20
+#define RX_BD_RING_LEN 0x40
#define TX_RING_MOD_MASK(size) (size-1)
#define RX_RING_MOD_MASK(size) (size-1)
--
1.7.8.6
^ permalink raw reply related
* [PATCH 5/5] ucc_geth: Add IRQ coalescing
From: Joakim Tjernlund @ 2012-09-18 16:56 UTC (permalink / raw)
To: netdev; +Cc: Joakim Tjernlund
In-Reply-To: <1347987385-19071-1-git-send-email-Joakim.Tjernlund@transmode.se>
Enable modest IRQ coalescing(4 pks) to reduce IRQ load.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
arch/powerpc/include/asm/qe.h | 1 +
drivers/net/ethernet/freescale/ucc_geth.c | 18 +++++++++++++++---
drivers/net/ethernet/freescale/ucc_geth.h | 20 ++++++++++++++++++++
3 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/qe.h b/arch/powerpc/include/asm/qe.h
index 5e0b6d5..12a8ac8 100644
--- a/arch/powerpc/include/asm/qe.h
+++ b/arch/powerpc/include/asm/qe.h
@@ -373,6 +373,7 @@ enum comm_dir {
#define QE_MCC_STOP_RX 0x00000009
#define QE_ATM_TRANSMIT 0x0000000a
#define QE_HPAC_CLEAR_ALL 0x0000000b
+#define QE_SET_LAST_RX_THLD 0x00000013
#define QE_GRACEFUL_STOP_RX 0x0000001a
#define QE_RESTART_RX 0x0000001b
#define QE_HPAC_SET_PRIORITY 0x0000010b
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 7d60b95..772f796 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -124,7 +124,7 @@ static struct ucc_geth_info ugeth_primary_info = {
.ecamptr = ((uint32_t) NULL),
.eventRegMask = UCCE_OTHER,
.pausePeriod = 0xf000,
- .interruptcoalescingmaxvalue = {1, 1, 1, 1, 1, 1, 1, 1},
+ .interruptcoalescingmaxvalue = {4, 4, 4, 4, 4, 4, 4, 4},
.bdRingLenTx = {
TX_BD_RING_LEN,
TX_BD_RING_LEN,
@@ -237,7 +237,7 @@ static struct sk_buff *get_new_skb(struct ucc_geth_private *ugeth,
DMA_FROM_DEVICE));
skb_reserve(skb, UCC_GETH_RX_IP_ALIGNMENT);
out_be32((u32 __iomem *)bd,
- (R_E | R_I | (in_be32((u32 __iomem*)bd) & R_W)));
+ (R_E | (in_be32((u32 __iomem*)bd) & R_W)));
return skb;
}
@@ -1606,6 +1606,7 @@ static void adjust_link(struct net_device *dev)
struct ucc_fast __iomem *uf_regs;
struct phy_device *phydev = ugeth->phydev;
int new_state = 0;
+ u32 cecr_subblock;
ug_regs = ugeth->ug_regs;
uf_regs = ugeth->uccf->uf_regs;
@@ -1657,6 +1658,17 @@ static void adjust_link(struct net_device *dev)
dev->name, phydev->speed);
break;
}
+ cecr_subblock = ucc_fast_get_qe_cr_subblock(ugeth->ug_info->uf_info.ucc_num);
+ if (phydev->speed == SPEED_10)
+ qe_issue_cmd(QE_SET_LAST_RX_THLD, cecr_subblock,
+ QE_CR_PROTOCOL_ETHERNET, UCC_10_TIME);
+ else if (phydev->speed == SPEED_100)
+ qe_issue_cmd(QE_SET_LAST_RX_THLD, cecr_subblock,
+ QE_CR_PROTOCOL_ETHERNET, UCC_100_TIME);
+ else if (phydev->speed == SPEED_1000)
+ qe_issue_cmd(QE_SET_LAST_RX_THLD, cecr_subblock,
+ QE_CR_PROTOCOL_ETHERNET, UCC_GBIT_TIME);
+
ugeth->oldspeed = phydev->speed;
}
@@ -2390,7 +2402,7 @@ static int ucc_geth_alloc_rx(struct ucc_geth_private *ugeth)
bd = ugeth->rxBd[j] = ugeth->p_rx_bd_ring[j];
for (i = 0; i < ug_info->bdRingLenRx[j]; i++) {
/* set bd status and length */
- out_be32((u32 __iomem *)bd, R_I);
+ out_be32((u32 __iomem *)bd, 0);
/* clear bd buffer */
out_be32(&((struct qe_bd __iomem *)bd)->buf, 0);
bd += sizeof(struct qe_bd);
diff --git a/drivers/net/ethernet/freescale/ucc_geth.h b/drivers/net/ethernet/freescale/ucc_geth.h
index b68637e..49165ce 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.h
+++ b/drivers/net/ethernet/freescale/ucc_geth.h
@@ -923,6 +923,26 @@ struct ucc_geth_hardware_statistics {
#define UCC_GETH_MACCFG1_INIT 0
#define UCC_GETH_MACCFG2_INIT (MACCFG2_RESERVED_1)
+/*
+ * From QUICC Engine Block Reference Manual, Chap 8.9:
+ * This command is used to set a timeout value for the Ethernet receiver
+ * interrupt coalescing mechanism.
+ * The timeout period is measured from the time that the last Ethernet frame
+ * was received. When the timeout expires, an interrupt is issued to the CPU
+ * even if the interrupt coalescing counter did not reach its maximum value. The
+ * timeout value should be written in the two least significant bytes of CECDR,
+ * and it should be specified in terms of serial clocks.
+ * For example, a value of 1000 in CECDR sets the timeout period to 1000 serial
+ * clocks.
+ * -------------------------------------------------------------------
+ * GBIT = 125MHz => 8ns/tick, 8 bits / tick
+ * 100 = 25 MHz => 40ns/tick, 4 bits / tick
+ * 10 = 2.5 MHz => 400ns/tick, 4 bits / tick
+ */
+#define UCC_GBIT_TIME 64
+#define UCC_100_TIME 64
+#define UCC_10_TIME 8
+
/* Ethernet Address Type. */
enum enet_addr_type {
ENET_ADDR_TYPE_INDIVIDUAL,
--
1.7.8.6
^ permalink raw reply related
* [PATCH 1/3] net/ieee802154/6lowpan.c: Remove unecessary semicolon
From: Peter Senna Tschudin @ 2012-09-18 17:10 UTC (permalink / raw)
To: alex.bluesman.smirnov
Cc: dbaryshkov, davem, linux-zigbee-devel, netdev, linux-kernel,
kernel-janitors, trivial, Peter Senna Tschudin
Found by http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
net/ieee802154/6lowpan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index d529111..6d42c17 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1256,7 +1256,7 @@ static int lowpan_device_event(struct notifier_block *unused,
}
unregister_netdevice_many(&del_list);
- };
+ }
out:
return NOTIFY_DONE;
--
1.7.11.4
^ permalink raw reply related
* [PATCH 2/3] net/openvswitch/vport.c: Remove unecessary semicolon
From: Peter Senna Tschudin @ 2012-09-18 17:10 UTC (permalink / raw)
To: jesse-l0M0P4e3n4LQT0dZR+AlfA
Cc: dev-yBygre7rU0TnMu66kgdUjQ, trivial-DgEjT+Ai2ygdnm+yROfE0A,
netdev-u79uwXL29TY76Z2rM5mHXA, Peter Senna Tschudin,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q
In-Reply-To: <1347988245-31413-1-git-send-email-peter.senna-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Found by http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin <peter.senna-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/openvswitch/vport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 9055dd6..03779e8 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -398,7 +398,7 @@ void ovs_vport_record_error(struct vport *vport, enum vport_err_type err_type)
case VPORT_E_TX_ERROR:
vport->err_stats.tx_errors++;
break;
- };
+ }
spin_unlock(&vport->stats_lock);
}
--
1.7.11.4
^ permalink raw reply related
* [PATCH 3/3] net/tipc/name_table.c: Remove unecessary semicolon
From: Peter Senna Tschudin @ 2012-09-18 17:10 UTC (permalink / raw)
To: jon.maloy
Cc: allan.stephens, davem, netdev, tipc-discussion, linux-kernel,
kernel-janitors, trivial, Peter Senna Tschudin
In-Reply-To: <1347988245-31413-1-git-send-email-peter.senna@gmail.com>
Found by http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
net/tipc/name_table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 98975e8..4675477 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -783,7 +783,7 @@ static int subseq_list(struct sub_seq *sseq, char *buf, int len, u32 depth,
if (!list_is_last(&publ->zone_list, &info->zone_list))
ret += tipc_snprintf(buf + ret, len - ret,
"\n%33s", " ");
- };
+ }
ret += tipc_snprintf(buf + ret, len - ret, "\n");
return ret;
--
1.7.11.4
^ permalink raw reply related
* Re: [PATCH 0/6] llc2: Simplify llc_station
From: Ben Hutchings @ 2012-09-18 17:29 UTC (permalink / raw)
To: David Miller; +Cc: acme, netdev
In-Reply-To: <20120917.131017.1646567691887140571.davem@davemloft.net>
On Mon, Sep 17, 2012 at 01:10:17PM -0400, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Mon, 17 Sep 2012 13:05:31 -0400 (EDT)
>
> > From: Ben Hutchings <ben@decadent.org.uk>
> > Date: Sun, 16 Sep 2012 04:09:42 +0100
> >
> >> There seem to have been some grand plans for llc_station, but as they
> >> haven't been fulfilled it's just unnecessarily complicated.
> >
> > I went over these a few times, they look correct, so I am going
> > to apply them to net-next.
> >
> > If there are any problems let's hope that exposure in the tree
> > helps shake those out.
>
> It doesn't even build properly, please fix this and resubmit:
>
> ERROR: "sysctl_llc_station_ack_timeout" [net/llc/llc2.ko] undefined!
Sorry, I was able to build net/llc/ successfully but didn't do a full
build which would have caught this.
Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
^ permalink raw reply
* Re: [PATCH 0/6] llc2: Simplify llc_station
From: Ben Hutchings @ 2012-09-18 17:49 UTC (permalink / raw)
To: David Miller; +Cc: acme, netdev
In-Reply-To: <20120917.131237.518528991078697534.davem@davemloft.net>
On Mon, Sep 17, 2012 at 01:12:37PM -0400, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Mon, 17 Sep 2012 13:10:17 -0400 (EDT)
>
> > From: David Miller <davem@davemloft.net>
> > Date: Mon, 17 Sep 2012 13:05:31 -0400 (EDT)
> >
> >> From: Ben Hutchings <ben@decadent.org.uk>
> >> Date: Sun, 16 Sep 2012 04:09:42 +0100
> >>
> >>> There seem to have been some grand plans for llc_station, but as they
> >>> haven't been fulfilled it's just unnecessarily complicated.
> >>
> >> I went over these a few times, they look correct, so I am going
> >> to apply them to net-next.
> >>
> >> If there are any problems let's hope that exposure in the tree
> >> helps shake those out.
> >
> > It doesn't even build properly, please fix this and resubmit:
> >
> > ERROR: "sysctl_llc_station_ack_timeout" [net/llc/llc2.ko] undefined!
>
> Actually, since I trusted you when you said you build tested this,
> I pushed it out to net-next pre-maturely.
>
> I'm going to fix this meanwhile by simply removing the sysctl that
> references this symbol.
>
> But you need to check for me whether that's ok or not.
The sysctl had no effect so I think it's fairly safe to assume nothing
depends on it. Thanks.
Ben.
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
^ permalink raw reply
* Re: [V4 PATCH 0/8] csiostor: Chelsio FCoE offload driver submission
From: Naresh Kumar Inna @ 2012-09-18 17:50 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi@vger.kernel.org, netdev@vger.kernel.org
In-Reply-To: <1347957374.2388.15.camel@dabdike.int.hansenpartnership.com>
On 9/18/2012 2:06 PM, James Bottomley wrote:
> On Tue, 2012-09-18 at 09:54, Naresh Kumar Inna wrote:
>> Hi James,
>>
>> Could you please consider merging version V4 of the driver patches, if
>> you think they are in good shape now?
>
> Well, definitely not yet; you seem to have missed the memo on readq:
>
> CC [M] drivers/scsi/cxgbi/cxgb4i/cxgb4i.o
> drivers/scsi/csiostor/csio_hw.c: In function csio_hw_mc_read:
> drivers/scsi/csiostor/csio_hw.c:194:3: error: implicit declaration of
> function readq [-Werror=implicit-function-declaration]
>
> It's only defined on platforms which can support an atomic 64 bit
> operation (which is mostly not any 32 bit platforms) ... so this could
> do with compile testing on those.
>
> To see how to handle readq/writeq in the 32 bit case, see the uses in
> fnic or qla2xxx
>
Thanks for reviewing. I will fix up readq/writeq, as well as other
32-bit compilation issues, if any.
> You also have a couple of unnecessary version.h includes.
>
I will get rid of them.
> Since you're a new driver, could you not do a correctly unlocked
> queuecommand routine? You'll find the way you've currently got it coded
> (holding the host lock for the entire queuecommand routine) is very
> performance detrimental.
>
Yes, I am aware of that. However, some of this code was written and
tested before the lock-less queuecommand came into existence. Going the
lock-less route would require me to test the driver thoroughly again. It
definitely is in my to-do list, but I would like to take that up after
the initial submission goes through. Would that be OK?
> You have a lot of locking statements which aren't easy to audit by hand
> because there are multiple unlocks. Things like this:
>
> csio_scan_finished(struct Scsi_Host *shost, unsigned long time)
> {
> struct csio_lnode *ln = shost_priv(shost);
> int rv = 0;
>
> spin_lock_irq(shost->host_lock);
> if (!ln->hwp || csio_list_deleted(&ln->sm.sm_list)) {
> spin_unlock_irq(shost->host_lock);
> return 1;
> }
>
> rv = csio_scan_done(ln, jiffies, time, csio_max_scan_tmo * HZ,
> csio_delta_scan_tmo * HZ);
>
> spin_unlock_irq(shost->host_lock);
>
> return rv;
> }
>
> Are better coded as
>
> csio_scan_finished(struct Scsi_Host *shost, unsigned long time)
> {
> struct csio_lnode *ln = shost_priv(shost);
> int rv = 1;
>
> spin_lock_irq(shost->host_lock);
> if (!ln->hwp || csio_list_deleted(&ln->sm.sm_list))
> goto out;
>
> rv = csio_scan_done(ln, jiffies, time, csio_max_scan_tmo * HZ,
> csio_delta_scan_tmo * HZ);
>
> out:
> spin_unlock_irq(shost->host_lock);
>
> return rv;
> }
>
> It's shorter and the unlock clearly matches the lock. You could even
> invert the if logic and just make the csio_scan_done() conditional on it
> avoiding the goto.
>
I will try to minimize the lock/unlock mismatch instances per your
suggestions, if not eliminate them altogether.
> I'd also really like the people who understand FC to take a look over
> this as well.
>
Sure.
Thanks,
Naresh.
^ permalink raw reply
* Re: [PATCH net-next] mlx4: use dev_kfree_skb() instead of dev_kfree_skb_any()
From: Or Gerlitz @ 2012-09-18 19:58 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Yevgeny Petrilin, Or Gerlitz, Ying Cai
In-Reply-To: <1347866974.26523.53.camel@edumazet-glaptop>
On Mon, Sep 17, 2012 at 10:29 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Since commit e22979d96a5 (mlx4_en: Moving to Interrupts for TX
> completions), we no longer can free TX skb from hard IRQ, but only from
> normal softirq or process context.
>
> Therefore, we can directly call dev_kfree_skb() from
> mlx4_en_free_tx_desc() like other conventional NAPI drivers.
Hi Eric,
The team is all off till tomorrow, we will look and get back to you
Or.
^ permalink raw reply
* Re: [PATCH net-next V4 0/2] Add rtnl_link_ops support to IPoIB
From: Or Gerlitz @ 2012-09-18 20:07 UTC (permalink / raw)
To: Roland Dreier, David Miller; +Cc: netdev
In-Reply-To: <1347551797-2495-1-git-send-email-ogerlitz@mellanox.com>
On Thu, Sep 13, 2012 at 6:56 PM, Or Gerlitz <ogerlitz@mellanox.com> wrote:
> This is about adding rtnl_link_ops to IPoIB, primarly addressing feedback
> from Dave on a similar patch that was part of the eIPoIB submission.
[...]
> Roland, this patch is hanging out for pretty long while (few months) without
> any comment from you, if it makes things easier, I would like to merge it through
> net-next, makes sense?
Hi Roland,
Haven't heard from you on this patch, are you picking this or it can
get in though net-next?
Or.
> Changes from V3:
> - addressed feedback from Patrick McHardy to move the IFLA_IPOIB_yyy ipoib
> rtnl defintions into include/linux/if_link.h
> - changed IFLA_IPOIB_CHILD_PKEY to be named IFLA_IPOIB_PKEY which will cope
> with more IFLA_IPOIB_yyy entries to be added once the basic support is in
>
> Changes from V2:
> - removed the notion of user defined index per child, since we can do well w.o it
> - for that end, make (an internal to ipoib) distrinction between legacy childs created
> through the old sysfs way to childs created using rtnl link ops
>
> Changes from V1:
> - applied feedback from Dave Miller to avoid using sysfs
> - added rtnl_link_ops support in ipoib and use them to add/delete childs
>
> Or Gerlitz (1):
> IB/ipoib: Add rtnl_link_ops support
^ permalink raw reply
* Re: [PATCH net-next v3 0/4] Take care of xfrm policy when checking dst entries
From: David Miller @ 2012-09-18 20:08 UTC (permalink / raw)
To: nicolas.dichtel
Cc: vyasevich, eric.dumazet, sds, james.l.morris, eparis, sri,
linux-sctp, netdev
In-Reply-To: <20120917.155458.777649470378504320.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Mon, 17 Sep 2012 15:54:58 -0400 (EDT)
> I'm reconsidering putting Eric's patch into 'net' and that would
> allow me to use your v3 patches as-is.
And that's what I've done just now, thanks.
^ permalink raw reply
* Re: [PATCH net-next V4 0/2] Add rtnl_link_ops support to IPoIB
From: David Miller @ 2012-09-18 20:12 UTC (permalink / raw)
To: or.gerlitz; +Cc: roland, netdev
In-Reply-To: <CAJZOPZL6cEEbyMgj+3_h-ZHf0jzNs3yF=f3uOTrKB6EO4Vx2yw@mail.gmail.com>
From: Or Gerlitz <or.gerlitz@gmail.com>
Date: Tue, 18 Sep 2012 23:07:54 +0300
> On Thu, Sep 13, 2012 at 6:56 PM, Or Gerlitz <ogerlitz@mellanox.com> wrote:
>> This is about adding rtnl_link_ops to IPoIB, primarly addressing feedback
>> from Dave on a similar patch that was part of the eIPoIB submission.
> [...]
>> Roland, this patch is hanging out for pretty long while (few months) without
>> any comment from you, if it makes things easier, I would like to merge it through
>> net-next, makes sense?
>
>
> Hi Roland,
>
> Haven't heard from you on this patch, are you picking this or it can
> get in though net-next?
Nobody has given any generic networking review to this patch yet, and given
that I'd be very disappointed if Roland went ahead and applied this.
You never need to ping people over issues like this and it's extremely
irritating that you keep doing this.
Everything you need to know is at:
http://patchwork.ozlabs.org/project/netdev/list/
And you can clearly see your patch sitting there in "Under Review"
state.
You simply need to be patient and wait for people to get to reviewing
your patch rather than forcing the issue with pings. We track patches
in patchwork so we don't need to waste time with "pings"
^ permalink raw reply
* Re: [PATCH 1/3] net/ieee802154/6lowpan.c: Remove unecessary semicolon
From: David Miller @ 2012-09-18 20:13 UTC (permalink / raw)
To: peter.senna
Cc: alex.bluesman.smirnov, dbaryshkov, linux-zigbee-devel, netdev,
linux-kernel, kernel-janitors, trivial
In-Reply-To: <1347988245-31413-1-git-send-email-peter.senna@gmail.com>
From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: Tue, 18 Sep 2012 19:10:43 +0200
> Found by http://coccinelle.lip6.fr/
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/3] net/openvswitch/vport.c: Remove unecessary semicolon
From: David Miller @ 2012-09-18 20:13 UTC (permalink / raw)
To: peter.senna-Re5JQEeQqe8AvxtiuMwx3w
Cc: dev-yBygre7rU0TnMu66kgdUjQ, trivial-DgEjT+Ai2ygdnm+yROfE0A,
netdev-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1347988245-31413-2-git-send-email-peter.senna-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Peter Senna Tschudin <peter.senna-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Tue, 18 Sep 2012 19:10:44 +0200
> Found by http://coccinelle.lip6.fr/
>
> Signed-off-by: Peter Senna Tschudin <peter.senna-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Applied.
^ permalink raw reply
* Re: [PATCH 3/3] net/tipc/name_table.c: Remove unecessary semicolon
From: David Miller @ 2012-09-18 20:13 UTC (permalink / raw)
To: peter.senna
Cc: jon.maloy, trivial, netdev, kernel-janitors, linux-kernel,
tipc-discussion, allan.stephens
In-Reply-To: <1347988245-31413-3-git-send-email-peter.senna@gmail.com>
From: Peter Senna Tschudin <peter.senna@gmail.com>
Date: Tue, 18 Sep 2012 19:10:45 +0200
> Found by http://coccinelle.lip6.fr/
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Applied.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
^ permalink raw reply
* Re: [PATCH] xfrm_user: return error pointer instead of NULL
From: David Miller @ 2012-09-18 20:16 UTC (permalink / raw)
To: steffen.klassert; +Cc: minipli, netdev, linux-kernel, stable
In-Reply-To: <20120917071642.GC13023@secunet.com>
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Mon, 17 Sep 2012 09:16:42 +0200
> On Thu, Sep 13, 2012 at 11:41:26PM +0200, Mathias Krause wrote:
>> When dump_one_state() returns an error, e.g. because of a too small
>> buffer to dump the whole xfrm state, xfrm_state_netlink() returns NULL
>> instead of an error pointer. But its callers expect an error pointer
>> and therefore continue to operate on a NULL skbuff.
>>
>> This could lead to a privilege escalation (execution of user code in
>> kernel context) if the attacker has CAP_NET_ADMIN and is able to map
>> address 0.
>
> Or it simply crashes with a NULL pointer dereference.
>
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Mathias Krause <minipli@googlemail.com>
>
> Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Applied, and queued up for -stable.
Please do not CC: stable explicitly in your patch submissions,
I removed it from the patch.
Instead, ask me to queue the patch up for -stable. We handle stable
submissed via a patch queue which I maintain at:
http://patchwork.ozlabs.org/user/bundle/2566/?state=*
so that I can let patches cook in Linus's tree for a length of
time of my choosing, rather than having bug fixes automatically
propagate the moment it hits Linus's tree.
Thanks.
^ permalink raw reply
* Re: [PATCH] xfrm_user: return error pointer instead of NULL #2
From: David Miller @ 2012-09-18 20:16 UTC (permalink / raw)
To: steffen.klassert; +Cc: minipli, netdev, linux-kernel, stable
In-Reply-To: <20120917071853.GD13023@secunet.com>
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Mon, 17 Sep 2012 09:18:53 +0200
> On Fri, Sep 14, 2012 at 09:58:32PM +0200, Mathias Krause wrote:
>> When dump_one_policy() returns an error, e.g. because of a too small
>> buffer to dump the whole xfrm policy, xfrm_policy_netlink() returns
>> NULL instead of an error pointer. But its caller expects an error
>> pointer and therefore continues to operate on a NULL skbuff.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Mathias Krause <minipli@googlemail.com>
>
> Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Applied and queued up for -stable.
^ permalink raw reply
* Re: [PATCH] bnx2x: fix rx checksum validation for IPv6
From: David Miller @ 2012-09-18 20:17 UTC (permalink / raw)
To: eric.dumazet
Cc: mschmidt, netdev, eilong, edumazet, yanivr, yuvalmin, meravs,
evansr, therbert, willemb, hskinnemoen
In-Reply-To: <1347578079.8555.141.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 14 Sep 2012 01:14:39 +0200
> On Fri, 2012-09-14 at 00:59 +0200, Michal Schmidt wrote:
>> Commit d6cb3e41 "bnx2x: fix checksum validation" caused a performance
>> regression for IPv6. Rx checksum offload does not work. IPv6 packets
>> are passed to the stack with CHECKSUM_NONE.
>>
>> The hardware obviously cannot perform IP checksum validation for IPv6,
>> because there is no checksum in the IPv6 header. This should not prevent
>> us from setting CHECKSUM_UNNECESSARY.
>>
>> Tested on BCM57711.
>>
>> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
...
> Thanks for fixing this bug !
>
> Acked-by: Eric Dumazet <edumazet@google.com>
>
>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
From: David Miller @ 2012-09-18 20:23 UTC (permalink / raw)
To: rajesh.borundia; +Cc: nikolay, sony.chacko, netdev
In-Reply-To: <13A253B3F9BEFE43B93C09CF75F63CAA827E3AE9F9@MNEXMB1.qlogic.org>
No, this is not the correct way to submit patches written by other
people.
Look at how people like Jeff Kirsher submits Intel driver patches
written by people other than himself.
^ permalink raw reply
* Re: [PATCH] netxen: check for root bus in netxen_mask_aer_correctable
From: David Miller @ 2012-09-18 20:23 UTC (permalink / raw)
To: nikolay; +Cc: sony.chacko, rajesh.borundia, netdev
In-Reply-To: <1347637803-4837-1-git-send-email-nikolay@redhat.com>
From: nikolay@redhat.com
Date: Fri, 14 Sep 2012 17:50:03 +0200
> From: Nikolay Aleksandrov <nikolay@redhat.com>
>
> Add a check if pdev->bus->self == NULL (root bus). When attaching
> a netxen NIC to a VM it can be on the root bus and the guest would
> crash in netxen_mask_aer_correctable() because of a NULL pointer
> dereference if CONFIG_PCIEAER is present.
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH] net: fix memory leak on oom with zerocopy
From: David Miller @ 2012-09-18 20:25 UTC (permalink / raw)
To: mst; +Cc: edumazet, bhutchings, mirq-linux, netdev, linux-kernel
In-Reply-To: <20120916084416.GA22936@redhat.com>
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Sun, 16 Sep 2012 11:44:16 +0300
> If orphan flags fails, we don't free the skb
> on receive, which leaks the skb memory.
>
> Return value was also wrong: netif_receive_skb
> is supposed to return NET_RX_DROP, not ENOMEM.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Applied, thanks Michael.
^ permalink raw reply
* Re: [patch net] sky2: fix rx filter setup on link up
From: David Miller @ 2012-09-18 20:25 UTC (permalink / raw)
To: shemminger; +Cc: jiri, netdev, mlindner, linux-kernel
In-Reply-To: <20120917141507.7528b3ee@nehalam.linuxnetplumber.net>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 17 Sep 2012 14:15:07 -0700
> Are you sure it isn't IPv6 or something else setting additional mulitcast
> addresses. You may need to instrument the set_multicast call.
I'm confident in Jiri's analysis and patch and it's clear the hardware
is doing this on it's own, so please take his bug fix seriously.
^ 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