* Re: Bug#625914: linux-image-2.6.38-2-amd64: bridging is not interacting well with multicast in 2.6.38-4
From: Ben Hutchings @ 2011-05-10 12:42 UTC (permalink / raw)
To: Noah Meyerhans; +Cc: 625914, netdev, bridge
In-Reply-To: <20110510043833.GG6397@morgul.net>
[-- Attachment #1: Type: text/plain, Size: 980 bytes --]
On Mon, 2011-05-09 at 21:38 -0700, Noah Meyerhans wrote:
> On Tue, May 10, 2011 at 03:38:44AM +0100, Ben Hutchings wrote:
> > This is pretty weird. Debian version 2.6.38-3 has a few bridging
> > changes from stable 2.6.38.3 and 2.6.38.4, but they don't look like they
> > would cause this.
>
> I have apparently filed the bug against the wrong version of Debian's
> kernel. 2.6.38-3 is not affected, and works as expected. The change
> was introduced in -4. That may have been clear from the report itself,
> but the report was filed against -3. I've fixed that in the BTS.
I gathered that, and then made the same mistake in writing the above!
The version with the regression, 2.6.38-4, includes the changes from
stable 2.6.38.3 and 2.6.38.4
Ben.
> I've also confirmed that -5 is affected, to no great surprise.
>
> I'll investigate further.
>
> noah
>
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* [PATCH 1/3] RFC gianfar: add rx_ntuple feature
From: Sebastian.Poehn @ 2011-05-10 12:53 UTC (permalink / raw)
To: netdev
Patches created against net-next-2.6!
This series implements the set_rx_ntuple feature for ethtool. Code is well tested and should be stable. Some code rework and better integration into gianfar_ethtool.c have to been done! Note that all rx flow hashing stuff on hardware will be overwritten!
This part extends some hardware bit-flags and adds some data structures for ntuple conversion and storage.
--- gianfar.h.orig 2011-05-10 11:26:43.113744000 +0200
+++ gianfar.h 2011-05-10 12:59:15.301744599 +0200
@@ -168,6 +168,7 @@ extern const char gfar_driver_version[];
#define MACCFG2_LENGTHCHECK 0x00000010
#define MACCFG2_MPEN 0x00000008
+#define ECNTRL_FIFM 0x00008000
#define ECNTRL_INIT_SETTINGS 0x00001000
#define ECNTRL_TBI_MODE 0x00000020
#define ECNTRL_REDUCED_MODE 0x00000010
@@ -271,6 +272,7 @@ extern const char gfar_driver_version[];
#define RCTRL_TUCSEN 0x00000100
#define RCTRL_PRSDEP_MASK 0x000000c0
#define RCTRL_PRSDEP_INIT 0x000000c0
+#define RCTRL_PRSFM 0x00000020
#define RCTRL_PROM 0x00000008
#define RCTRL_EMEN 0x00000002
#define RCTRL_REQ_PARSER (RCTRL_VLEX | RCTRL_IPCSEN | \
@@ -870,6 +872,7 @@ struct gfar {
#define FSL_GIANFAR_DEV_HAS_BD_STASHING 0x00000200
#define FSL_GIANFAR_DEV_HAS_BUF_STASHING 0x00000400
#define FSL_GIANFAR_DEV_HAS_TIMER 0x00000800
+#define FSL_GIANFAR_DEV_HAS_RX_FILER 0x00001000
#if (MAXGROUPS == 2)
#define DEFAULT_MAPPING 0xAA
@@ -1140,6 +1143,16 @@ static inline void gfar_write_filer(stru
gfar_write(®s->rqfpr, fpr);
}
+static inline void gfar_read_filer(struct gfar_private *priv,
+ unsigned int far, unsigned int *fcr, unsigned int *fpr)
+{
+ struct gfar __iomem *regs = priv->gfargrp[0].regs;
+
+ gfar_write(®s->rqfar, far);
+ *fcr = gfar_read(®s->rqfcr);
+ *fpr = gfar_read(®s->rqfpr);
+}
+
extern void lock_rx_qs(struct gfar_private *priv);
extern void lock_tx_qs(struct gfar_private *priv);
extern void unlock_rx_qs(struct gfar_private *priv);
@@ -1157,4 +1170,39 @@ int gfar_set_features(struct net_device
extern const struct ethtool_ops gfar_ethtool_ops;
+#define ESWFULL 160
+#define EHWFULL 161
+#define EOUTOFRANGE 162
+#define PRINT_MAX 100
+#define MAX_FILER_CACHE_IDX (2*(MAX_FILER_IDX))
+
+extern struct interf *queue;
+
+struct and_entry {
+ unsigned int mask; /*The mask value which is valid for a block with*/
+ unsigned int start; /*start*/
+ unsigned int end; /*till end*/
+ unsigned int block; /*Same block values indicate depended entries*/
+};
+
+/*For exactly one device*/
+struct interf {
+ struct ethtool_rx_ntuple_list ntuple_list;
+ char name[IFNAMSIZ]; /*Name from struct net_device*/
+};
+
+/*Table which represents a receive filer table entry */
+struct filer_entry {
+ u32 ctrl; /*The control field from HW*/
+ u32 prop; /*The property field from HW*/
+};
+
+/*Full table*/
+struct filer_table {
+ struct filer_entry fe[MAX_FILER_CACHE_IDX];
+};
+
+int do_action(struct ethtool_rx_ntuple_flow_spec *flow, struct gfar_private *p);
+
+
#endif /* __GIANFAR_H */
Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
DISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.
^ permalink raw reply
* Re: Bug#625914: linux-image-2.6.38-2-amd64: bridging is not interacting well with multicast in 2.6.38-4
From: Yann Dupont @ 2011-05-10 12:55 UTC (permalink / raw)
To: Ben Hutchings; +Cc: netdev
In-Reply-To: <1305031369.4065.259.camel@localhost>
> On Mon, 2011-05-09 at 21:38 -0700, Noah Meyerhans wrote:
>> On Tue, May 10, 2011 at 03:38:44AM +0100, Ben Hutchings wrote:
>>> This is pretty weird. Debian version 2.6.38-3 has a few bridging
>>> changes from stable 2.6.38.3 and 2.6.38.4, but they don't look like they
>>> would cause this.
>> I have apparently filed the bug against the wrong version of Debian's
>> kernel. 2.6.38-3 is not affected, and works as expected. The change
>> was introduced in -4. That may have been clear from the report itself,
>> but the report was filed against -3. I've fixed that in the BTS.
> I gathered that, and then made the same mistake in writing the above!
> The version with the regression, 2.6.38-4, includes the changes from
> stable 2.6.38.3 and 2.6.38.4
>
> Ben.
>
>
We just hitted the very same problem yesterday, with debian too , BUT
with vanilla kernels (hand compiled from GIT, with a specific config).
I can confirm that 2.6.38.5 & 2.6.38.6 have this problem, but 2.6.38.3
works fine.
So this is not a debian specific bug as far as I can see.
Cheers,
--
Yann Dupont - Service IRTS, DSI Université de Nantes
Tel : 02.53.48.49.20 - Mail/Jabber : Yann.Dupont@univ-nantes.fr
^ permalink raw reply
* Re: Fw: oops during unregister_netdevice interface enslaved to bond - regression
From: Eric Dumazet @ 2011-05-10 13:03 UTC (permalink / raw)
To: Einar EL Lueck; +Cc: davem, netdev, Frank Blaschka
In-Reply-To: <1305017959.2614.13.camel@edumazet-laptop>
Le mardi 10 mai 2011 à 10:59 +0200, Eric Dumazet a écrit :
> Le mardi 10 mai 2011 à 10:54 +0200, Eric Dumazet a écrit :
>
> > I am currently working on this stuff [adding even more batching and
> > probably bugs as well ], so instead of revert I'll try to find a way to
> > fix this.
> >
> > If you already have a script to reproduce the bug on virtual devices on
> > x86 (not on s390 machines I dont have ;) ), I'll appreciate having a
> > copy of it.
> >
> > Thanks for the reminder.
>
> BTW make sure latest linux-2.6 still exhibits the problem, we fixed some
> things after original Octavian commit
>
> List of commits :
>
> commit ceaaec98ad99859ac90ac6863ad0a6cd075d8e0e
> net: deinit automatic LIST_HEAD
>
> commit f87e6f47933e3ebeced9bb12615e830a72cedce4
> net: dont leave active on stack LIST_HEAD
>
>
OK I trigger the bug on linux-2.6 with :
modprobe bonding
ip link add testa type veth peer name testb
ifconfig bond0 up
ifenslave bond0 testa
ip link del testa
I'll cook a patch, stay tuned :)
^ permalink raw reply
* [PATCH 2/3] RFC gianfar: add rx_ntuple feature
From: Sebastian.Poehn @ 2011-05-10 12:54 UTC (permalink / raw)
To: netdev
This part sets the flags for ethtool and does primary hardware checking.
--- gianfar.c.orig 2011-05-10 11:08:13.573744000 +0200
+++ gianfar.c 2011-05-10 11:22:07.865744495 +0200
@@ -751,7 +751,8 @@ static int gfar_of_init(struct platform_
FSL_GIANFAR_DEV_HAS_VLAN |
FSL_GIANFAR_DEV_HAS_MAGIC_PACKET |
FSL_GIANFAR_DEV_HAS_EXTENDED_HASH |
- FSL_GIANFAR_DEV_HAS_TIMER;
+ FSL_GIANFAR_DEV_HAS_TIMER |
+ FSL_GIANFAR_DEV_HAS_RX_FILER;
ctype = of_get_property(np, "phy-connection-type", NULL);
@@ -1042,6 +1043,9 @@ static int gfar_probe(struct platform_de
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_VLAN)
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
+ if (priv->device_flags & FSL_GIANFAR_DEV_HAS_RX_FILER)
+ dev->features |= NETIF_F_NTUPLE;
+
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_EXTENDED_HASH) {
priv->extended_hash = 1;
priv->hash_width = 9;
@@ -1151,9 +1155,8 @@ static int gfar_probe(struct platform_de
priv->rx_queue[i]->rxic = DEFAULT_RXIC;
}
- /* enable filer if using multiple RX queues*/
- if(priv->num_rx_queues > 1)
- priv->rx_filer_enable = 1;
+ /* always enable rx filer*/
+ priv->rx_filer_enable = 1;
/* Enable most messages by default */
priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1;
Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
DISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.
^ permalink raw reply
* [PATCH 3/3] RFC gianfar: add rx_ntuple feature
From: Sebastian.Poehn @ 2011-05-10 12:55 UTC (permalink / raw)
To: netdev
This is the main part. Functionality to add and remove ntuples, conversion from ntuple to hardware binary rx filer format, optimization of hardware filer table entries and extended hardware capability check.
--- gianfar_ethtool.c.orig 2011-05-10 11:45:33.301745000 +0200
+++ gianfar_ethtool.c 2011-05-10 13:27:23.041744819 +0200
@@ -42,6 +42,8 @@
extern void gfar_start(struct net_device *dev);
extern int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit);
+extern void sort(void *, size_t, size_t, int(*cmp_func)(const void *,
+ const void *), void(*swap_func)(void *, void *, int size));
#define GFAR_MAX_COAL_USECS 0xffff
#define GFAR_MAX_COAL_FRAMES 0xff
@@ -787,6 +789,1011 @@ static int gfar_set_nfc(struct net_devic
return ret;
}
+/*Global pointer on table*/
+struct filer_table *ref;
+u32 filer_index;
+struct interf *queue;
+
+enum nop {
+ ASC = 0, DESC = 1
+} row;
+
+static inline void toggle_order(void)
+{
+ row ^= 1;
+}
+
+static int my_comp(const void *a, const void *b)
+{
+
+ signed int temp;
+ if (*(u32 *) a > *(u32 *) b)
+ temp = -1;
+ else if (*(u32 *) a == *(u32 *) b)
+ temp = 0;
+ else
+ temp = 1;
+
+ if (row == DESC)
+ return temp;
+ else
+ return -temp;
+}
+
+static void my_swap(void *a, void *b, int size)
+{
+ u32 t1 = *(u32 *) a;
+ u32 t2 = *(u32 *) (a + 4);
+ u32 t3 = *(u32 *) (a + 8);
+ u32 t4 = *(u32 *) (a + 12);
+ *(u32 *) a = *(u32 *) b;
+ *(u32 *) (a + 4) = *(u32 *) (b + 4);
+ *(u32 *) (a + 8) = *(u32 *) (b + 8);
+ *(u32 *) (a + 12) = *(u32 *) (b + 12);
+ *(u32 *) b = t1;
+ *(u32 *) (b + 4) = t2;
+ *(u32 *) (b + 8) = t3;
+ *(u32 *) (b + 12) = t4;
+}
+
+/*Write a mask to hardware*/
+static inline void set_mask(u32 mask)
+{
+ ref->fe[filer_index].ctrl = RQFCR_AND | RQFCR_PID_MASK
+ | RQFCR_CMP_EXACT;
+ ref->fe[filer_index].prop = mask;
+ filer_index++;
+}
+
+/*Sets parse bits (e.g. IP or TCP)*/
+static void set_parse_bits(u32 host, u32 mask)
+{
+ set_mask(mask);
+ ref->fe[filer_index].ctrl = RQFCR_CMP_EXACT | RQFCR_PID_PARSE
+ | RQFCR_AND;
+ ref->fe[filer_index].prop = host;
+ filer_index++;
+}
+
+/*For setting a tuple of host,mask of type flag
+ *Example:
+ *IP-Src = 10.0.0.0/255.0.0.0
+ *host: 0x0A000000 mask: FF000000 flag: RQFPR_IPV4
+ *Note:
+ *For better usage of hardware 16 and 8 bit masks should be filled up
+ *with ones*/
+static void set_attribute(unsigned int host, unsigned int mask,
+ unsigned int flag)
+{
+ if (host || ~mask) {
+ /*This is to deal with masks smaller than 32bit
+ * and for special processing of MAC-filtering and
+ * VLAN-filtering*/
+ switch (flag) {
+ /*3bit*/
+ case RQFCR_PID_PRI:
+ if (((host & 0x7) == 0) && ((mask & 0x7) == 0))
+ return;
+ host &= 0x7;
+ break;
+ /*8bit*/
+ case RQFCR_PID_L4P:
+ case RQFCR_PID_TOS:
+ if (!(mask & 0xFF))
+ mask = 0xFFFFFFFF;
+ break;
+ /*12bit*/
+ case RQFCR_PID_VID:
+ if (((host & 0xFFF) == 0) && ((mask & 0xFFF) == 0))
+ return;
+ host &= 0xFFF;
+ break;
+ /*16bit*/
+ case RQFCR_PID_DPT:
+ case RQFCR_PID_SPT:
+ case RQFCR_PID_ETY:
+ if (!(mask & 0xFFFF))
+ mask = 0xFFFFFFFF;
+ break;
+ /*24bit*/
+ case RQFCR_PID_DAH:
+ case RQFCR_PID_DAL:
+ case RQFCR_PID_SAH:
+ case RQFCR_PID_SAL:
+ host &= 0x00FFFFFF;
+ break;
+ /*for all real 32bit masks*/
+ default:
+ if (!mask)
+ mask = 0xFFFFFFFF;
+ break;
+ }
+
+ set_mask(mask);
+ ref->fe[filer_index].ctrl = RQFCR_CMP_EXACT | RQFCR_AND | flag;
+ ref->fe[filer_index].prop = host;
+ filer_index++;
+ }
+}
+
+/*Translates host and mask for UDP,TCP or SCTP*/
+static void set_basic_ip(struct ethtool_tcpip4_spec *host,
+ struct ethtool_tcpip4_spec *mask)
+{
+ set_attribute(host->ip4src, mask->ip4src, RQFCR_PID_SIA);
+ set_attribute(host->ip4dst, mask->ip4dst, RQFCR_PID_DIA);
+ set_attribute(host->pdst, mask->pdst | 0xFFFF0000, RQFCR_PID_DPT);
+ set_attribute(host->psrc, mask->psrc | 0xFFFF0000, RQFCR_PID_SPT);
+ set_attribute(host->tos, mask->tos | 0xFFFFFF00, RQFCR_PID_TOS);
+}
+
+/*Translates host and mask for USER-IP4*/
+static inline void set_user_ip(struct ethtool_usrip4_spec *host,
+ struct ethtool_usrip4_spec *mask)
+{
+
+ set_attribute(host->ip4src, mask->ip4src, RQFCR_PID_SIA);
+ set_attribute(host->ip4dst, mask->ip4dst, RQFCR_PID_DIA);
+ set_attribute(host->tos, mask->tos | 0xFFFFFF00, RQFCR_PID_TOS);
+ set_attribute(host->proto, mask->proto | 0xFFFFFF00, RQFCR_PID_L4P);
+ set_attribute(host->l4_4_bytes, mask->l4_4_bytes, RQFCR_PID_ARB);
+
+}
+
+/*Translates host and mask for ETHER spec*/
+static inline void set_ether(struct ethhdr *host, struct ethhdr *mask)
+{
+ u32 upper_temp_mask = 0;
+ u32 lower_temp_mask = 0;
+ /*Source address*/
+ if (!(is_zero_ether_addr(host->h_source) && is_broadcast_ether_addr(
+ mask->h_source))) {
+ if (is_zero_ether_addr(mask->h_source)) {
+ upper_temp_mask = 0xFFFFFFFF;
+ lower_temp_mask = 0xFFFFFFFF;
+ } else {
+ upper_temp_mask = mask->h_source[0] << 16
+ | mask->h_source[1] << 8
+ | mask->h_source[2] | 0xFF000000;
+ lower_temp_mask = mask->h_source[3] << 16
+ | mask->h_source[4] << 8
+ | mask->h_source[5] | 0xFF000000;
+ }
+ /*Upper 24bit*/
+ set_attribute(0x80000000 | host->h_source[0] << 16
+ | host->h_source[1] << 8 | host->h_source[2],
+ upper_temp_mask, RQFCR_PID_SAH);
+ /*And the same for the lower part*/
+ set_attribute(0x80000000 | host->h_source[3] << 16
+ | host->h_source[4] << 8 | host->h_source[5],
+ lower_temp_mask, RQFCR_PID_SAL);
+ }
+ /*Destination address*/
+ if (!(is_zero_ether_addr(host->h_dest) && is_broadcast_ether_addr(
+ mask->h_dest))) {
+
+ /*Special for destination is limited broadcast*/
+ if ((is_broadcast_ether_addr(host->h_dest)
+ && is_zero_ether_addr(mask->h_dest))) {
+ set_parse_bits(RQFPR_EBC, RQFPR_EBC);
+ } else {
+
+ if (is_zero_ether_addr(mask->h_dest)) {
+ upper_temp_mask = 0xFFFFFFFF;
+ lower_temp_mask = 0xFFFFFFFF;
+ } else {
+ upper_temp_mask = mask->h_dest[0] << 16
+ | mask->h_dest[1] << 8
+ | mask->h_dest[2] | 0xFF000000;
+ lower_temp_mask = mask->h_dest[3] << 16
+ | mask->h_dest[4] << 8
+ | mask->h_dest[5] | 0xFF000000;
+ }
+
+ /*Upper 24bit*/
+ set_attribute(0x80000000 | host->h_dest[0] << 16
+ | host->h_dest[1] << 8
+ | host->h_dest[2], upper_temp_mask,
+ RQFCR_PID_DAH);
+ /*And the same for the lower part*/
+ set_attribute(0x80000000 | host->h_dest[3] << 16
+ | host->h_dest[4] << 8
+ | host->h_dest[5], lower_temp_mask,
+ RQFCR_PID_DAL);
+ }
+ }
+
+ /*Set Ethertype*/
+ if ((host->h_proto || ~(mask->h_proto | 0xFFFF0000))) {
+ set_attribute(host->h_proto, mask->h_proto | 0xFFFF0000,
+ RQFCR_PID_ETY);
+ }
+
+ /*
+ * Question: What the hell does the 0x80000000 do?
+ * Answer: It is just a dirty hack to prevent the setAtribute()
+ * to ignore a half MAC address which is like 0x000000/0xFFFFFF
+ */
+
+}
+
+/*For debugging*/
+void print_hw(struct gfar_private *p)
+{
+
+ int i = 0;
+ unsigned int a, b;
+ printk(KERN_DEBUG "No. Control Properties\n");
+ for (i = 0; i < 25; i++) {
+ gfar_read_filer(p, i, &a, &b);
+ printk(KERN_DEBUG "%3d %08x %08x\n", i, a, b);
+ }
+ printk(KERN_DEBUG "Data on hardware: %d\n", filer_index);
+}
+
+/*Copy size filer entries*/
+static inline void copy_filer_entries(struct filer_entry dst[0],
+ struct filer_entry src[0], s32 size)
+{
+ while (size > 0) {
+ size--;
+ dst[size].ctrl = src[size].ctrl;
+ dst[size].prop = src[size].prop;
+ }
+}
+
+/*Delete the contents of the filer-table between start and end
+ * and collapse them*/
+static int trim_filer_entries(int begin, int end)
+{
+ int length;
+ if (end > MAX_FILER_CACHE_IDX || begin > MAX_FILER_CACHE_IDX || begin
+ < 0 || end < 0 || end < begin)
+ return -EOUTOFRANGE;
+
+ length = (end - begin) + 1;
+
+ end++;
+
+ /*Copy*/
+ while (end < filer_index) {
+ ref->fe[begin].ctrl = ref->fe[end].ctrl;
+ ref->fe[begin++].prop = ref->fe[end++].prop;
+
+ }
+ /*Fill up with don't cares*/
+ while (begin <= filer_index) {
+ ref->fe[begin].ctrl = 0x60;
+ ref->fe[begin].prop = 0xFFFFFFFF;
+ begin++;
+ }
+
+ filer_index -= length;
+ return 0;
+}
+
+/*Make space on the wanted location*/
+static inline int expand_filer_entries(int begin, int length)
+{
+ int i = 0;
+ if (begin < 0 || length <= 0 || length + filer_index
+ > MAX_FILER_CACHE_IDX || begin > MAX_FILER_CACHE_IDX)
+ return -EOUTOFRANGE;
+
+ /*Copy*/
+ copy_filer_entries(&(ref->fe[begin + length]), &(ref->fe[begin]),
+ filer_index - length + 1);
+
+ /*Fill up with zeros*/
+ i = length;
+ while (i > 0) {
+ ref->fe[i + begin].ctrl = 0;
+ ref->fe[i + begin].prop = 0;
+ i--;
+ }
+
+ filer_index += length;
+ return 0;
+}
+
+/*Convert a ethtool_rx_ntuple to binary filter format of gianfar*/
+static inline int convert_to_filer(struct ethtool_rx_ntuple_flow_spec *rule)
+{
+
+ u32 vlan = 0, vlan_mask = 0;
+ u32 cfi = 0, cfi_mask = 0;
+ u32 prio = 0, prio_mask = 0;
+ u32 id = 0, id_mask = 0;
+
+ u32 old_index = filer_index;
+
+ /*Check if vlan is wanted*/
+ if (rule->vlan_tag != 0 || rule->vlan_tag_mask != 0xFFFF) {
+ if (rule->vlan_tag_mask == 0)
+ rule->vlan_tag_mask = 0xFFFF;
+
+ vlan = RQFPR_VLN;
+ vlan_mask = RQFPR_VLN;
+
+ /*Seperate the fields*/
+ cfi = (rule->vlan_tag >> 12) & 1;
+ cfi_mask = (rule->vlan_tag_mask >> 12) & 1;
+ id = rule->vlan_tag & 0xFFF;
+ id_mask = rule->vlan_tag_mask & 0xFFF;
+ prio = (rule->vlan_tag >> 13) & 0x7;
+ prio_mask = (rule->vlan_tag_mask >> 13) & 0x7;
+
+ if (cfi == 1 && cfi_mask == 1) {
+ vlan |= RQFPR_CFI;
+ vlan_mask |= RQFPR_CFI;
+ } else if (cfi == 0 && cfi_mask == 1) {
+ vlan_mask |= RQFPR_CFI;
+ }
+ }
+
+ switch (rule->flow_type) {
+ case TCP_V4_FLOW:
+ set_parse_bits(RQFPR_IPV4 | RQFPR_TCP | vlan, RQFPR_IPV4
+ | RQFPR_TCP | vlan_mask);
+ set_basic_ip((struct ethtool_tcpip4_spec *) &rule->h_u,
+ (struct ethtool_tcpip4_spec *) &rule->m_u);
+
+ break;
+ case UDP_V4_FLOW:
+ set_parse_bits(RQFPR_IPV4 | RQFPR_UDP | vlan, RQFPR_IPV4
+ | RQFPR_UDP | vlan_mask);
+ set_basic_ip((struct ethtool_tcpip4_spec *) &rule->h_u,
+ (struct ethtool_tcpip4_spec *) &rule->m_u);
+ break;
+ case SCTP_V4_FLOW:
+ set_parse_bits(RQFPR_IPV4 | vlan, RQFPR_IPV4 | vlan_mask);
+ set_attribute(132, 0xFFFFFFFF, RQFCR_PID_L4P);
+ set_basic_ip((struct ethtool_tcpip4_spec *) &rule->h_u,
+ (struct ethtool_tcpip4_spec *) &rule->m_u);
+ break;
+ case IP_USER_FLOW:
+ set_parse_bits(RQFPR_IPV4 | vlan, RQFPR_IPV4 | vlan_mask);
+ set_user_ip((struct ethtool_usrip4_spec *) &rule->h_u,
+ (struct ethtool_usrip4_spec *) &rule->m_u);
+ break;
+ case ETHER_FLOW:
+ if (vlan != 0)
+ set_parse_bits(vlan, vlan_mask);
+
+ set_ether((struct ethhdr *) &rule->h_u,
+ (struct ethhdr *) &rule->m_u);
+ break;
+ default:
+ return -1;
+ }
+
+ /*Set the vlan attributes in the end*/
+ if (vlan != 0) {
+ set_attribute(0x80000000 | id, 0xFFFFF000 | id_mask,
+ RQFCR_PID_VID);
+ set_attribute(0x80000000 | prio, 0xFFFFFFF8 | prio_mask,
+ RQFCR_PID_PRI);
+ }
+
+ /*If there has been nothing written till now, it must be a default*/
+ if (filer_index == old_index) {
+ set_mask(0xFFFFFFFF);
+ ref->fe[filer_index].ctrl = 0x20;
+ ref->fe[filer_index].prop = 0x0;
+ filer_index++;
+ }
+
+ /*Remove last AND*/
+ ref->fe[filer_index - 1].ctrl = ref->fe[filer_index - 1].ctrl
+ & (~RQFCR_AND);
+
+ /*Specify which queue to use or to drop*/
+ if (rule->action == ETHTOOL_RXNTUPLE_ACTION_DROP)
+ ref->fe[filer_index - 1].ctrl |= RQFCR_RJE;
+ else
+ ref->fe[filer_index - 1].ctrl |= (rule->action << 10);
+
+ /*Only big enough entries can be clustered*/
+ if (old_index + 2 < filer_index) {
+ ref->fe[old_index + 1].ctrl |= RQFCR_CLE;
+ ref->fe[filer_index - 1].ctrl |= RQFCR_CLE;
+ }
+
+ if (filer_index > MAX_FILER_CACHE_IDX - 1)
+ return -ESWFULL;
+
+ return 0;
+
+}
+
+/*Synchronizes the bitpattern from software buffers to hardware registers*/
+static int write_filer_to_hw(struct gfar_private *priv)
+{
+ s32 i = 0;
+ if (filer_index > MAX_FILER_IDX - 1)
+ return -EHWFULL;
+
+ /*Avoid inconsistent filer table*/
+ lock_rx_qs(priv);
+
+ for (; i < MAX_FILER_IDX - 1; i++)
+ gfar_write_filer(priv, i, ref->fe[i].ctrl, ref->fe[i].prop);
+
+ /*Last entry must be default accept
+ * because that is what people expect*/
+ gfar_write_filer(priv, i, 0x20, 0x0);
+
+ unlock_rx_qs(priv);
+
+ return 0;
+}
+
+/*Fill table with fall-troughs*/
+static inline void init_hw(void)
+{
+ int i = 0;
+
+ for (i = 0; i < MAX_FILER_CACHE_IDX; i++) {
+ ref->fe[i].ctrl = 0x60;
+ ref->fe[i].prop = 0xFFFFFFFF;
+ }
+}
+
+int add_table_entry(struct ethtool_rx_ntuple_flow_spec *flow)
+{
+ struct ethtool_rx_ntuple_flow_spec_container *temp;
+ temp = kmalloc(sizeof(struct ethtool_rx_ntuple_flow_spec_container),
+ GFP_KERNEL);
+ if (temp == NULL)
+ return -ENOMEM;
+ memcpy(&temp->fs, flow, sizeof(struct ethtool_rx_ntuple_flow_spec));
+ list_add_tail(&temp->list, &queue->ntuple_list.list);
+ queue->ntuple_list.count++;
+
+ if ((flow->data != 0) || (flow->data_mask != ~0))
+ printk(KERN_WARNING "User-data is not supported!\n");
+ if (flow->flow_type == IP_USER_FLOW)
+ if ((flow->h_u.usr_ip4_spec.ip_ver != 0)
+ || (flow->m_u.usr_ip4_spec.ip_ver != 255))
+ printk(KERN_WARNING "IP-Version is not supported!\n");
+ if (flow->flow_type == ETHER_FLOW)
+ if ((is_broadcast_ether_addr(flow->h_u.ether_spec.h_dest)
+ && is_zero_ether_addr(
+ flow->m_u.ether_spec.h_dest)))
+ printk(KERN_DEBUG
+ "Filtering broadcast is very cheap!\n");
+
+ return 0;
+
+}
+/*Compares flow-specs a and b and returns 0 if their are the same*/
+static int compare_flow_spec(struct ethtool_rx_ntuple_flow_spec *a,
+ struct ethtool_rx_ntuple_flow_spec *b)
+{
+
+ if (a == 0 || b == 0)
+ return -1;
+ /*if(ref->fe[i].fs->action!=b->action) goto next ;*/
+ /*if(ref->fe[i].fs->data!=b->data) goto next ;*/
+ /*if(ref->fe[i].fs->data_mask!=b->data_mask) goto next ;*/
+ if (a->flow_type != b->flow_type)
+ return 1;
+ if (a->vlan_tag != b->vlan_tag)
+ return 1;
+ if (a->vlan_tag_mask != b->vlan_tag_mask)
+ return 1;
+ switch (a->flow_type) {
+ case TCP_V4_FLOW:
+ case UDP_V4_FLOW:
+ case SCTP_V4_FLOW:
+ if (a->h_u.tcp_ip4_spec.ip4dst != b->h_u.tcp_ip4_spec.ip4dst)
+ return 1;
+ if (a->h_u.tcp_ip4_spec.ip4src != b->h_u.tcp_ip4_spec.ip4src)
+ return 1;
+ if (a->h_u.tcp_ip4_spec.pdst != b->h_u.tcp_ip4_spec.pdst)
+ return 1;
+ if (a->h_u.tcp_ip4_spec.psrc != b->h_u.tcp_ip4_spec.psrc)
+ return 1;
+ if (a->h_u.tcp_ip4_spec.tos != b->h_u.tcp_ip4_spec.tos)
+ return 1;
+ if (a->m_u.tcp_ip4_spec.ip4dst != b->m_u.tcp_ip4_spec.ip4dst)
+ return 1;
+ if (a->m_u.tcp_ip4_spec.ip4src != b->m_u.tcp_ip4_spec.ip4src)
+ return 1;
+ if (a->m_u.tcp_ip4_spec.pdst != b->m_u.tcp_ip4_spec.pdst)
+ return 1;
+ if (a->m_u.tcp_ip4_spec.psrc != b->m_u.tcp_ip4_spec.psrc)
+ return 1;
+ if (a->m_u.tcp_ip4_spec.tos != b->m_u.tcp_ip4_spec.tos)
+ return 1;
+ break;
+ case IP_USER_FLOW:
+ if (a->h_u.usr_ip4_spec.ip4dst != b->h_u.usr_ip4_spec.ip4dst)
+ return 1;
+ if (a->h_u.usr_ip4_spec.ip4src != b->h_u.usr_ip4_spec.ip4src)
+ return 1;
+ if (a->h_u.usr_ip4_spec.proto != b->h_u.usr_ip4_spec.proto)
+ return 1;
+ if (a->h_u.usr_ip4_spec.ip_ver != b->h_u.usr_ip4_spec.ip_ver)
+ return 1;
+ if (a->h_u.usr_ip4_spec.tos != b->h_u.usr_ip4_spec.tos)
+ return 1;
+ if (a->h_u.usr_ip4_spec.l4_4_bytes
+ != b->h_u.usr_ip4_spec.l4_4_bytes)
+ return 1;
+ if (a->m_u.usr_ip4_spec.ip4dst != b->m_u.usr_ip4_spec.ip4dst)
+ return 1;
+ if (a->m_u.usr_ip4_spec.ip4src != b->m_u.usr_ip4_spec.ip4src)
+ return 1;
+ if (a->m_u.usr_ip4_spec.proto != b->m_u.usr_ip4_spec.proto)
+ return 1;
+ if (a->m_u.usr_ip4_spec.ip_ver != b->m_u.usr_ip4_spec.ip_ver)
+ return 1;
+ if (a->m_u.usr_ip4_spec.tos != b->m_u.usr_ip4_spec.tos)
+ return 1;
+ if (a->m_u.usr_ip4_spec.l4_4_bytes
+ != b->m_u.usr_ip4_spec.l4_4_bytes)
+ return 1;
+ break;
+ case AH_V4_FLOW:
+ case ESP_V4_FLOW:
+ if (a->h_u.ah_ip4_spec.ip4dst != b->h_u.ah_ip4_spec.ip4dst)
+ return 1;
+ if (a->h_u.ah_ip4_spec.ip4src != b->h_u.ah_ip4_spec.ip4src)
+ return 1;
+ if (a->h_u.ah_ip4_spec.spi != b->h_u.ah_ip4_spec.spi)
+ return 1;
+ if (a->h_u.ah_ip4_spec.tos != b->h_u.ah_ip4_spec.tos)
+ return 1;
+ if (a->m_u.ah_ip4_spec.ip4dst != b->m_u.ah_ip4_spec.ip4dst)
+ return 1;
+ if (a->m_u.ah_ip4_spec.ip4src != b->m_u.ah_ip4_spec.ip4src)
+ return 1;
+ if (a->m_u.ah_ip4_spec.spi != b->m_u.ah_ip4_spec.spi)
+ return 1;
+ if (a->m_u.ah_ip4_spec.tos != b->m_u.ah_ip4_spec.tos)
+ return 1;
+ break;
+ case ETHER_FLOW:
+ if (compare_ether_addr(a->h_u.ether_spec.h_dest,
+ b->h_u.ether_spec.h_dest))
+ return 1;
+ if (compare_ether_addr(a->h_u.ether_spec.h_source,
+ b->h_u.ether_spec.h_source))
+ return 1;
+ if (compare_ether_addr(a->m_u.ether_spec.h_dest,
+ b->m_u.ether_spec.h_dest))
+ return 1;
+ if (compare_ether_addr(a->m_u.ether_spec.h_source,
+ b->m_u.ether_spec.h_source))
+ return 1;
+ if (a->h_u.ether_spec.h_proto != b->h_u.ether_spec.h_proto)
+ return 1;
+ if (a->m_u.ether_spec.h_proto != b->m_u.ether_spec.h_proto)
+ return 1;
+ break;
+ default:
+ return 1;
+ }
+
+ return 0;
+}
+
+/*Searches the existing flow_specs for flow and return NULL if none found
+ * or the address of the container in the linked list in case of success*/
+struct ethtool_rx_ntuple_flow_spec_container *search_table_entry(
+ struct ethtool_rx_ntuple_flow_spec *flow)
+{
+ struct ethtool_rx_ntuple_flow_spec_container *loop;
+ list_for_each_entry(loop, &queue->ntuple_list.list, list) {
+ if (compare_flow_spec(flow, &loop->fs) == 0)
+ return loop;
+ }
+ return NULL;
+}
+
+int del_table_entry(struct ethtool_rx_ntuple_flow_spec_container *cont)
+{
+
+ kfree(&cont->fs);
+
+ list_del(&cont->list);
+
+ queue->ntuple_list.count--;
+
+ return 0;
+}
+
+static inline int get_next_cluster_start(int start)
+{
+ for (; (start < filer_index) && (start < MAX_FILER_CACHE_IDX - 1);
+ start++) {
+ if ((ref->fe[start].ctrl & (RQFCR_AND | RQFCR_CLE))
+ == (RQFCR_AND | RQFCR_CLE)) {
+ return start;
+ }
+ }
+ return -1;
+}
+
+static inline int get_next_cluster_end(int start)
+{
+ for (; (start < filer_index) && (start < MAX_FILER_CACHE_IDX - 1);
+ start++) {
+ if ((ref->fe[start].ctrl & (RQFCR_AND | RQFCR_CLE))
+ == (RQFCR_CLE))
+ return start;
+ }
+ return -1;
+}
+
+/*Uses hardwares clustering option to reduce
+* the number of filer table entries*/
+static inline void cluster(void)
+{
+ s32 i = -1, j, iend, jend;
+ /*Do regular clustering*/
+ while ((i = get_next_cluster_start(++i)) != -1) {
+ j = i;
+ while ((j = get_next_cluster_start(++j)) != -1) {
+ if (ref->fe[i].ctrl != ref->fe[j].ctrl)
+ break;
+ if (ref->fe[i].prop != ref->fe[j].prop)
+ break;
+ if (ref->fe[i - 1].ctrl != ref->fe[j - 1].ctrl)
+ break;
+ if (ref->fe[i - 1].prop != ref->fe[j - 1].prop)
+ break;
+ /*If we come here i and j are
+ *candidates for clustering!*/
+ iend = get_next_cluster_end(i);
+ jend = get_next_cluster_end(j);
+ if (jend == -1 || iend == -1)
+ break;
+ /*First we make some free space, where our cluster
+ * element should be. Then we copy it there and finally
+ * delete in from its old location.
+ */
+
+ if (expand_filer_entries(iend, (jend - j))
+ == -EOUTOFRANGE)
+ break;
+
+ copy_filer_entries(&(ref->fe[iend + 1]), &(ref->fe[jend
+ + 1]), jend - j);
+
+ if (trim_filer_entries(jend - 1, jend + (jend - j))
+ == -EOUTOFRANGE)
+ return;
+
+ /*Mask out cluster bit*/
+ ref->fe[iend].ctrl &= ~(RQFCR_CLE);
+
+ }
+ }
+}
+
+/*Swaps the 0xFF80 masked bits of a1<>a2 and b1<>b2*/
+static inline void swap_ff80_bits(struct filer_entry *a1,
+ struct filer_entry *a2, struct filer_entry *b1,
+ struct filer_entry *b2)
+{
+
+ u32 temp[4];
+ temp[0] = a1->ctrl & 0xFF80;
+ temp[1] = a2->ctrl & 0xFF80;
+ temp[2] = b1->ctrl & 0xFF80;
+ temp[3] = b2->ctrl & 0xFF80;
+
+ a1->ctrl &= ~0xFF80;
+ a2->ctrl &= ~0xFF80;
+ b1->ctrl &= ~0xFF80;
+ b2->ctrl &= ~0xFF80;
+
+ a1->ctrl |= temp[1];
+ a2->ctrl |= temp[0];
+ b1->ctrl |= temp[3];
+ b2->ctrl |= temp[2];
+
+}
+
+/*Reduces the number of masks needed in the filer table to save entries*/
+static int optimize_masks(void)
+{
+
+ struct filer_table *dubli;
+
+ struct and_entry *and_table;
+
+ u32 and_index = 0, block_index = 1, previous_mask = 0, i = 0, j = 0,
+ size = 0, start = 0, prev = 1;
+
+ u32 old_first, old_last, new_first, new_last;
+
+ s32 ret = 0;
+
+ /*We need a copy of the filer table because
+ * we want to change its order*/
+ dubli = kmalloc(sizeof(struct filer_table), GFP_KERNEL);
+ if (dubli == NULL)
+ return -ENOMEM;
+ memcpy(dubli, ref, sizeof(struct filer_table));
+
+ and_table = kzalloc(sizeof(struct and_entry)
+ * (MAX_FILER_CACHE_IDX / 2 + 1), GFP_KERNEL);
+ if (and_table == NULL) {
+ ret = -ENOMEM;
+ goto end;
+ }
+
+ /*Make a list consisting of masks values with their start and
+ * end of validity and block as idicator for parts belonging
+ * together (glued by ANDs)*/
+ for (i = 0; i < filer_index; i++) {
+
+ if ((ref->fe[i].ctrl & 0xF) == 0) {
+ and_table[and_index].mask = ref->fe[i].prop;
+ and_table[and_index].start = i;
+ and_table[and_index].block = block_index;
+ if (and_index >= 1)
+ and_table[and_index - 1].end = i - 1;
+ and_index++;
+ }
+ /*Cluster starts will be seperated because they should
+ * hold their position*/
+ if ((ref->fe[i].ctrl & RQFCR_CLE) == RQFCR_CLE)
+ block_index++;
+ /*A not set AND indicated the end of a depended block*/
+ if ((ref->fe[i].ctrl & RQFCR_AND) == 0)
+ block_index++;
+
+ }
+
+ and_table[and_index - 1].end = i - 1;
+
+ /*Now we can sort the table from above by the values of the masks.
+ * Important: The 0xFF80 flags of the first and last entry of a
+ * block must hold their position (which queue, CLE, RJE, AND)*/
+ for (i = 0; i < and_index; i++) {
+
+ if (prev != and_table[i].block) {
+ old_first = and_table[start].start + 1;
+ old_last = and_table[i - 1].end;
+ /*I my opinion start should be multiplied by
+ * sizeof(struct and_entry) do not ask me why
+ * only this version is working */
+ sort(and_table + start, size, sizeof(struct and_entry),
+ &my_comp, &my_swap);
+ /*Toggle order for every block. This makes the
+ * thing more efficient! Believe me!*/
+
+ toggle_order();
+
+ new_first = and_table[start].start + 1;
+ new_last = and_table[i - 1].end;
+
+ /*Thats the 0xFF80 swapping*/
+ swap_ff80_bits(&dubli->fe[new_first],
+ &dubli->fe[old_first],
+ &dubli->fe[new_last],
+ &dubli->fe[old_last]);
+
+ start = i;
+ size = 0;
+ }
+ size++;
+ prev = and_table[i].block;
+ }
+
+ /*Now we can copy the data from our duplicated filer table to
+ * the real one in the order the mask table says*/
+ for (i = 0; i < and_index; i++) {
+ size = and_table[i].end - and_table[i].start + 1;
+ copy_filer_entries(&(ref->fe[j]),
+ &(dubli->fe[and_table[i].start]), size);
+ j += size;
+ }
+
+ /*Silly duplicate checker: Drops identical masks*/
+
+ for (i = 0; i < filer_index && i < MAX_FILER_CACHE_IDX; i++) {
+ if (ref->fe[i].ctrl == 0x80) {
+ previous_mask = i++;
+ break;
+ }
+ }
+ for (; i < filer_index && i < MAX_FILER_CACHE_IDX; i++) {
+ if (ref->fe[i].ctrl == 0x80) {
+ if (ref->fe[i].prop == ref->fe[previous_mask].prop) {
+ /*Two identical ones found!
+ * So drop the second one!*/
+ trim_filer_entries(i, i);
+
+ } else
+ /*Not identical!*/
+ previous_mask = i;
+ }
+ }
+
+ kfree(and_table);
+end: kfree(dubli);
+ return ret;
+}
+
+int do_action(struct ethtool_rx_ntuple_flow_spec *flow,
+ struct gfar_private *priv)
+{
+ struct ethtool_rx_ntuple_flow_spec_container *loop_ptr;
+ s32 i = 0;
+ s32 ret = 0;
+ filer_index = 0;
+
+ /*Only temporary needed! The 20 additional
+ * entries are a shadow for one element*/
+ ref = kzalloc(sizeof(struct filer_table) + 20
+ * sizeof(struct filer_table), GFP_KERNEL);
+ if (ref == NULL) {
+ printk(KERN_WARNING "Can not get memory\n");
+ return -ENOMEM;
+ }
+
+ loop_ptr = search_table_entry(flow);
+
+ if (flow->action == ETHTOOL_RXNTUPLE_ACTION_CLEAR) {
+ if (loop_ptr != NULL)
+ del_table_entry(loop_ptr);
+ else {
+ printk(KERN_WARNING "Element not found!\n");
+ return -1;
+ }
+ } else {
+ if (loop_ptr != NULL) {
+ printk(KERN_WARNING "Element is already online!\n");
+ return -1;
+ }
+
+ }
+
+ /*Initializes the filer table with a default accept for all packets*/
+ init_hw();
+
+ /*Now convert the existing filer data from flow_spec into
+ * filer tables binary format*/
+ list_for_each_entry(loop_ptr, &queue->ntuple_list.list, list) {
+ ret = convert_to_filer(&loop_ptr->fs);
+ if (ret == -ESWFULL) {
+ printk(KERN_WARNING
+ "To much entries! Can not add! SW\n");
+ goto end;
+ }
+ }
+
+ /*Here add the new one*/
+ if (flow->action != ETHTOOL_RXNTUPLE_ACTION_CLEAR) {
+ ret = convert_to_filer(flow);
+ if (ret == -ESWFULL) {
+ printk(KERN_WARNING
+ "To much entries! Can not add! SW\n");
+ goto end;
+ }
+ if (ret == -1) {
+ printk(KERN_WARNING "Flow-type not supported!\n");
+ goto end;
+ }
+ }
+
+ i = filer_index;
+
+ /*Optimizations to save entries*/
+ cluster();
+ optimize_masks();
+
+ printk(KERN_DEBUG "\tSummary:\n"
+ "\tData on hardware: %d\n"
+ "\tCompression rate: %d %%\n", filer_index, 100 - (100 * filer_index)
+ / i);
+
+ /*Write everything to hardware*/
+ ret = write_filer_to_hw(priv);
+ if (ret == -EHWFULL) {
+ printk(KERN_WARNING "To much entries! Can not add! HW\n");
+ goto end;
+ }
+
+ /*Only if all worked fine, add the flow*/
+ if (flow->action != ETHTOOL_RXNTUPLE_ACTION_CLEAR)
+ add_table_entry(flow);
+
+end: kfree(ref);
+ return ret;
+}
+
+static struct interf *init_table(struct gfar_private *priv)
+{
+ struct gfar __iomem *regs = NULL;
+ int i;
+
+ regs = priv->gfargrp[0].regs;
+
+ /*Check if we are in FIFO mode*/
+ i = gfar_read(®s->ecntrl);
+ i &= ECNTRL_FIFM;
+ if (i == ECNTRL_FIFM) {
+ i = gfar_read(®s->rctrl);
+ i &= RCTRL_PRSDEP_MASK | RCTRL_PRSFM;
+ if (i == (RCTRL_PRSDEP_MASK | RCTRL_PRSFM)) {
+ printk(KERN_EMERG
+ "Interface in FIFO mode\n"
+ "Receive Queue Filtering enabled\n");
+ } else {
+ printk(KERN_EMERG
+ "Interface in FIFO mode\n"
+ "Receive Queue Filtering is disabled\n");
+ return (struct interf *)-1;
+ }
+ }
+ /*Or in standard mode*/
+ else{
+ i = gfar_read(®s->rctrl);
+ i &= RCTRL_PRSDEP_MASK;
+ if (i == RCTRL_PRSDEP_MASK) {
+ printk(KERN_EMERG
+ "Receive Queue Filtering enabled\n");
+ } else {
+ printk(KERN_EMERG
+ "Receive Queue Filtering is disabled\n");
+ return (struct interf *)-1;
+ }
+ }
+
+ /*Sets the properties for arbitrary filer rule
+ * to the first 4 Layer 4 Bytes*/
+ regs->rbifx = 0xC0C1C2C3;
+
+ queue = kzalloc(sizeof(struct interf), GFP_KERNEL);
+ INIT_LIST_HEAD(&(queue->ntuple_list.list));
+ queue->ntuple_list.count = 0;
+
+ return queue;
+
+}
+
+static int gfar_set_rx_ntuple(struct net_device *dev,
+ struct ethtool_rx_ntuple *cmd)
+{ struct gfar __iomem *regs = NULL;
+ struct gfar_private *priv = netdev_priv(dev);
+ int i = 0;
+ static struct interf *store[10];
+
+ regs = priv->gfargrp[0].regs;
+
+ /*Only values between -2 and num_rx_queues -1 allowed*/
+ if ((cmd->fs.action >= (signed int)priv->num_rx_queues) ||
+ (cmd->fs.action < ETHTOOL_RXNTUPLE_ACTION_CLEAR))
+ return -EINVAL;
+
+ for (i = 0; i < 10; i++) {
+ if (store[i] == 0) {
+ store[i] = init_table(priv);
+ if (store[i] == (struct interf *)-1) {
+ store[i] = 0;
+ return -1;
+ }
+ strcpy(store[i]->name, dev->name);
+ break;
+ } else if (!strcmp(store[i]->name, dev->name)) {
+ queue = store[i];
+ break;
+ }
+
+ }
+
+ do_action(&cmd->fs, priv);
+
+ return 0;
+}
+
+
const struct ethtool_ops gfar_ethtool_ops = {
.get_settings = gfar_gsettings,
.set_settings = gfar_ssettings,
@@ -808,4 +1815,6 @@ const struct ethtool_ops gfar_ethtool_op
.set_wol = gfar_set_wol,
#endif
.set_rxnfc = gfar_set_nfc,
+ /*function for accessing rx queue filer*/
+ .set_rx_ntuple = gfar_set_rx_ntuple
};
Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
DISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.
^ permalink raw reply
* Re: Fw: oops during unregister_netdevice interface enslaved to bond - regression
From: Frank Blaschka @ 2011-05-10 13:14 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, netdev, ELELUECK
In-Reply-To: <1305017672.2614.9.camel@edumazet-laptop>
On Tue, May 10, 2011 at 10:54:32AM +0200, Eric Dumazet wrote:
> Le mardi 10 mai 2011 à 10:17 +0200, Einar EL Lueck a écrit :
> > Hi Dave,
> >
> > Einar EL Lueck/Germany/IBM wrote on 04/29/2011 04:45:45 PM:
> >
> > > From:
> > >
> > > Einar EL Lueck/Germany/IBM
> > >
> > > To:
> > >
> > > opurdila@ixiacom.com, netdev@vger.kernel.org, linux-
> > > s390@vger.kernel.org, davem@davemloft.net
> > >
> > > Cc:
> > >
> > > Frank Blaschka/Germany/IBM@IBMDE
> > >
> > > Date:
> > >
> > > 04/29/2011 04:45 PM
> > >
> > > Subject:
> > >
> > > Re: oops during unregister_netdevice interface enslaved to bond -
> > regression
> > >
> > > Hi Octavian,
> > >
> > > On 04/15/2011 10:53 AM, Frank Blaschka wrote:
> > > > Hi Octavian,
> > > >
> > > > your commit 443457242beb6716b43db4d62fe148eab5515505 introduced
> > > this regression.
> > > > I have reviewed the net device unregister code but did not
> > > understand it very well.
> > > > I have seen the problem only in combination with bonding. Can you
> > > give me some help
> > > > how to go on with this problem. I can reproduced it very easy on
> > asingle CPU
> > > > machine.
> > > >
> > >
> > > In this case rollback_registered_many iterates over the list of devs
> > > that initially has just one device in it. In a loop it calls
> > > call_netdevice_notifiers(NETDEV_UNREGISTER, dev) which triggers the
> > > bonding driver to call dev_close_many for the same device. That call
> > > to dev_close_many leads to the addition of the same device to the
> > > list over which rollback_registered_many is iterating. Consequently,
> > > netdev_unregister_kobject(dev) is called twice for the same device.
> > > Frank captured the result in his mail.
> > >
> >
> > Calls to the *_many functions introduced by Octavian may never interleave
> > because
> > the traversed lists modify each other. This was the root cause for the
> > symptom that Frank discovered. Octavian is not a valid mail recipient
> > anymore and did not react from any new mail address. I suggest to revert
> > the commit.
> >
>
> Hello Einar
>
> I am currently working on this stuff [adding even more batching and
> probably bugs as well ], so instead of revert I'll try to find a way to
> fix this.
>
great Thx!
> If you already have a script to reproduce the bug on virtual devices on
> x86 (not on s390 machines I dont have ;) ), I'll appreciate having a
> copy of it.a
I just checked todays net-next tree, problem is still there.
I don't have an x86 box, but I was able to reproduce the problem
with the dummy device (on s/390)
# modprobe bonding
# modprobe dummy
# ifconfig bond0 up
# ifenslave bond0 dummy0
# rmmod dummy
oops looks very much the same as unsing a real device. Hope this helps ...
>
> Thanks for the reminder.
>
> --
> 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 1/9] [PATCH] qeth: convert to hw_features part 2
From: Michał Mirosław @ 2011-05-10 13:19 UTC (permalink / raw)
To: frank.blaschka; +Cc: davem, netdev, linux-s390
In-Reply-To: <20110510115047.113084723@de.ibm.com>
> From: Frank Blaschka <frank.blaschka@de.ibm.com>
>
> Set rx csum default to hw checksumming again.
> Remove sysfs interface for rx csum (checksumming) and TSO (large_send).
> With the new hw_features it does not work to keep the old sysfs
> interface in parallel. Convert options.checksum_type to new hw_features.
[...]
> @@ -1482,32 +1476,28 @@ static int qeth_l3_start_ipa_checksum(st
[...]
> - rc = qeth_l3_send_checksum_command(card);
> - if (!rc)
> - dev_info(&card->gdev->dev,
> + card->dev->hw_features &= ~IPA_INBOUND_CHECKSUM;
> + card->dev->features &= ~IPA_INBOUND_CHECKSUM;
> + return 0;
> + }
Should be NETIF_F_RXCSUM probably.
Don't modify hw_features. Limit currently available features in
ndo_fix_features callback instead when checksumming is (temporarily)
unavailable.
[...]
> static int qeth_l3_set_features(struct net_device *dev, u32 features)
> {
> - enum qeth_checksum_types csum_type;
> struct qeth_card *card = dev->ml_priv;
> u32 changed = dev->features ^ features;
> + int on;
>
> if (!(changed & NETIF_F_RXCSUM))
> return 0;
>
> if (features & NETIF_F_RXCSUM)
> - csum_type = HW_CHECKSUMMING;
> + on = 1;
> else
> - csum_type = SW_CHECKSUMMING;
> + on = 0;
>
> dev->features = features ^ NETIF_F_RXCSUM;
> - return qeth_l3_set_rx_csum(card, csum_type);
> + return qeth_l3_set_rx_csum(card, on);
> }
Since you removed dev->features update from qeth_l3_set_rx_csum(), you
should also modify this code to match. On exit from ndo_fix_features,
dev->features should reflect what is currently set, even if part of
the request failed.
> static const struct ethtool_ops qeth_l3_ethtool_ops = {
> @@ -3342,6 +3326,12 @@ static int qeth_l3_setup_netdev(struct q
> if (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD))
> card->dev->dev_id = card->info.unique_id &
> 0xffff;
> + if (!card->info.guestlan) {
> + card->dev->hw_features = NETIF_F_SG |
> + NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
> + NETIF_F_TSO;
> + card->dev->features = NETIF_F_RXCSUM;
> + }
All features except RXCSUM will be disabled by default. Is that the intent here?
Best Regards,
Michał Mirosław
^ permalink raw reply
* Re: Fw: oops during unregister_netdevice interface enslaved to bond - regression
From: Eric Dumazet @ 2011-05-10 13:36 UTC (permalink / raw)
To: Frank Blaschka, David Miller; +Cc: netdev, ELELUECK, Octavian Purdila
In-Reply-To: <20110510131438.GA41522@tuxmaker.boeblingen.de.ibm.com>
Le mardi 10 mai 2011 à 15:14 +0200, Frank Blaschka a écrit :
> I just checked todays net-next tree, problem is still there.
> I don't have an x86 box, but I was able to reproduce the problem
> with the dummy device (on s/390)
>
> # modprobe bonding
> # modprobe dummy
> # ifconfig bond0 up
> # ifenslave bond0 dummy0
> # rmmod dummy
Here is the patch to fix this problem
Thanks again for your help.
[PATCH net-2.6] net: dev_close() should check IFF_UP
Commit 443457242beb (factorize sync-rcu call in
unregister_netdevice_many) mistakenly removed one test from dev_close()
Following actions trigger a BUG :
modprobe bonding
modprobe dummy
ifconfig bond0 up
ifenslave bond0 dummy0
rmmod dummy
dev_close() must not close a non IFF_UP device.
With help from Frank Blaschka and Einar EL Lueck
Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Reported-by: Einar EL Lueck <ELELUECK@de.ibm.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Octavian Purdila <opurdila@ixiacom.com>
---
net/core/dev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 856b6ee..9200944 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1284,11 +1284,13 @@ static int dev_close_many(struct list_head *head)
*/
int dev_close(struct net_device *dev)
{
- LIST_HEAD(single);
+ if (dev->flags & IFF_UP) {
+ LIST_HEAD(single);
- list_add(&dev->unreg_list, &single);
- dev_close_many(&single);
- list_del(&single);
+ list_add(&dev->unreg_list, &single);
+ dev_close_many(&single);
+ list_del(&single);
+ }
return 0;
}
EXPORT_SYMBOL(dev_close);
^ permalink raw reply related
* Re: [PATCH 1/2] net/stmmac: don't go through ethtool to start autonegociation
From: Giuseppe CAVALLARO @ 2011-05-10 13:47 UTC (permalink / raw)
To: David Decotigny
Cc: David S. Miller, Joe Perches, Stanislaw Gruszka, netdev,
linux-kernel
In-Reply-To: <1304986748-15809-2-git-send-email-decot@google.com>
On 5/10/2011 2:19 AM, David Decotigny wrote:
> The driver used to call phy's ethtool configuration routine to start
> autonegociation. This change has it call directly phy's routine to
> start autonegociation.
>
> IMPORTANT: initial version was hiding phy_start_aneg() return value,
> this patch returns it (<0 upon error).
>
> Tested: module compiles, NOT tested on real hardware.
> Signed-off-by: David Decotigny <decot@google.com>
Sorry for the delay, I'm doing some tests with the stmmac on a "real"
HW. I'll come back asap.
Regards
Peppe
> ---
> drivers/net/stmmac/stmmac_ethtool.c | 13 ++-----------
> 1 files changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/stmmac/stmmac_ethtool.c b/drivers/net/stmmac/stmmac_ethtool.c
> index 6f5aaeb..9c05cf0 100644
> --- a/drivers/net/stmmac/stmmac_ethtool.c
> +++ b/drivers/net/stmmac/stmmac_ethtool.c
> @@ -236,17 +236,8 @@ stmmac_set_pauseparam(struct net_device *netdev,
> priv->flow_ctrl = new_pause;
>
> if (phy->autoneg) {
> - if (netif_running(netdev)) {
> - struct ethtool_cmd cmd = { .cmd = ETHTOOL_SSET };
> - /* auto-negotiation automatically restarted */
> - cmd.supported = phy->supported;
> - cmd.advertising = phy->advertising;
> - cmd.autoneg = phy->autoneg;
> - ethtool_cmd_speed_set(&cmd, phy->speed);
> - cmd.duplex = phy->duplex;
> - cmd.phy_address = phy->addr;
> - ret = phy_ethtool_sset(phy, &cmd);
> - }
> + if (netif_running(netdev))
> + ret = phy_start_aneg(phy);
> } else
> priv->hw->mac->flow_ctrl(priv->ioaddr, phy->duplex,
> priv->flow_ctrl, priv->pause);
^ permalink raw reply
* Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
From: Frank Blaschka @ 2011-05-10 14:09 UTC (permalink / raw)
To: Michał Mirosław; +Cc: davem, netdev, linux-s390
In-Reply-To: <BANLkTimUUXp5XiCtVoD+pJyQYcE_r25zyA@mail.gmail.com>
On Tue, May 10, 2011 at 03:19:27PM +0200, Michał Mirosław wrote:
> > From: Frank Blaschka <frank.blaschka@de.ibm.com>
> >
> > Set rx csum default to hw checksumming again.
> > Remove sysfs interface for rx csum (checksumming) and TSO (large_send).
> > With the new hw_features it does not work to keep the old sysfs
> > interface in parallel. Convert options.checksum_type to new hw_features.
> [...]
> > @@ -1482,32 +1476,28 @@ static int qeth_l3_start_ipa_checksum(st
> [...]
> > - rc = qeth_l3_send_checksum_command(card);
> > - if (!rc)
> > - dev_info(&card->gdev->dev,
> > + card->dev->hw_features &= ~IPA_INBOUND_CHECKSUM;
> > + card->dev->features &= ~IPA_INBOUND_CHECKSUM;
> > + return 0;
> > + }
>
> Should be NETIF_F_RXCSUM probably.
>
Thx for reviewing the patch, yes should be NETIF_F_RXCSUM
> Don't modify hw_features. Limit currently available features in
> ndo_fix_features callback instead when checksumming is (temporarily)
> unavailable.
>
We have a recovery operation in our driver. What can we do in case this
recovery detects the checksumming is not available anymore (during runtime
of the device). ndo_fix_features callback does not come into play at this time.
How can we solve this?
> [...]
> > static int qeth_l3_set_features(struct net_device *dev, u32 features)
> > {
> > - enum qeth_checksum_types csum_type;
> > struct qeth_card *card = dev->ml_priv;
> > u32 changed = dev->features ^ features;
> > + int on;
> >
> > if (!(changed & NETIF_F_RXCSUM))
> > return 0;
> >
> > if (features & NETIF_F_RXCSUM)
> > - csum_type = HW_CHECKSUMMING;
> > + on = 1;
> > else
> > - csum_type = SW_CHECKSUMMING;
> > + on = 0;
> >
> > dev->features = features ^ NETIF_F_RXCSUM;
> > - return qeth_l3_set_rx_csum(card, csum_type);
> > + return qeth_l3_set_rx_csum(card, on);
> > }
>
> Since you removed dev->features update from qeth_l3_set_rx_csum(), you
> should also modify this code to match. On exit from ndo_fix_features,
> dev->features should reflect what is currently set, even if part of
Do you mean qeth_l3_set_rx_csum should set dev->features dependent of
the result of the checksum hardware operation?
> the request failed.
>
> > static const struct ethtool_ops qeth_l3_ethtool_ops = {
> > @@ -3342,6 +3326,12 @@ static int qeth_l3_setup_netdev(struct q
> > if (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD))
> > card->dev->dev_id = card->info.unique_id &
> > 0xffff;
> > + if (!card->info.guestlan) {
> > + card->dev->hw_features = NETIF_F_SG |
> > + NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
> > + NETIF_F_TSO;
> > + card->dev->features = NETIF_F_RXCSUM;
> > + }
>
> All features except RXCSUM will be disabled by default. Is that the intent here?
Yes, it is.
>
> Best Regards,
> Michał Mirosław
^ permalink raw reply
* Re: Fw: oops during unregister_netdevice interface enslaved to bond - regression
From: Frank Blaschka @ 2011-05-10 14:20 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, netdev, linux-s390, ELELUECK
In-Reply-To: <1305034619.2614.37.camel@edumazet-laptop>
On Tue, May 10, 2011 at 03:36:59PM +0200, Eric Dumazet wrote:
> Le mardi 10 mai 2011 à 15:14 +0200, Frank Blaschka a écrit :
>
> > I just checked todays net-next tree, problem is still there.
> > I don't have an x86 box, but I was able to reproduce the problem
> > with the dummy device (on s/390)
> >
> > # modprobe bonding
> > # modprobe dummy
> > # ifconfig bond0 up
> > # ifenslave bond0 dummy0
> > # rmmod dummy
>
> Here is the patch to fix this problem
>
Hi Eric,
your patch did the trick. With the patch applied I could not
reproduce the problem anyhow I use real or dummy device.
Thx for your help!
> Thanks again for your help.
>
> [PATCH net-2.6] net: dev_close() should check IFF_UP
>
> Commit 443457242beb (factorize sync-rcu call in
> unregister_netdevice_many) mistakenly removed one test from dev_close()
>
> Following actions trigger a BUG :
>
> modprobe bonding
> modprobe dummy
> ifconfig bond0 up
> ifenslave bond0 dummy0
> rmmod dummy
>
> dev_close() must not close a non IFF_UP device.
>
> With help from Frank Blaschka and Einar EL Lueck
>
> Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
> Reported-by: Einar EL Lueck <ELELUECK@de.ibm.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Octavian Purdila <opurdila@ixiacom.com>
> ---
> net/core/dev.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 856b6ee..9200944 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -1284,11 +1284,13 @@ static int dev_close_many(struct list_head *head)
> */
> int dev_close(struct net_device *dev)
> {
> - LIST_HEAD(single);
> + if (dev->flags & IFF_UP) {
> + LIST_HEAD(single);
>
> - list_add(&dev->unreg_list, &single);
> - dev_close_many(&single);
> - list_del(&single);
> + list_add(&dev->unreg_list, &single);
> + dev_close_many(&single);
> + list_del(&single);
> + }
> return 0;
> }
> EXPORT_SYMBOL(dev_close);
>
>
^ permalink raw reply
* [PATCH] ixgbe: RX ntuple feature must check num_rx_queues
From: Sebastian.Poehn @ 2011-05-10 14:21 UTC (permalink / raw)
To: netdev
The driver must check how much RX queues there are, not TX queues.
--- ixgbe_ethtool.c.orig 2011-05-10 16:18:00.313745560 +0200
+++ ixgbe_ethtool.c 2011-05-10 16:18:23.285747635 +0200
@@ -2349,9 +2349,9 @@ static int ixgbe_set_rx_ntuple(struct ne
/*
* Don't allow programming if the action is a queue greater than
- * the number of online Tx queues.
+ * the number of online Rx queues.
*/
- if ((fs->action >= adapter->num_tx_queues) ||
+ if ((fs->action >= adapter->num_rx_queues) ||
(fs->action < ETHTOOL_RXNTUPLE_ACTION_DROP))
return -EINVAL;
Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
DISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.
^ permalink raw reply
* Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
From: Michał Mirosław @ 2011-05-10 14:33 UTC (permalink / raw)
To: Frank Blaschka; +Cc: davem, netdev, linux-s390
In-Reply-To: <20110510140936.GA39624@tuxmaker.boeblingen.de.ibm.com>
W dniu 10 maja 2011 16:09 użytkownik Frank Blaschka
<blaschka@linux.vnet.ibm.com> napisał:
> On Tue, May 10, 2011 at 03:19:27PM +0200, Michał Mirosław wrote:
>> From: Frank Blaschka <frank.blaschka@de.ibm.com>
>> > Set rx csum default to hw checksumming again.
>> > Remove sysfs interface for rx csum (checksumming) and TSO (large_send).
>> > With the new hw_features it does not work to keep the old sysfs
>> > interface in parallel. Convert options.checksum_type to new hw_features.
>> [...]
>> > @@ -1482,32 +1476,28 @@ static int qeth_l3_start_ipa_checksum(st
>> [...]
>> > - rc = qeth_l3_send_checksum_command(card);
>> > - if (!rc)
>> > - dev_info(&card->gdev->dev,
>> > + card->dev->hw_features &= ~IPA_INBOUND_CHECKSUM;
>> > + card->dev->features &= ~IPA_INBOUND_CHECKSUM;
>> > + return 0;
>> > + }
[...]
>> Don't modify hw_features. Limit currently available features in
>> ndo_fix_features callback instead when checksumming is (temporarily)
>> unavailable.
>>
> We have a recovery operation in our driver. What can we do in case this
> recovery detects the checksumming is not available anymore (during runtime
> of the device). ndo_fix_features callback does not come into play at this time.
> How can we solve this?
Just call netdev_update_features() after recovery.
>> > static int qeth_l3_set_features(struct net_device *dev, u32 features)
>> > {
>> > - enum qeth_checksum_types csum_type;
>> > struct qeth_card *card = dev->ml_priv;
>> > u32 changed = dev->features ^ features;
>> > + int on;
>> >
>> > if (!(changed & NETIF_F_RXCSUM))
>> > return 0;
>> >
>> > if (features & NETIF_F_RXCSUM)
>> > - csum_type = HW_CHECKSUMMING;
>> > + on = 1;
>> > else
>> > - csum_type = SW_CHECKSUMMING;
>> > + on = 0;
>> >
>> > dev->features = features ^ NETIF_F_RXCSUM;
>> > - return qeth_l3_set_rx_csum(card, csum_type);
>> > + return qeth_l3_set_rx_csum(card, on);
>> > }
>>
>> Since you removed dev->features update from qeth_l3_set_rx_csum(), you
>> should also modify this code to match. On exit from ndo_fix_features,
>> dev->features should reflect what is currently set, even if part of
>> the request failed.
> Do you mean qeth_l3_set_rx_csum should set dev->features dependent of
> the result of the checksum hardware operation?
Yes. If it doesn't, then network core might pass packets needing
hardware checksumming for a device with TX checksumming disabled.
Best Regards,
Michał Mirosław
^ permalink raw reply
* [PATCH net-next-2.6 0/5] be2net: patch series
From: Padmanabh Ratnakar @ 2011-05-10 15:12 UTC (permalink / raw)
To: davem, netdev; +Cc: Padmanabh Ratnakar
Please apply.
Thanks,
Padmanabh
Padmanabh Ratnakar (5):
be2net: Handle error completion in Lancer
be2net: Disable coalesce water mark mode of CQ for Lancer
be2net: be2net: In case of UE, do not dump registers for Lancer
be2net: Use NTWK_RX_FILTER command for promiscous mode
be2net: Fix to prevent flooding of TX queue
drivers/net/benet/be_cmds.c | 51 +++++++++++++++++++++++++++---------------
drivers/net/benet/be_cmds.h | 24 ++++++++++++-------
drivers/net/benet/be_main.c | 29 +++++++++++++++---------
3 files changed, 66 insertions(+), 38 deletions(-)
^ permalink raw reply
* [PATCH net-next-2.6 1/5] be2net: Handle error completion in Lancer
From: Padmanabh Ratnakar @ 2011-05-10 15:12 UTC (permalink / raw)
To: davem, netdev; +Cc: Padmanabh Ratnakar
In Lancer if a frame is DMAed partially due to lack of RX buffers,
an error completion is sent with packet size as zero and num_recvd
indicating number of used buffers. These buffers need to be freed
and packet dropped.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
---
drivers/net/benet/be_main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 7b19931..b1beb31 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1754,12 +1754,15 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
break;
/* Ignore flush completions */
- if (rxcp->num_rcvd) {
+ if (rxcp->num_rcvd && rxcp->pkt_size) {
if (do_gro(rxcp))
be_rx_compl_process_gro(adapter, rxo, rxcp);
else
be_rx_compl_process(adapter, rxo, rxcp);
+ } else if (rxcp->pkt_size == 0) {
+ be_rx_compl_discard(adapter, rxo, rxcp);
}
+
be_rx_stats_update(rxo, rxcp);
}
--
1.6.0.2
^ permalink raw reply related
* [PATCH net-next-2.6 2/5] be2net: Disable coalesce water mark mode of CQ for Lancer
From: Padmanabh Ratnakar @ 2011-05-10 15:12 UTC (permalink / raw)
To: davem, netdev; +Cc: Padmanabh Ratnakar
Disable coalesce water mark mode of CQ for Lancer
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
---
drivers/net/benet/be_cmds.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 0fc06d3..77dc157 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -729,8 +729,6 @@ int be_cmd_cq_create(struct be_adapter *adapter,
if (lancer_chip(adapter)) {
req->hdr.version = 2;
req->page_size = 1; /* 1 for 4K */
- AMAP_SET_BITS(struct amap_cq_context_lancer, coalescwm, ctxt,
- coalesce_wm);
AMAP_SET_BITS(struct amap_cq_context_lancer, nodelay, ctxt,
no_delay);
AMAP_SET_BITS(struct amap_cq_context_lancer, count, ctxt,
--
1.6.0.2
^ permalink raw reply related
* [PATCH net-next-2.6 3/5] be2net: In case of UE, do not dump registers for Lancer
From: Padmanabh Ratnakar @ 2011-05-10 15:13 UTC (permalink / raw)
To: davem, netdev; +Cc: Padmanabh Ratnakar
In case of UE, do not dump registers for Lancer as they are not
supported.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
---
drivers/net/benet/be_cmds.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 77dc157..20a97a8 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -293,7 +293,8 @@ static int be_mbox_db_ready_wait(struct be_adapter *adapter, void __iomem *db)
if (msecs > 4000) {
dev_err(&adapter->pdev->dev, "mbox poll timed out\n");
- be_detect_dump_ue(adapter);
+ if (!lancer_chip(adapter))
+ be_detect_dump_ue(adapter);
return -1;
}
--
1.6.0.2
^ permalink raw reply related
* [PATCH net-next-2.6 4/5] be2net: Use NTWK_RX_FILTER command for promiscous mode
From: Padmanabh Ratnakar @ 2011-05-10 15:13 UTC (permalink / raw)
To: davem, netdev; +Cc: Padmanabh Ratnakar
Use OPCODE_COMMON_NTWK_RX_FILTER command for promiscous mode as
OPCODE_ETH_PROMISCUOUS command is getting deprecated.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
---
drivers/net/benet/be_cmds.c | 46 +++++++++++++++++++++++++++++--------------
drivers/net/benet/be_cmds.h | 24 ++++++++++++++--------
drivers/net/benet/be_main.c | 4 +-
3 files changed, 48 insertions(+), 26 deletions(-)
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 20a97a8..06af55c 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1404,12 +1404,24 @@ err:
/* Uses MCC for this command as it may be called in BH context
* Uses synchronous mcc
*/
-int be_cmd_promiscuous_config(struct be_adapter *adapter, u8 port_num, bool en)
+int be_cmd_promiscuous_config(struct be_adapter *adapter, bool en)
{
struct be_mcc_wrb *wrb;
- struct be_cmd_req_promiscuous_config *req;
+ struct be_cmd_req_rx_filter *req;
+ struct be_dma_mem promiscous_cmd;
+ struct be_sge *sge;
int status;
+ memset(&promiscous_cmd, 0, sizeof(struct be_dma_mem));
+ promiscous_cmd.size = sizeof(struct be_cmd_req_rx_filter);
+ promiscous_cmd.va = pci_alloc_consistent(adapter->pdev,
+ promiscous_cmd.size, &promiscous_cmd.dma);
+ if (!promiscous_cmd.va) {
+ dev_err(&adapter->pdev->dev,
+ "Memory allocation failure\n");
+ return -ENOMEM;
+ }
+
spin_lock_bh(&adapter->mcc_lock);
wrb = wrb_from_mccq(adapter);
@@ -1417,26 +1429,30 @@ int be_cmd_promiscuous_config(struct be_adapter *adapter, u8 port_num, bool en)
status = -EBUSY;
goto err;
}
- req = embedded_payload(wrb);
- be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, OPCODE_ETH_PROMISCUOUS);
+ req = promiscous_cmd.va;
+ sge = nonembedded_sgl(wrb);
- be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH,
- OPCODE_ETH_PROMISCUOUS, sizeof(*req));
-
- /* In FW versions X.102.149/X.101.487 and later,
- * the port setting associated only with the
- * issuing pci function will take effect
- */
- if (port_num)
- req->port1_promiscuous = en;
- else
- req->port0_promiscuous = en;
+ be_wrb_hdr_prepare(wrb, sizeof(*req), false, 1,
+ OPCODE_COMMON_NTWK_RX_FILTER);
+ be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
+ OPCODE_COMMON_NTWK_RX_FILTER, sizeof(*req));
+
+ req->if_id = cpu_to_le32(adapter->if_handle);
+ req->if_flags_mask = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS);
+ if (en)
+ req->if_flags = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS);
+
+ sge->pa_hi = cpu_to_le32(upper_32_bits(promiscous_cmd.dma));
+ sge->pa_lo = cpu_to_le32(promiscous_cmd.dma & 0xFFFFFFFF);
+ sge->len = cpu_to_le32(promiscous_cmd.size);
status = be_mcc_notify_wait(adapter);
err:
spin_unlock_bh(&adapter->mcc_lock);
+ pci_free_consistent(adapter->pdev, promiscous_cmd.size,
+ promiscous_cmd.va, promiscous_cmd.dma);
return status;
}
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index af4bbff..78256b6 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -714,13 +714,6 @@ struct be_cmd_req_vlan_config {
u16 normal_vlan[64];
} __packed;
-struct be_cmd_req_promiscuous_config {
- struct be_cmd_req_hdr hdr;
- u8 port0_promiscuous;
- u8 port1_promiscuous;
- u16 rsvd0;
-} __packed;
-
/******************** Multicast MAC Config *******************/
#define BE_MAX_MC 64 /* set mcast promisc if > 64 */
struct macaddr {
@@ -741,6 +734,20 @@ hw_stats_from_cmd(struct be_cmd_resp_get_stats *cmd)
return &cmd->hw_stats;
}
+
+/******************* RX FILTER ******************************/
+struct be_cmd_req_rx_filter {
+ struct be_cmd_req_hdr hdr;
+ u32 global_flags_mask;
+ u32 global_flags;
+ u32 if_flags_mask;
+ u32 if_flags;
+ u32 if_id;
+ u32 multicast_num;
+ struct macaddr mac[BE_MAX_MC];
+};
+
+
/******************** Link Status Query *******************/
struct be_cmd_req_link_status {
struct be_cmd_req_hdr hdr;
@@ -1122,8 +1129,7 @@ extern int be_cmd_modify_eqd(struct be_adapter *adapter, u32 eq_id, u32 eqd);
extern int be_cmd_vlan_config(struct be_adapter *adapter, u32 if_id,
u16 *vtag_array, u32 num, bool untagged,
bool promiscuous);
-extern int be_cmd_promiscuous_config(struct be_adapter *adapter,
- u8 port_num, bool en);
+extern int be_cmd_promiscuous_config(struct be_adapter *adapter, bool en);
extern int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
struct net_device *netdev, struct be_dma_mem *mem);
extern int be_cmd_set_flow_control(struct be_adapter *adapter,
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index b1beb31..69728fb 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -698,7 +698,7 @@ static void be_set_multicast_list(struct net_device *netdev)
struct be_adapter *adapter = netdev_priv(netdev);
if (netdev->flags & IFF_PROMISC) {
- be_cmd_promiscuous_config(adapter, adapter->port_num, 1);
+ be_cmd_promiscuous_config(adapter, true);
adapter->promiscuous = true;
goto done;
}
@@ -706,7 +706,7 @@ static void be_set_multicast_list(struct net_device *netdev)
/* BE was previously in promiscuous mode; disable it */
if (adapter->promiscuous) {
adapter->promiscuous = false;
- be_cmd_promiscuous_config(adapter, adapter->port_num, 0);
+ be_cmd_promiscuous_config(adapter, false);
}
/* Enable multicast promisc if num configured exceeds what we support */
--
1.6.0.2
^ permalink raw reply related
* [PATCH net-next-2.6 5/5] be2net: Fix to prevent flooding of TX queue
From: Padmanabh Ratnakar @ 2011-05-10 15:13 UTC (permalink / raw)
To: davem, netdev; +Cc: Padmanabh Ratnakar
Start/stop TX queue is controlled by TX queue "used" counter.
It is incremented while WRBs are posted to TX queue and
decremented when TX completions are received. This counter was
getting decremented before HW is informed about processing of TX
completions. As used counter is decremented, transmit function
posts new WRBs and creates completion queue full scenario in HW.
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
---
drivers/net/benet/be_main.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 69728fb..168d802 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1272,7 +1272,7 @@ static struct be_eth_tx_compl *be_tx_compl_get(struct be_queue_info *tx_cq)
return txcp;
}
-static void be_tx_compl_process(struct be_adapter *adapter, u16 last_index)
+static u16 be_tx_compl_process(struct be_adapter *adapter, u16 last_index)
{
struct be_queue_info *txq = &adapter->tx_obj.q;
struct be_eth_wrb *wrb;
@@ -1299,9 +1299,8 @@ static void be_tx_compl_process(struct be_adapter *adapter, u16 last_index)
queue_tail_inc(txq);
} while (cur_index != last_index);
- atomic_sub(num_wrbs, &txq->used);
-
kfree_skb(sent_skb);
+ return num_wrbs;
}
static inline struct be_eq_entry *event_get(struct be_eq_obj *eq_obj)
@@ -1384,7 +1383,7 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
struct be_queue_info *tx_cq = &adapter->tx_obj.cq;
struct be_queue_info *txq = &adapter->tx_obj.q;
struct be_eth_tx_compl *txcp;
- u16 end_idx, cmpl = 0, timeo = 0;
+ u16 end_idx, cmpl = 0, timeo = 0, num_wrbs = 0;
struct sk_buff **sent_skbs = adapter->tx_obj.sent_skb_list;
struct sk_buff *sent_skb;
bool dummy_wrb;
@@ -1394,12 +1393,14 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
while ((txcp = be_tx_compl_get(tx_cq))) {
end_idx = AMAP_GET_BITS(struct amap_eth_tx_compl,
wrb_index, txcp);
- be_tx_compl_process(adapter, end_idx);
+ num_wrbs += be_tx_compl_process(adapter, end_idx);
cmpl++;
}
if (cmpl) {
be_cq_notify(adapter, tx_cq->id, false, cmpl);
+ atomic_sub(num_wrbs, &txq->used);
cmpl = 0;
+ num_wrbs = 0;
}
if (atomic_read(&txq->used) == 0 || ++timeo > 200)
@@ -1419,7 +1420,8 @@ static void be_tx_compl_clean(struct be_adapter *adapter)
index_adv(&end_idx,
wrb_cnt_for_skb(adapter, sent_skb, &dummy_wrb) - 1,
txq->len);
- be_tx_compl_process(adapter, end_idx);
+ num_wrbs = be_tx_compl_process(adapter, end_idx);
+ atomic_sub(num_wrbs, &txq->used);
}
}
@@ -1793,12 +1795,12 @@ static int be_poll_tx_mcc(struct napi_struct *napi, int budget)
struct be_queue_info *tx_cq = &adapter->tx_obj.cq;
struct be_eth_tx_compl *txcp;
int tx_compl = 0, mcc_compl, status = 0;
- u16 end_idx;
+ u16 end_idx, num_wrbs = 0;
while ((txcp = be_tx_compl_get(tx_cq))) {
end_idx = AMAP_GET_BITS(struct amap_eth_tx_compl,
wrb_index, txcp);
- be_tx_compl_process(adapter, end_idx);
+ num_wrbs += be_tx_compl_process(adapter, end_idx);
tx_compl++;
}
@@ -1814,6 +1816,8 @@ static int be_poll_tx_mcc(struct napi_struct *napi, int budget)
if (tx_compl) {
be_cq_notify(adapter, adapter->tx_obj.cq.id, true, tx_compl);
+ atomic_sub(num_wrbs, &txq->used);
+
/* As Tx wrbs have been freed up, wake up netdev queue if
* it was stopped due to lack of tx wrbs.
*/
--
1.6.0.2
^ permalink raw reply related
* Re: [PATCH 1/5] ssb: Change fallback sprom to callback mechanism.
From: Ralf Baechle @ 2011-05-10 15:27 UTC (permalink / raw)
To: Jonas Gorski
Cc: Hauke Mehrtens, linux-mips, Michael Buesch, netdev,
Florian Fainelli
In-Reply-To: <BANLkTinV+cuTr2cPvR2pBDE_C-2J4KwWcA@mail.gmail.com>
On Sat, May 07, 2011 at 07:24:18PM +0200, Jonas Gorski wrote:
> just some small small spelling nit-picks:
> > CC: Michael Buesch <mb@bu3sch.de>
> > CC: netdev@vger.kernel.org
> > CC: Florian Fainelli <florian@openwrt.org>
> > Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Michael,
can I have an Ack for this patch assuming the raised spelling issues will
get fixed? Thanks,
Ralf
^ permalink raw reply
* Re: [PATCH 1/5] ssb: Change fallback sprom to callback mechanism.
From: Michael Büsch @ 2011-05-10 15:28 UTC (permalink / raw)
To: Ralf Baechle
Cc: Jonas Gorski, Hauke Mehrtens, linux-mips, Michael Buesch, netdev,
Florian Fainelli
In-Reply-To: <20110510152711.GA26759@linux-mips.org>
On Tue, 2011-05-10 at 16:27 +0100, Ralf Baechle wrote:
> On Sat, May 07, 2011 at 07:24:18PM +0200, Jonas Gorski wrote:
>
> > just some small small spelling nit-picks:
>
> > > CC: Michael Buesch <mb@bu3sch.de>
> > > CC: netdev@vger.kernel.org
> > > CC: Florian Fainelli <florian@openwrt.org>
> > > Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>
> Michael,
>
> can I have an Ack for this patch assuming the raised spelling issues will
> get fixed? Thanks,
I'd still prefer a platform-data based mechanism, but this would
be much more intrusive.
So yeah. ACK, for the time being.
--
Greetings Michael.
^ permalink raw reply
* Kernel 2.6.38.6 page allocation failure (ixgbe)
From: Stefan Majer @ 2011-05-10 16:02 UTC (permalink / raw)
To: netdev
In-Reply-To: <BANLkTinr34qmAE8RWVY0Wq_XMfOc0jTUzg@mail.gmail.com>
Hi,
im running 4 nodes with ceph on top of btrfs with a dualport Intel
X520 10Gb Ethernet Card with the latest 3.3.9 ixgbe driver.
during benchmarks i get the following stack.
I can easily reproduce this by simply running rados bench from a fast
machine using this 4 nodes as ceph cluster.
We saw this with stock ixgbe driver from 2.6.38.6 and with the latest
3.3.9 ixgbe.
This kernel is tainted because we use fusion-io iodrives as journal
devices for btrfs.
Any hints to nail this down are welcome.
Greetings Stefan Majer
May 10 15:26:40 os02 kernel: [ 3652.485219] cosd: page allocation
failure. order:2, mode:0x4020
May 10 15:26:40 os02 kernel: [ 3652.485223] kswapd0: page allocation
failure. order:2, mode:0x4020
May 10 15:26:40 os02 kernel: [ 3652.485228] Pid: 57, comm: kswapd0
Tainted: P W 2.6.38.6-1.fits.1.el6.x86_64 #1
May 10 15:26:40 os02 kernel: [ 3652.485230] Call Trace:
May 10 15:26:40 os02 kernel: [ 3652.485232] <IRQ>
[<ffffffff81108ce7>] ? __alloc_pages_nodemask+0x6f7/0x8a0
May 10 15:26:40 os02 kernel: [ 3652.485247] [<ffffffff814b0ad0>] ?
ip_local_deliver+0x80/0x90
May 10 15:26:40 os02 kernel: [ 3652.485250] cosd: page allocation
failure. order:2, mode:0x4020
May 10 15:26:40 os02 kernel: [ 3652.485256] [<ffffffff81146cd2>] ?
kmalloc_large_node+0x62/0xb0
May 10 15:26:40 os02 kernel: [ 3652.485259] Pid: 1849, comm: cosd
Tainted: P W 2.6.38.6-1.fits.1.el6.x86_64 #1
May 10 15:26:40 os02 kernel: [ 3652.485261] Call Trace:
May 10 15:26:40 os02 kernel: [ 3652.485264] [<ffffffff8114becb>] ?
__kmalloc_node_track_caller+0x15b/0x1d0
May 10 15:26:40 os02 kernel: [ 3652.485266] <IRQ>
[<ffffffff81466f74>] ? __netdev_alloc_skb+0x24/0x50
May 10 15:26:40 os02 kernel: [ 3652.485274] [<ffffffff81108ce7>] ?
__alloc_pages_nodemask+0x6f7/0x8a0
May 10 15:26:40 os02 kernel: [ 3652.485277] [<ffffffff81466713>] ?
__alloc_skb+0x83/0x170
May 10 15:26:40 os02 kernel: [ 3652.485281] [<ffffffff814b0ad0>] ?
ip_local_deliver+0x80/0x90
May 10 15:26:40 os02 kernel: [ 3652.485283] [<ffffffff81466f74>] ?
__netdev_alloc_skb+0x24/0x50
May 10 15:26:40 os02 kernel: [ 3652.485287] [<ffffffff81146cd2>] ?
kmalloc_large_node+0x62/0xb0
May 10 15:26:40 os02 kernel: [ 3652.485297] [<ffffffffa005d9aa>] ?
ixgbe_alloc_rx_buffers+0x9a/0x450 [ixgbe]
May 10 15:26:40 os02 kernel: [ 3652.485300] [<ffffffff8114becb>] ?
__kmalloc_node_track_caller+0x15b/0x1d0
May 10 15:26:40 os02 kernel: [ 3652.485305] [<ffffffff812b79e0>] ?
swiotlb_map_page+0x0/0x110
May 10 15:26:40 os02 kernel: [ 3652.485308] [<ffffffff81466f74>] ?
__netdev_alloc_skb+0x24/0x50
May 10 15:26:40 os02 kernel: [ 3652.485315] [<ffffffffa0060930>] ?
ixgbe_poll+0x1140/0x1670 [ixgbe]
May 10 15:26:40 os02 kernel: [ 3652.485318] [<ffffffff81466713>] ?
__alloc_skb+0x83/0x170
May 10 15:26:40 os02 kernel: [ 3652.485323] [<ffffffff810f33eb>] ?
perf_pmu_enable+0x2b/0x40
May 10 15:26:40 os02 kernel: [ 3652.485326] [<ffffffff81466f74>] ?
__netdev_alloc_skb+0x24/0x50
May 10 15:26:40 os02 kernel: [ 3652.485330] [<ffffffff81474eb2>] ?
net_rx_action+0x102/0x2a0
May 10 15:26:40 os02 kernel: [ 3652.485336] [<ffffffffa005d9aa>] ?
ixgbe_alloc_rx_buffers+0x9a/0x450 [ixgbe]
May 10 15:26:40 os02 kernel: [ 3652.485341] [<ffffffff8106b745>] ?
__do_softirq+0xb5/0x210
May 10 15:26:40 os02 kernel: [ 3652.485344] [<ffffffff81474840>] ?
napi_skb_finish+0x50/0x70
May 10 15:26:40 os02 kernel: [ 3652.485348] [<ffffffff810c7ca4>] ?
handle_IRQ_event+0x54/0x180
May 10 15:26:40 os02 kernel: [ 3652.485354] [<ffffffffa0060930>] ?
ixgbe_poll+0x1140/0x1670 [ixgbe]
May 10 15:26:40 os02 kernel: [ 3652.485357] [<ffffffff8106b7bd>] ?
__do_softirq+0x12d/0x210
May 10 15:26:40 os02 kernel: [ 3652.485360] [<ffffffff810f33eb>] ?
perf_pmu_enable+0x2b/0x40
May 10 15:26:40 os02 kernel: [ 3652.485364] [<ffffffff8100cf3c>] ?
call_softirq+0x1c/0x30
May 10 15:26:40 os02 kernel: [ 3652.485367] [<ffffffff81474eb2>] ?
net_rx_action+0x102/0x2a0
May 10 15:26:40 os02 kernel: [ 3652.485369] [<ffffffff8100e975>] ?
do_softirq+0x65/0xa0
May 10 15:26:40 os02 kernel: [ 3652.485372] [<ffffffff8106b745>] ?
__do_softirq+0xb5/0x210
May 10 15:26:40 os02 kernel: [ 3652.485375] [<ffffffff8106b605>] ?
irq_exit+0x95/0xa0
May 10 15:26:40 os02 kernel: [ 3652.485379] [<ffffffff810c7ca4>] ?
handle_IRQ_event+0x54/0x180
May 10 15:26:40 os02 kernel: [ 3652.485383] [<ffffffff8154a276>] ?
do_IRQ+0x66/0xe0
May 10 15:26:40 os02 kernel: [ 3652.485386] [<ffffffff8106b7bd>] ?
__do_softirq+0x12d/0x210
May 10 15:26:40 os02 kernel: [ 3652.485389] [<ffffffff81542a53>] ?
ret_from_intr+0x0/0x15
May 10 15:26:40 os02 kernel: [ 3652.485391] <EOI>
[<ffffffff8100cf3c>] ? call_softirq+0x1c/0x30
May 10 15:26:40 os02 kernel: [ 3652.485397] [<ffffffff81110a54>] ?
shrink_inactive_list+0x164/0x460
May 10 15:26:40 os02 kernel: [ 3652.485400] [<ffffffff8100e975>] ?
do_softirq+0x65/0xa0
May 10 15:26:40 os02 kernel: [ 3652.485404] [<ffffffff8153facc>] ?
schedule+0x44c/0xa10
May 10 15:26:40 os02 kernel: [ 3652.485407] [<ffffffff8106b605>] ?
irq_exit+0x95/0xa0
May 10 15:26:40 os02 kernel: [ 3652.485412] [<ffffffff81109b1a>] ?
determine_dirtyable_memory+0x1a/0x30
May 10 15:26:40 os02 kernel: [ 3652.485416] [<ffffffff8154a276>] ?
do_IRQ+0x66/0xe0
May 10 15:26:40 os02 kernel: [ 3652.485419] [<ffffffff81111453>] ?
shrink_zone+0x3d3/0x530
May 10 15:26:40 os02 kernel: [ 3652.485422] [<ffffffff81542a53>] ?
ret_from_intr+0x0/0x15
May 10 15:26:40 os02 kernel: [ 3652.485423] <EOI>
[<ffffffff81074a4a>] ? del_timer_sync+0x3a/0x60
May 10 15:26:40 os02 kernel: [ 3652.485430] [<ffffffff812a774d>] ?
copy_user_generic_string+0x2d/0x40
May 10 15:26:40 os02 kernel: [ 3652.485435] [<ffffffff811054a5>] ?
zone_watermark_ok_safe+0xb5/0xd0
May 10 15:26:40 os02 kernel: [ 3652.485439] [<ffffffff810ff351>] ?
iov_iter_copy_from_user_atomic+0x101/0x170
May 10 15:26:40 os02 kernel: [ 3652.485442] [<ffffffff81112a69>] ?
kswapd+0x889/0xb20
May 10 15:26:40 os02 kernel: [ 3652.485457] [<ffffffffa026c91d>] ?
btrfs_copy_from_user+0xcd/0x130 [btrfs]
May 10 15:26:40 os02 kernel: [ 3652.485460] [<ffffffff811121e0>] ?
kswapd+0x0/0xb20
May 10 15:26:40 os02 kernel: [ 3652.485472] [<ffffffffa026d844>] ?
__btrfs_buffered_write+0x1a4/0x330 [btrfs]
May 10 15:26:40 os02 kernel: [ 3652.485476] [<ffffffff810862b6>] ?
kthread+0x96/0xa0
May 10 15:26:40 os02 kernel: [ 3652.485479] [<ffffffff8117151f>] ?
file_update_time+0x5f/0x170
May 10 15:26:40 os02 kernel: [ 3652.485482] [<ffffffff8100ce44>] ?
kernel_thread_helper+0x4/0x10
May 10 15:26:40 os02 kernel: [ 3652.485493] [<ffffffffa026dc08>] ?
btrfs_file_aio_write+0x238/0x4e0 [btrfs]
May 10 15:26:40 os02 kernel: [ 3652.485496] [<ffffffff81086220>] ?
kthread+0x0/0xa0
May 10 15:26:40 os02 kernel: [ 3652.485507] [<ffffffffa026d9d0>] ?
btrfs_file_aio_write+0x0/0x4e0 [btrfs]
May 10 15:26:40 os02 kernel: [ 3652.485511] [<ffffffff8100ce40>] ?
kernel_thread_helper+0x0/0x10
May 10 15:26:40 os02 kernel: [ 3652.485515] [<ffffffff81158ff3>] ?
do_sync_readv_writev+0xd3/0x110
May 10 15:26:40 os02 kernel: [ 3652.485516] Mem-Info:
May 10 15:26:40 os02 kernel: [ 3652.485519] [<ffffffff81163d42>] ?
path_put+0x22/0x30
May 10 15:26:40 os02 kernel: [ 3652.485521] Node 0 DMA per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.485525] [<ffffffff812584a3>] ?
selinux_file_permission+0xf3/0x150
May 10 15:26:40 os02 kernel: [ 3652.485528] CPU 0: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485530] CPU 1: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485534] [<ffffffff81251583>] ?
security_file_permission+0x23/0x90
May 10 15:26:40 os02 kernel: [ 3652.485535] CPU 2: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485538] CPU 3: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485542] [<ffffffff81159f14>] ?
do_readv_writev+0xd4/0x1e0
May 10 15:26:40 os02 kernel: [ 3652.485544] CPU 4: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485547] CPU 5: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485550] [<ffffffff81540d91>] ?
mutex_lock+0x31/0x60
May 10 15:26:40 os02 kernel: [ 3652.485552] CPU 6: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485554] CPU 7: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485557] [<ffffffff8115a066>] ?
vfs_writev+0x46/0x60
May 10 15:26:40 os02 kernel: [ 3652.485558] Node 0 DMA32 per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.485562] [<ffffffff8115a1a1>] ?
sys_writev+0x51/0xc0
May 10 15:26:40 os02 kernel: [ 3652.485564] CPU 0: hi: 186, btch:
31 usd: 144
May 10 15:26:40 os02 kernel: [ 3652.485567] CPU 1: hi: 186, btch:
31 usd: 198
May 10 15:26:40 os02 kernel: [ 3652.485571] [<ffffffff8100c002>] ?
system_call_fastpath+0x16/0x1b
May 10 15:26:40 os02 kernel: [ 3652.485573] CPU 2: hi: 186, btch:
31 usd: 180
May 10 15:26:40 os02 kernel: [ 3652.485574] Mem-Info:
May 10 15:26:40 os02 kernel: [ 3652.485576] CPU 3: hi: 186, btch:
31 usd: 171
May 10 15:26:40 os02 kernel: [ 3652.485578] Node 0 CPU 4: hi: 186,
btch: 31 usd: 159
May 10 15:26:40 os02 kernel: [ 3652.485581] DMA per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.485582] CPU 5: hi: 186, btch:
31 usd: 69
May 10 15:26:40 os02 kernel: [ 3652.485585] CPU 0: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485587] CPU 6: hi: 186, btch:
31 usd: 180
May 10 15:26:40 os02 kernel: [ 3652.485589] CPU 1: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485591] CPU 7: hi: 186, btch:
31 usd: 184
May 10 15:26:40 os02 kernel: [ 3652.485593] CPU 2: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485594] Node 0 CPU 3: hi: 0,
btch: 1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485597] Normal per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.485598] CPU 4: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485600] CPU 0: hi: 186, btch:
31 usd: 100
May 10 15:26:40 os02 kernel: [ 3652.485602] CPU 5: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485604] CPU 1: hi: 186, btch:
31 usd: 47
May 10 15:26:40 os02 kernel: [ 3652.485606] CPU 6: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485608] CPU 2: hi: 186, btch:
31 usd: 168
May 10 15:26:40 os02 kernel: [ 3652.485610] CPU 7: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.485612] CPU 3: hi: 186, btch:
31 usd: 140
May 10 15:26:40 os02 kernel: [ 3652.485614] Node 0 CPU 4: hi: 186,
btch: 31 usd: 177
May 10 15:26:40 os02 kernel: [ 3652.485617] DMA32 per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.485618] CPU 5: hi: 186, btch:
31 usd: 77
May 10 15:26:40 os02 kernel: [ 3652.485621] CPU 0: hi: 186, btch:
31 usd: 144
May 10 15:26:40 os02 kernel: [ 3652.485623] CPU 6: hi: 186, btch:
31 usd: 168
May 10 15:26:40 os02 kernel: [ 3652.485625] CPU 1: hi: 186, btch:
31 usd: 198
May 10 15:26:40 os02 kernel: [ 3652.485627] CPU 7: hi: 186, btch:
31 usd: 68
May 10 15:26:40 os02 kernel: [ 3652.485629] CPU 2: hi: 186, btch:
31 usd: 180
May 10 15:26:40 os02 kernel: [ 3652.485634] active_anon:255806
inactive_anon:19454 isolated_anon:0
May 10 15:26:40 os02 kernel: [ 3652.485636] active_file:420093
inactive_file:5180559 isolated_file:0
May 10 15:26:40 os02 kernel: [ 3652.485637] unevictable:50582
dirty:314034 writeback:8484 unstable:0
May 10 15:26:40 os02 kernel: [ 3652.485639] free:30074
slab_reclaimable:35739 slab_unreclaimable:13526
May 10 15:26:40 os02 kernel: [ 3652.485641] mapped:3440 shmem:51
pagetables:1342 bounce:0
May 10 15:26:40 os02 kernel: [ 3652.485643] CPU 3: hi: 186, btch:
31 usd: 171
May 10 15:26:40 os02 kernel: [ 3652.485644] Node 0 CPU 4: hi: 186,
btch: 31 usd: 159
May 10 15:26:40 os02 kernel: [ 3652.485652] DMA free:15852kB min:12kB
low:12kB high:16kB active_anon:0kB inactive_anon:0kB active_file:0kB
inactive_file:0kB unevictable:0kB isolated(anon):0kB
isolated(file):0kB present:15660kB mlocked:0kB dirty:0kB writeback:0kB
mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB
kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB
writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
May 10 15:26:40 os02 kernel: [ 3652.485659] CPU 5: hi: 186, btch:
31 usd: 69
May 10 15:26:40 os02 kernel: [ 3652.485661] lowmem_reserve[]:CPU 6:
hi: 186, btch: 31 usd: 180
May 10 15:26:40 os02 kernel: [ 3652.485663] 0CPU 7: hi: 186,
btch: 31 usd: 184
May 10 15:26:40 os02 kernel: [ 3652.485665] 2991Node 0 24201Normal per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.485668] 24201CPU 0: hi: 186,
btch: 31 usd: 100
May 10 15:26:40 os02 kernel: [ 3652.485671]
May 10 15:26:40 os02 kernel: [ 3652.485672] CPU 1: hi: 186, btch:
31 usd: 47
May 10 15:26:40 os02 kernel: [ 3652.485674] Node 0 CPU 2: hi: 186,
btch: 31 usd: 168
May 10 15:26:40 os02 kernel: [ 3652.485682] DMA32 free:85748kB
min:2460kB low:3072kB high:3688kB active_anon:20480kB
inactive_anon:5268kB active_file:151588kB inactive_file:2645188kB
unevictable:72kB isolated(anon):0kB isolated(file):0kB
present:3063392kB mlocked:0kB dirty:210820kB writeback:0kB
mapped:648kB shmem:0kB slab_reclaimable:28400kB
slab_unreclaimable:2152kB kernel_stack:520kB pagetables:100kB
unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0
all_unreclaimable? no
May 10 15:26:40 os02 kernel: [ 3652.485690] CPU 3: hi: 186, btch:
31 usd: 140
May 10 15:26:40 os02 kernel: [ 3652.485691] lowmem_reserve[]:CPU 4:
hi: 186, btch: 31 usd: 177
May 10 15:26:40 os02 kernel: [ 3652.485693] 0CPU 5: hi: 186,
btch: 31 usd: 77
May 10 15:26:40 os02 kernel: [ 3652.485696] 0CPU 6: hi: 186,
btch: 31 usd: 168
May 10 15:26:40 os02 kernel: [ 3652.485698] 21210CPU 7: hi: 186,
btch: 31 usd: 68
May 10 15:26:40 os02 kernel: [ 3652.485701] 21210active_anon:255806
inactive_anon:19454 isolated_anon:0
May 10 15:26:40 os02 kernel: [ 3652.485705] active_file:420093
inactive_file:5180559 isolated_file:0
May 10 15:26:40 os02 kernel: [ 3652.485706] unevictable:50582
dirty:314034 writeback:8484 unstable:0
May 10 15:26:40 os02 kernel: [ 3652.485707] free:30074
slab_reclaimable:35739 slab_unreclaimable:13526
May 10 15:26:40 os02 kernel: [ 3652.485708] mapped:3440 shmem:51
pagetables:1342 bounce:0
May 10 15:26:40 os02 kernel: [ 3652.485709]
May 10 15:26:40 os02 kernel: [ 3652.485710] Node 0 Node 0 DMA
free:15852kB min:12kB low:12kB high:16kB active_anon:0kB
inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB
isolated(anon):0kB isolated(file):0kB present:15660kB mlocked:0kB
dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB
slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB
bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
May 10 15:26:40 os02 kernel: [ 3652.485724] Normal free:18696kB
min:17440kB low:21800kB high:26160kB active_anon:1002744kB
inactive_anon:72548kB active_file:1528784kB inactive_file:18077048kB
unevictable:202256kB isolated(anon):0kB isolated(file):0kB
present:21719040kB mlocked:0kB dirty:1045316kB writeback:33936kB
mapped:13112kB shmem:204kB slab_reclaimable:114556kB
slab_unreclaimable:51952kB kernel_stack:3768kB pagetables:5268kB
unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:32
all_unreclaimable? no
May 10 15:26:40 os02 kernel: [ 3652.485731]
lowmem_reserve[]:lowmem_reserve[]: 0 0 2991 0 24201 0 24201 0
May 10 15:26:40 os02 kernel: [ 3652.485737]
May 10 15:26:40 os02 kernel: [ 3652.485738] Node 0 Node 0 DMA32
free:85748kB min:2460kB low:3072kB high:3688kB active_anon:20480kB
inactive_anon:5268kB active_file:151588kB inactive_file:2645188kB
unevictable:72kB isolated(anon):0kB isolated(file):0kB
present:3063392kB mlocked:0kB dirty:210820kB writeback:0kB
mapped:648kB shmem:0kB slab_reclaimable:28400kB
slab_unreclaimable:2152kB kernel_stack:520kB pagetables:100kB
unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0
all_unreclaimable? no
May 10 15:26:40 os02 kernel: [ 3652.485747] DMA:
lowmem_reserve[]:1*4kB 01*8kB 00*16kB 212101*32kB 212101*64kB
May 10 15:26:40 os02 kernel: [ 3652.485754] 1*128kB Node 0 1*256kB
Normal free:18696kB min:17440kB low:21800kB high:26160kB
active_anon:1002744kB inactive_anon:72548kB active_file:1528784kB
inactive_file:18077048kB unevictable:202256kB isolated(anon):0kB
isolated(file):0kB present:21719040kB mlocked:0kB dirty:1045316kB
writeback:33936kB mapped:13112kB shmem:204kB slab_reclaimable:114556kB
slab_unreclaimable:51952kB kernel_stack:3768kB pagetables:5268kB
unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:32
all_unreclaimable? no
May 10 15:26:40 os02 kernel: [ 3652.485764] 0*512kB
lowmem_reserve[]:1*1024kB 01*2048kB 03*4096kB 0= 15852kB
May 10 15:26:40 os02 kernel: [ 3652.485771] 0Node 0
May 10 15:26:40 os02 kernel: [ 3652.485773] DMA32: Node 0 59*4kB DMA:
125*8kB 1*4kB 66*16kB 1*8kB 80*32kB 0*16kB 188*64kB 1*32kB 51*128kB
1*64kB 15*256kB 1*128kB 40*512kB 1*256kB 31*1024kB 0*512kB 1*2048kB
1*1024kB 1*4096kB 1*2048kB = 85620kB
May 10 15:26:40 os02 kernel: [ 3652.485789] 3*4096kB Node 0 = 15852kB
May 10 15:26:40 os02 kernel: [ 3652.485791] Normal: Node 0 3930*4kB
DMA32: 0*8kB 59*4kB 1*16kB 125*8kB 0*32kB 66*16kB 0*64kB 80*32kB
0*128kB 188*64kB 1*256kB 51*128kB 1*512kB 15*256kB 0*1024kB 40*512kB
1*2048kB 31*1024kB 0*4096kB 1*2048kB = 18552kB
May 10 15:26:40 os02 kernel: [ 3652.485807] 1*4096kB 5651289 total
pagecache pages
May 10 15:26:40 os02 kernel: [ 3652.485809] = 85620kB
May 10 15:26:40 os02 kernel: [ 3652.485810] 0 pages in swap cache
May 10 15:26:40 os02 kernel: [ 3652.485811] Node 0 Swap cache stats:
add 0, delete 0, find 0/0
May 10 15:26:40 os02 kernel: [ 3652.485814] Normal: Free swap = 1048572kB
May 10 15:26:40 os02 kernel: [ 3652.485815] 3930*4kB Total swap = 1048572kB
May 10 15:26:40 os02 kernel: [ 3652.485817] 0*8kB 1*16kB 0*32kB 0*64kB
0*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 18552kB
May 10 15:26:40 os02 kernel: [ 3652.485822] 5651289 total pagecache pages
May 10 15:26:40 os02 kernel: [ 3652.485823] 0 pages in swap cache
May 10 15:26:40 os02 kernel: [ 3652.485824] Swap cache stats: add 0,
delete 0, find 0/0
May 10 15:26:40 os02 kernel: [ 3652.485825] Free swap = 1048572kB
May 10 15:26:40 os02 kernel: [ 3652.485826] Total swap = 1048572kB
May 10 15:26:40 os02 kernel: [ 3652.486439] kworker/0:1: page
allocation failure. order:2, mode:0x4020
May 10 15:26:40 os02 kernel: [ 3652.486443] Pid: 0, comm: kworker/0:1
Tainted: P W 2.6.38.6-1.fits.1.el6.x86_64 #1
May 10 15:26:40 os02 kernel: [ 3652.486446] Call Trace:
May 10 15:26:40 os02 kernel: [ 3652.486448] <IRQ>
[<ffffffff81108ce7>] ? __alloc_pages_nodemask+0x6f7/0x8a0
May 10 15:26:40 os02 kernel: [ 3652.486459] [<ffffffff814b0ad0>] ?
ip_local_deliver+0x80/0x90
May 10 15:26:40 os02 kernel: [ 3652.486464] [<ffffffff81146cd2>] ?
kmalloc_large_node+0x62/0xb0
May 10 15:26:40 os02 kernel: [ 3652.486468] [<ffffffff8114becb>] ?
__kmalloc_node_track_caller+0x15b/0x1d0
May 10 15:26:40 os02 kernel: [ 3652.486473] [<ffffffff81466f74>] ?
__netdev_alloc_skb+0x24/0x50
May 10 15:26:40 os02 kernel: [ 3652.486476] [<ffffffff81466713>] ?
__alloc_skb+0x83/0x170
May 10 15:26:40 os02 kernel: [ 3652.486479] [<ffffffff81466f74>] ?
__netdev_alloc_skb+0x24/0x50
May 10 15:26:40 os02 kernel: [ 3652.486489] [<ffffffffa005d9aa>] ?
ixgbe_alloc_rx_buffers+0x9a/0x450 [ixgbe]
May 10 15:26:40 os02 kernel: [ 3652.486494] [<ffffffff81474840>] ?
napi_skb_finish+0x50/0x70
May 10 15:26:40 os02 kernel: [ 3652.486501] [<ffffffffa0060930>] ?
ixgbe_poll+0x1140/0x1670 [ixgbe]
May 10 15:26:40 os02 kernel: [ 3652.486506] [<ffffffff81013379>] ?
sched_clock+0x9/0x10
May 10 15:26:40 os02 kernel: [ 3652.486510] [<ffffffff81474eb2>] ?
net_rx_action+0x102/0x2a0
May 10 15:26:40 os02 kernel: [ 3652.486514] [<ffffffff8106b745>] ?
__do_softirq+0xb5/0x210
May 10 15:26:40 os02 kernel: [ 3652.486520] [<ffffffff8108aec4>] ?
hrtimer_interrupt+0x134/0x240
May 10 15:26:40 os02 kernel: [ 3652.486523] [<ffffffff8100cf3c>] ?
call_softirq+0x1c/0x30
May 10 15:26:40 os02 kernel: [ 3652.486526] [<ffffffff8100e975>] ?
do_softirq+0x65/0xa0
May 10 15:26:40 os02 kernel: [ 3652.486529] [<ffffffff8106b605>] ?
irq_exit+0x95/0xa0
May 10 15:26:40 os02 kernel: [ 3652.486533] [<ffffffff8154a360>] ?
smp_apic_timer_interrupt+0x70/0x9b
May 10 15:26:40 os02 kernel: [ 3652.486536] [<ffffffff8100c9f3>] ?
apic_timer_interrupt+0x13/0x20
May 10 15:26:40 os02 kernel: [ 3652.486538] <EOI>
[<ffffffff812db311>] ? intel_idle+0xc1/0x120
May 10 15:26:40 os02 kernel: [ 3652.486544] [<ffffffff812db2f4>] ?
intel_idle+0xa4/0x120
May 10 15:26:40 os02 kernel: [ 3652.486549] [<ffffffff8143bca5>] ?
cpuidle_idle_call+0xb5/0x240
May 10 15:26:40 os02 kernel: [ 3652.486554] [<ffffffff8100aa87>] ?
cpu_idle+0xb7/0x110
May 10 15:26:40 os02 kernel: [ 3652.486558] [<ffffffff81538ffe>] ?
start_secondary+0x21f/0x221
May 10 15:26:40 os02 kernel: [ 3652.486561] Mem-Info:
May 10 15:26:40 os02 kernel: [ 3652.486562] Node 0 DMA per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.486564] CPU 0: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.486567] CPU 1: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.486569] CPU 2: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.486571] CPU 3: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.486573] CPU 4: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.486575] CPU 5: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.486578] CPU 6: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.486580] CPU 7: hi: 0, btch:
1 usd: 0
May 10 15:26:40 os02 kernel: [ 3652.486581] Node 0 DMA32 per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.486584] CPU 0: hi: 186, btch:
31 usd: 144
May 10 15:26:40 os02 kernel: [ 3652.486586] CPU 1: hi: 186, btch:
31 usd: 198
May 10 15:26:40 os02 kernel: [ 3652.486588] CPU 2: hi: 186, btch:
31 usd: 180
May 10 15:26:40 os02 kernel: [ 3652.486590] CPU 3: hi: 186, btch:
31 usd: 172
May 10 15:26:40 os02 kernel: [ 3652.486593] CPU 4: hi: 186, btch:
31 usd: 159
May 10 15:26:40 os02 kernel: [ 3652.486595] CPU 5: hi: 186, btch:
31 usd: 69
May 10 15:26:40 os02 kernel: [ 3652.486597] CPU 6: hi: 186, btch:
31 usd: 180
May 10 15:26:40 os02 kernel: [ 3652.486599] CPU 7: hi: 186, btch:
31 usd: 184
May 10 15:26:40 os02 kernel: [ 3652.486601] Node 0 Normal per-cpu:
May 10 15:26:40 os02 kernel: [ 3652.486603] CPU 0: hi: 186, btch:
31 usd: 162
May 10 15:26:40 os02 kernel: [ 3652.486605] CPU 1: hi: 186, btch:
31 usd: 47
May 10 15:26:40 os02 kernel: [ 3652.486608] CPU 2: hi: 186, btch:
31 usd: 168
May 10 15:26:40 os02 kernel: [ 3652.486610] CPU 3: hi: 186, btch:
31 usd: 141
May 10 15:26:40 os02 kernel: [ 3652.486612] CPU 4: hi: 186, btch:
31 usd: 177
May 10 15:26:40 os02 kernel: [ 3652.486614] CPU 5: hi: 186, btch:
31 usd: 77
May 10 15:26:40 os02 kernel: [ 3652.486616] CPU 6: hi: 186, btch:
31 usd: 168
May 10 15:26:40 os02 kernel: [ 3652.486618] CPU 7: hi: 186, btch:
31 usd: 174
May 10 15:26:40 os02 kernel: [ 3652.486624] active_anon:255806
inactive_anon:19454 isolated_anon:0
May 10 15:26:40 os02 kernel: [ 3652.486625] active_file:420093
inactive_file:5180745 isolated_file:0
May 10 15:26:40 os02 kernel: [ 3652.486627] unevictable:50582
dirty:314470 writeback:8484 unstable:0
May 10 15:26:40 os02 kernel: [ 3652.486628] free:29795
slab_reclaimable:35739 slab_unreclaimable:13526
May 10 15:26:40 os02 kernel: [ 3652.486629] mapped:3440 shmem:51
pagetables:1342 bounce:0
May 10 15:26:40 os02 kernel: [ 3652.486631] Node 0 DMA free:15852kB
min:12kB low:12kB high:16kB active_anon:0kB inactive_anon:0kB
active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB
isolated(file):0kB present:15660kB mlocked:0kB dirty:0kB writeback:0kB
mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB
kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB
writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
May 10 15:26:40 os02 kernel: [ 3652.486642] lowmem_reserve[]: 0 2991 24201 24201
May 10 15:26:40 os02 kernel: [ 3652.486645] Node 0 DMA32 free:85748kB
min:2460kB low:3072kB high:3688kB active_anon:20480kB
inactive_anon:5268kB active_file:151588kB inactive_file:2645188kB
unevictable:72kB isolated(anon):0kB isolated(file):0kB
present:3063392kB mlocked:0kB dirty:210820kB writeback:0kB
mapped:648kB shmem:0kB slab_reclaimable:28400kB
slab_unreclaimable:2152kB kernel_stack:520kB pagetables:100kB
unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0
all_unreclaimable? no
May 10 15:26:40 os02 kernel: [ 3652.486657] lowmem_reserve[]: 0 0 21210 21210
May 10 15:26:40 os02 kernel: [ 3652.486660] Node 0 Normal free:17580kB
min:17440kB low:21800kB high:26160kB active_anon:1002744kB
inactive_anon:72548kB active_file:1528784kB inactive_file:18077792kB
unevictable:202256kB isolated(anon):0kB isolated(file):0kB
present:21719040kB mlocked:0kB dirty:1047060kB writeback:33936kB
mapped:13112kB shmem:204kB slab_reclaimable:114556kB
slab_unreclaimable:51952kB kernel_stack:3768kB pagetables:5268kB
unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:64
all_unreclaimable? no
May 10 15:26:40 os02 kernel: [ 3652.486673] lowmem_reserve[]: 0 0 0 0
May 10 15:26:40 os02 kernel: [ 3652.486675] Node 0 DMA: 1*4kB 1*8kB
0*16kB 1*32kB 1*64kB 1*128kB 1*256kB 0*512kB 1*1024kB 1*2048kB
3*4096kB = 15852kB
May 10 15:26:40 os02 kernel: [ 3652.486684] Node 0 DMA32: 59*4kB
125*8kB 66*16kB 80*32kB 188*64kB 51*128kB 15*256kB 40*512kB 31*1024kB
1*2048kB 1*4096kB = 85620kB
May 10 15:26:40 os02 kernel: [ 3652.486692] Node 0 Normal: 3705*4kB
12*8kB 16*16kB 4*32kB 1*64kB 0*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB
0*4096kB = 18180kB
May 10 15:26:40 os02 kernel: [ 3652.486700] 5651289 total pagecache pages
May 10 15:26:40 os02 kernel: [ 3652.486702] 0 pages in swap cache
May 10 15:26:40 os02 kernel: [ 3652.486704] Swap cache stats: add 0,
delete 0, find 0/0
May 10 15:26:40 os02 kernel: [ 3652.486705] Free swap = 1048572kB
May 10 15:26:40 os02 kernel: [ 3652.486707] Total swap = 1048572kB
May 10 15:26:40 os02 kernel: [ 3652.562795] 6291440 pages RAM
May 10 15:26:40 os02 kernel: [ 3652.562798] 108688 pages reserved
May 10 15:26:40 os02 kernel: [ 3652.562799] 5429575 pages shared
May 10 15:26:40 os02 kernel: [ 3652.562801] 783596 pages non-shared
May 10 15:26:40 os02 kernel: [ 3652.651570] 6291440 pages RAM
May 10 15:26:40 os02 kernel: [ 3652.651572] 108688 pages reserved
May 10 15:26:40 os02 kernel: [ 3652.651573] 5430055 pages shared
May 10 15:26:40 os02 kernel: [ 3652.651575] 782974 pages non-shared
May 10 15:26:40 os02 kernel: [ 3652.721553] 6291440 pages RAM
May 10 15:26:40 os02 kernel: [ 3652.721555] 108688 pages reserved
May 10 15:26:40 os02 kernel: [ 3652.721556] 5430961 pages shared
May 10 15:26:40 os02 kernel: [ 3652.721557] 781496 pages non-shared
May 10 15:26:40 os02 kernel: [ 3654.349865] Pid: 1846, comm: cosd
Tainted: P W 2.6.38.6-1.fits.1.el6.x86_64 #1
May 10 15:26:40 os02 kernel: [ 3654.358792] Call Trace:
May 10 15:26:40 os02 kernel: [ 3654.361519] <IRQ>
[<ffffffff81108ce7>] ? __alloc_pages_nodemask+0x6f7/0x8a0
May 10 15:26:40 os02 kernel: [ 3654.369495] [<ffffffff814b0ad0>] ?
ip_local_deliver+0x80/0x90
May 10 15:26:40 os02 kernel: [ 3654.376005] [<ffffffff81146cd2>] ?
kmalloc_large_node+0x62/0xb0
May 10 15:26:40 os02 kernel: [ 3654.382703] [<ffffffff8114becb>] ?
__kmalloc_node_track_caller+0x15b/0x1d0
May 10 15:26:40 os02 kernel: [ 3654.390464] [<ffffffff81466f74>] ?
__netdev_alloc_skb+0x24/0x50
May 10 15:26:40 os02 kernel: [ 3654.397163] [<ffffffff81466713>] ?
__alloc_skb+0x83/0x170
May 10 15:26:40 os02 kernel: [ 3654.403277] [<ffffffff81466f74>] ?
__netdev_alloc_skb+0x24/0x50
May 10 15:26:40 os02 kernel: [ 3654.409970] [<ffffffffa005d9aa>] ?
ixgbe_alloc_rx_buffers+0x9a/0x450 [ixgbe]
May 10 15:26:40 os02 kernel: [ 3654.417926] [<ffffffff812b79e0>] ?
swiotlb_map_page+0x0/0x110
May 10 15:26:40 os02 kernel: [ 3654.424432] [<ffffffffa0060930>] ?
ixgbe_poll+0x1140/0x1670 [ixgbe]
May 10 15:26:40 os02 kernel: [ 3654.431518] [<ffffffff810f33eb>] ?
perf_pmu_enable+0x2b/0x40
May 10 15:26:40 os02 kernel: [ 3654.437924] [<ffffffff81474eb2>] ?
net_rx_action+0x102/0x2a0
May 10 15:26:40 os02 kernel: [ 3654.444329] [<ffffffff8106b745>] ?
__do_softirq+0xb5/0x210
May 10 15:26:40 os02 kernel: [ 3654.450541] [<ffffffff810c7ca4>] ?
handle_IRQ_event+0x54/0x180
May 10 15:26:40 os02 kernel: [ 3654.457138] [<ffffffff8106b7bd>] ?
__do_softirq+0x12d/0x210
May 10 15:26:40 os02 kernel: [ 3654.463446] [<ffffffff8100cf3c>] ?
call_softirq+0x1c/0x30
May 10 15:26:40 os02 kernel: [ 3654.469562] [<ffffffff8100e975>] ?
do_softirq+0x65/0xa0
May 10 15:26:40 os02 kernel: [ 3654.475484] [<ffffffff8106b605>] ?
irq_exit+0x95/0xa0
May 10 15:26:40 os02 kernel: [ 3654.481218] [<ffffffff8154a276>] ?
do_IRQ+0x66/0xe0
May 10 15:26:40 os02 kernel: [ 3654.486754] [<ffffffff81542a53>] ?
ret_from_intr+0x0/0x15
May 10 15:26:40 os02 kernel: [ 3654.492867] <EOI>
[<ffffffff81286919>] ? __make_request+0x149/0x4c0
May 10 15:26:40 os02 kernel: [ 3654.500061] [<ffffffff812868e4>] ?
__make_request+0x114/0x4c0
May 10 15:26:41 os02 kernel: [ 3654.506565] [<ffffffff812841bd>] ?
generic_make_request+0x2fd/0x5e0
May 10 15:26:41 os02 kernel: [ 3654.513649] [<ffffffff8142742b>] ?
dm_get_live_table+0x4b/0x60
May 10 15:26:41 os02 kernel: [ 3654.520248] [<ffffffff81427bc1>] ?
dm_merge_bvec+0xc1/0x140
May 10 15:26:41 os02 kernel: [ 3654.526555] [<ffffffff81284526>] ?
submit_bio+0x86/0x110
May 10 15:26:41 os02 kernel: [ 3654.532574] [<ffffffff8118deac>] ?
dio_bio_submit+0xbc/0xc0
May 10 15:26:41 os02 kernel: [ 3654.538881] [<ffffffff8118df40>] ?
dio_send_cur_page+0x90/0xc0
May 10 15:26:41 os02 kernel: [ 3654.545478] [<ffffffff8118dfd5>] ?
submit_page_section+0x65/0x180
May 10 15:26:41 os02 kernel: [ 3654.552370] [<ffffffff8118e918>] ?
__blockdev_direct_IO+0x678/0xb30
May 10 15:26:41 os02 kernel: [ 3654.559454] [<ffffffff81250eaf>] ?
security_inode_getsecurity+0x1f/0x30
May 10 15:26:41 os02 kernel: [ 3654.566924] [<ffffffff8118c627>] ?
blkdev_direct_IO+0x57/0x60
May 10 15:26:41 os02 kernel: [ 3654.573414] [<ffffffff8118b760>] ?
blkdev_get_blocks+0x0/0xc0
May 10 15:26:41 os02 kernel: [ 3654.579954] [<ffffffff811008f2>] ?
generic_file_direct_write+0xc2/0x190
May 10 15:26:41 os02 kernel: [ 3654.587424] [<ffffffff811715b6>] ?
file_update_time+0xf6/0x170
May 10 15:26:41 os02 kernel: [ 3654.594025] [<ffffffff811023eb>] ?
__generic_file_aio_write+0x32b/0x460
May 10 15:26:41 os02 kernel: [ 3654.601494] [<ffffffff8105c9e0>] ?
wake_up_state+0x10/0x20
and so on.
--
Stefan Majer
--
Stefan Majer
^ permalink raw reply
* Re: [PATCH net-next] vmxnet3: Use single tx queue when CONFIG_PCI_MSI not defined
From: Shreyas Bhatewara @ 2011-05-10 16:13 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: pv-drivers
In-Reply-To: <alpine.LRH.2.00.1105091715150.26660@sbhatewara-dev1.eng.vmware.com>
Resending this patch with few changes.
Avoid multiple queues when MSI or MSI-X not available
Limit number of Tx queues to 1 if MSI/MSI-X support is not configured in
the kernel. This will make number of tx and rx queues equal when MSI/X
is not configured thus providing better performance.
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
---
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c
b/drivers/net/vmxnet3/vmxnet3_drv.c
index 7a494f7..ab2e753 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2882,6 +2882,9 @@ vmxnet3_probe_device(struct pci_dev *pdev,
int num_tx_queues;
int num_rx_queues;
+ if (!pci_msi_enabled())
+ enable_mq = 0;
+
#ifdef VMXNET3_RSS
if (enable_mq)
num_rx_queues = min(VMXNET3_DEVICE_MAX_RX_QUEUES,
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h
index 8ba7b5f..f50d36f 100644
--- a/drivers/net/vmxnet3/vmxnet3_int.h
+++ b/drivers/net/vmxnet3/vmxnet3_int.h
@@ -68,10 +68,10 @@
/*
* Version numbers
*/
-#define VMXNET3_DRIVER_VERSION_STRING "1.0.25.0-k"
+#define VMXNET3_DRIVER_VERSION_STRING "1.1.9.0-k"
/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
-#define VMXNET3_DRIVER_VERSION_NUM 0x01001900
+#define VMXNET3_DRIVER_VERSION_NUM 0x01010900
#if defined(CONFIG_PCI_MSI)
/* RSS only makes sense if MSI-X is supported. */
^ permalink raw reply related
* Re: [Bugme-new] [Bug 33502] New: Caught 64-bit read from uninitialized memory in __alloc_skb
From: Christoph Lameter @ 2011-05-10 16:33 UTC (permalink / raw)
To: Pekka Enberg
Cc: Eric Dumazet, casteyde.christian, Andrew Morton, netdev,
bugzilla-daemon, bugme-daemon, Vegard Nossum
In-Reply-To: <4DC91137.4030109@cs.helsinki.fi>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 522 bytes --]
On Tue, 10 May 2011, Pekka Enberg wrote:
> On 5/10/11 1:17 PM, Eric Dumazet wrote:
> > Le mardi 10 mai 2011 à 13:03 +0300, Pekka Enberg a écrit :
> >
> > > Can't we fix the issue by putting kmemcheck_mark_initialized() to
> > > set_freepointer()?
> >
> > This would solve kmemcheck problem, not DEBUG_PAGEALLOC
>
> Oh, right. Christoph? We need to support DEBUG_PAGEALLOC with SLUB.
Well back to the #ifdef then? Or has DEBUG_PAGEALLOC some override
mechanism that we can do a speculative memory access?
^ 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