* Re: [PATCH] phylib: Allow BCM63XX PHY to be selected only on BCM63XX.
From: David Miller @ 2011-06-17 3:45 UTC (permalink / raw)
To: ralf; +Cc: netdev, linux-mips, ffainelli
In-Reply-To: <20110615080758.GA3226@linux-mips.org>
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 15 Jun 2011 09:07:58 +0100
> This PHY is available integrated into BCM63xx series SOCs only.
>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] iptables: document IPv6 TOS mangling bug in old Linux kernels
From: Patrick McHardy @ 2011-06-17 3:47 UTC (permalink / raw)
To: Fernando Luis V�zquez Cao
Cc: Jan Engelhardt, Maciej, Pablo Neira Aysuo,
Netfilter Developer Mailing List,
Linux Networking Developer Mailing List
In-Reply-To: <1308273246.8612.3.camel@nexus.oss.ntt.co.jp>
On 17.06.2011 03:14, Fernando Luis V�zquez Cao wrote:
> In Linux kernels up to and including 2.6.38, with the exception of longterm
> releases 2.6.32.42 (or later) and 2.6.33.15 (or later), there is a bug (*) whereby
> IPv6 TOS mangling does not behave as documented and differs from the IPv4
> version. The TOS mask indicates the bits one wants to zero out, so it needs to
> be inverted before applying it to the original TOS field. However, the
> aformentioned kernels forgo the inversion which breaks --set-tos and its
> mnemonics.
>
> (*) Fixed by upstream commit:
> 1ed2f73d90fb49bcf5704aee7e9084adb882bfc5 (netfilter: IPv6: fix DSCP mangle code)
>
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" 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 for 3.0-rc4 0/2] dp83640: bug fixes
From: David Miller @ 2011-06-17 3:48 UTC (permalink / raw)
To: richardcochran; +Cc: linux-kernel, netdev, john.stultz, tglx
In-Reply-To: <cover.1308129342.git.richard.cochran@omicron.at>
From: Richard Cochran <richardcochran@gmail.com>
Date: Wed, 15 Jun 2011 11:55:18 +0200
> This series fixes two status frame related bugs in the driver for the
> dp83640 phy. I am not sure whether you would call this a timer fix or
> a networking fix, so I put both groups on CC.
I've applied both to net-2.6, thanks.
^ permalink raw reply
* Re: [PATCH] sky2: avoid using uninitialized variable
From: Ben Hutchings @ 2011-06-17 3:51 UTC (permalink / raw)
To: David Miller; +Cc: shemminger, gthelen, shemminger, netdev, linux-kernel
In-Reply-To: <20110616.231018.84570655636629416.davem@davemloft.net>
On Thu, 2011-06-16 at 23:10 -0400, David Miller wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Tue, 14 Jun 2011 00:02:30 -0400
>
> > In my experience if phy reads once successfully, it is going
> > to read every time. If there is a problem it only happens on
> > the first access (powered off, bad timing, etc).
>
> It also happens when the PHY can't get a response for a certain
> register, for whatever reason, before internal hw timeouts trigger.
>
> Please, check all MII accesses. That's what I do in every driver
> I've written.
It doesn't help that the mii_if_info operations are defined to never
return errors. This doesn't prevent drivers from doing so internally,
but it does set a bad example.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [patch -next] rtnetlink: unlock on error path in netlink_dump()
From: David Miller @ 2011-06-17 3:51 UTC (permalink / raw)
To: error27
Cc: gregory.v.rose, eric.dumazet, kaber, chrisw, jeffrey.t.kirsher,
netdev, kernel-janitors
In-Reply-To: <20110615131142.GE23739@shale.localdomain>
From: Dan Carpenter <error27@gmail.com>
Date: Wed, 15 Jun 2011 16:11:42 +0300
> In c7ac8679bec939 "rtnetlink: Compute and store minimum ifinfo dump
> size", we moved the allocation under the lock so we need to unlock
> on error path.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] tun: teach the tun/tap driver to support netpoll
From: David Miller @ 2011-06-17 3:53 UTC (permalink / raw)
To: nhorman; +Cc: netdev, riel, maxk, amwang
In-Reply-To: <1308151501-8434-1-git-send-email-nhorman@tuxdriver.com>
From: Neil Horman <nhorman@tuxdriver.com>
Date: Wed, 15 Jun 2011 11:25:01 -0400
> Commit 8d8fc29d02a33e4bd5f4fa47823c1fd386346093 changed the behavior of slave
> devices in regards to netpoll. Specifically it created a mutually exclusive
> relationship between being a slave and a netpoll-capable device. This creates
> problems for KVM because guests relied on needing netconsole active on a slave
> device to a bridge. Ideally libvirtd could just attach netconsole to the bridge
> device instead, but thats currently infeasible, because while the bridge device
> supports netpoll, it requires that all slave interface also support it, but the
> tun/tap driver currently does not. The most direct solution is to teach tun/tap
> to support netpoll, which is implemented by the patch below.
>
> I've not tested this yet, but its pretty straightforward.
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-by: Rik van Riel <riel@redhat.com>
> CC: Rik van Riel <riel@redhat.com>
> CC: Maxim Krasnyansky <maxk@qualcomm.com>
> CC: Cong Wang <amwang@redhat.com>
> CC: "David S. Miller" <davem@davemloft.net>
Applied, thanks Neil.
^ permalink raw reply
* Re: [next-next-2.6 PATCH] enic: Add support to configure hardware interrupt coalesce timers in a platform independent way
From: David Miller @ 2011-06-17 3:57 UTC (permalink / raw)
To: vkolluri; +Cc: netdev
In-Reply-To: <20110615211758.28596.12341.stgit@savbu-pc100.cisco.com>
From: Vasanthy Kolluri <vkolluri@cisco.com>
Date: Wed, 15 Jun 2011 14:17:58 -0700
> + /* Get interrupt coalesce timer info
> + */
> +
> + err = enic_dev_intr_coal_timer_info(enic);
Please, comment should be just one line long and empty
line is superflous.
^ permalink raw reply
* Re: [PATCH] sky2: avoid using uninitialized variable
From: David Miller @ 2011-06-17 3:58 UTC (permalink / raw)
To: bhutchings; +Cc: shemminger, gthelen, shemminger, netdev, linux-kernel
In-Reply-To: <1308282695.11457.48.camel@localhost>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 17 Jun 2011 04:51:35 +0100
> On Thu, 2011-06-16 at 23:10 -0400, David Miller wrote:
>> From: Stephen Hemminger <shemminger@vyatta.com>
>> Date: Tue, 14 Jun 2011 00:02:30 -0400
>>
>> > In my experience if phy reads once successfully, it is going
>> > to read every time. If there is a problem it only happens on
>> > the first access (powered off, bad timing, etc).
>>
>> It also happens when the PHY can't get a response for a certain
>> register, for whatever reason, before internal hw timeouts trigger.
>>
>> Please, check all MII accesses. That's what I do in every driver
>> I've written.
>
> It doesn't help that the mii_if_info operations are defined to never
> return errors. This doesn't prevent drivers from doing so internally,
> but it does set a bad example.
I totally agree.
^ permalink raw reply
* Re: [PATCH net-2.6] caif: Bugfix - XOFF removed channel from caif-mux
From: David Miller @ 2011-06-17 3:59 UTC (permalink / raw)
To: sjur.brandeland; +Cc: netdev
In-Reply-To: <1308177505-1843-1-git-send-email-sjur.brandeland@stericsson.com>
From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Thu, 16 Jun 2011 00:38:25 +0200
> XOFF was mixed up with DOWN indication, causing causing CAIF channel to be
> removed from mux and all incoming traffic to be lost after receiving flow-off.
> Fix this by replacing FLOW_OFF with DOWN notification.
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 03/11] net/can: use printk_ratelimited() instead of printk_ratelimit()
From: David Miller @ 2011-06-17 4:03 UTC (permalink / raw)
To: manuel.f.zerpies-BvGhN7WtUVpvnyFi9AzMs1NpE/a5I+DW
Cc: urs.thuermann-l29pVbxQd1IUtdQbppsyvg,
socketcan-fJ+pQTUTwRTk1uMJSBkQmQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
christian.dietrich-jNDFPZUTrfT6U6xlzOR6HsSSVFg4/55HhC4ANOJQIlc,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <6c8d043e92e68ab304999fc1a1f7f4c7a04a818e.1308142053.git.manuel.f.zerpies-BvGhN7WtUVpvnyFi9AzMs1NpE/a5I+DW@public.gmane.org>
From: Manuel Zerpies <manuel.f.zerpies-BvGhN7WtUVpvnyFi9AzMs1NpE/a5I+DW@public.gmane.org>
Date: Thu, 16 Jun 2011 14:08:01 +0200
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited().
>
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies-BvGhN7WtUVpvnyFi9AzMs1NpE/a5I+DW@public.gmane.org>
Applied.
^ permalink raw reply
* Re: [PATCH 04/11] net/rds: use prink_ratelimited() instead of printk_ratelimit()
From: David Miller @ 2011-06-17 4:03 UTC (permalink / raw)
To: manuel.f.zerpies
Cc: andy.grover, rds-devel, netdev, linux-kernel, christian.dietrich
In-Reply-To: <639d68afea7b4b37a5b8b228f3b15f4f81a61ed8.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
From: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Date: Thu, 16 Jun 2011 14:09:57 +0200
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited()
>
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Applied.
^ permalink raw reply
* Re: [PATCH] e1000: remove unnecessary code
From: David Miller @ 2011-06-17 4:03 UTC (permalink / raw)
To: Gregory.Dietsche
Cc: kernel-janitors, e1000-devel, bruce.w.allan, jesse.brandeburg,
john.ronciak, netdev
In-Reply-To: <1308244170-30304-1-git-send-email-Gregory.Dietsche@cuw.edu>
From: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date: Thu, 16 Jun 2011 12:09:30 -0500
> Compile tested.
> remove unnecessary code that matches this coccinelle pattern
> if (...)
> return ret;
> return ret;
>
> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Applied.
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
^ permalink raw reply
* Re: [PATCH] net: icplus: remove unnecessary code
From: David Miller @ 2011-06-17 4:03 UTC (permalink / raw)
To: Gregory.Dietsche
Cc: netdev, kernel-janitors, peppe.cavallaro, u.kleine-koenig
In-Reply-To: <1308243870-30203-1-git-send-email-Gregory.Dietsche@cuw.edu>
From: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date: Thu, 16 Jun 2011 12:04:30 -0500
> Compile tested.
> remove unnecessary code that matches this coccinelle pattern
> if (...)
> return ret;
> return ret;
>
> Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 5/7] qlcnic: fix default operating state of interface
From: David Miller @ 2011-06-17 4:10 UTC (permalink / raw)
To: anirban.chakraborty; +Cc: netdev, amit.salecha
In-Reply-To: <1308256659-19895-5-git-send-email-anirban.chakraborty@qlogic.com>
From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Date: Thu, 16 Jun 2011 13:37:36 -0700
> From: Amit Kumar Salecha <amit.salecha@qlogic.com>
>
> Currently interface shows status as RUNNING, even if there is no link.
> To fix this, netif_carrier_off should be called after register_netdev().
>
> netif_carrier_off calls linkwatch_fire_event(dev); only if netdev is registered,
> otherwise it skips. linkwatch_fire_event set default state of nic interface.
>
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
You cannot do this.
The exact second that register_netdev() is called, the device can
be brought up asynchronously and the link brought into the up state.
Your netif_carrier_off() call will race with this.
This is why no other (properly functioning) driver does what you're
trying to do here.
^ permalink raw reply
* Re: [PATCH 001/001] vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support
From: David Miller @ 2011-06-17 4:13 UTC (permalink / raw)
To: a.reversat; +Cc: netdev
In-Reply-To: <BANLkTimBm8rFF41RzAN6vk3o6SLy6cfZDQ@mail.gmail.com>
From: Antoine Reversat <a.reversat@gmail.com>
Date: Thu, 16 Jun 2011 16:47:13 -0400
> This patch removes the call to ndo_vlan_rx_register if the underlying
> device doesn't have hardware support for VLAN.
> Signed-off-by: Antoine Reversat <a.reversat@gmail.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] vmxnet3: fix starving rx ring when alloc_skb fails
From: David Miller @ 2011-06-17 4:16 UTC (permalink / raw)
To: scottjg; +Cc: netdev, pv-drivers
In-Reply-To: <1308261747-17702-1-git-send-email-scottjg@vmware.com>
From: "Scott J. Goldman" <scottjg@vmware.com>
Date: Thu, 16 Jun 2011 15:02:27 -0700
> if the rx ring is completely empty, then the device may never fire an rx
> interrupt. unfortunately, the rx interrupt is what triggers populating
> the rx ring with fresh buffers, so this will cause networking to lock
> up.
>
> this patch recycles the last skb that we were about to indicate up to
> the network stack (only if the rx ring is completely starved of skbs)
> so the ring will never be completely empty. If we fail to allocate a
> secondary page buffer, we just indicate a 0 length buffer to the device.
>
> Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
This is why other drivers allocate the replacement skb _first_ before
handing the current receive packet to the stack.
And if the replacement allocation fails, they elide passing the packet
to the stack, and instead recycle it back onto the RX ring.
Please implement your RX policy in this manner, as we advise all Linux
networking drivers to, and you simply won't have this problem.
^ permalink raw reply
* Re: [PATCH] netdev: bfin_mac: fix memory leak when freeing dma descriptors
From: David Miller @ 2011-06-17 4:19 UTC (permalink / raw)
To: vapier; +Cc: netdev, uclinux-dist-devel, sonic.zhang
In-Reply-To: <1308263518-22724-1-git-send-email-vapier@gentoo.org>
From: Mike Frysinger <vapier@gentoo.org>
Date: Thu, 16 Jun 2011 18:31:58 -0400
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> The size of the desc array is not the size of the desc structure, so
> when we try to free up things, we leak some parts.
>
> Reported-by: Regis Dargent <rdargent@edevice.com>
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Applied, thanks.
^ permalink raw reply
* [RFC 0/2] Allow NICs to pass Frame Checksum up the stack.
From: greearb @ 2011-06-17 4:30 UTC (permalink / raw)
To: netdev; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
This series provides ethtool support to set and get the rx-checksum
flag, and adds support to the e100 driver.
Assuming this series is acceptable, I would then propose a series of patches
to allow receiving all frames, even ones with bad checksums, etc.
And if that is acceptable, a third series would allow user-space to generate
packets with custom ethernet frame checksums (ie, bad ones if desired).
And finally, more drivers, such as e1000 and hopefully e100e can
be supported.
Ben Greear (2):
net: Support getting/setting RX-FCS in drivers.
e100: Support receiving Ethernet FCS.
drivers/net/e100.c | 39 ++++++++++++++++++++++++++++++++++++---
include/linux/ethtool.h | 5 +++++
net/core/ethtool.c | 38 ++++++++++++++++++++++++++++++++++++++
3 files changed, 79 insertions(+), 3 deletions(-)
--
1.7.3.4
^ permalink raw reply
* [RFC 1/2] net: Support getting/setting RX-FCS in drivers.
From: greearb @ 2011-06-17 4:30 UTC (permalink / raw)
To: netdev; +Cc: Ben Greear
In-Reply-To: <1308285007-11302-1-git-send-email-greearb@candelatech.com>
From: Ben Greear <greearb@candelatech.com>
This will allow us to enable/disable having the Ethernet
frame checksum appended to the skb. Enabling this is
useful when sniffing packets.
In particular, this can be used to test logic that allows
a NIC to receive all frames, even ones with bad checksums.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 439b173... e5e8747... M include/linux/ethtool.h
:100644 100644 fd14116... b36bac7... M net/core/ethtool.c
include/linux/ethtool.h | 5 +++++
net/core/ethtool.c | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 439b173..e5e8747 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -955,6 +955,8 @@ struct ethtool_ops {
int (*get_dump_data)(struct net_device *,
struct ethtool_dump *, void *);
int (*set_dump)(struct net_device *, struct ethtool_dump *);
+ int (*set_save_fcs)(struct net_device *, u32);
+ int (*get_save_fcs)(struct net_device *, u32 *);
};
#endif /* __KERNEL__ */
@@ -1029,6 +1031,9 @@ struct ethtool_ops {
#define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */
#define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */
#define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */
+#define ETHTOOL_GETRXFCS 0x00000041 /* Get RX Save Frame Checksum */
+#define ETHTOOL_SETRXFCS 0x00000042 /* Set RX Save Frame Checksum */
+
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index fd14116..b36bac7 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1927,6 +1927,38 @@ out:
return ret;
}
+static int ethtool_get_rx_fcs(struct net_device *dev, void __user *useraddr)
+{
+ struct ethtool_value edata;
+ int rv = 0;
+
+ if (!dev->ethtool_ops->get_save_fcs)
+ return -EOPNOTSUPP;
+
+ rv = dev->ethtool_ops->get_save_fcs(dev, &edata.data);
+ if (rv < 0)
+ return rv;
+
+ if (copy_to_user(useraddr, &edata, sizeof(edata)))
+ return -EFAULT;
+ return 0;
+}
+
+
+static int ethtool_set_rx_fcs(struct net_device *dev, void __user *useraddr)
+{
+ struct ethtool_value id;
+
+ if (!dev->ethtool_ops->set_save_fcs)
+ return -EOPNOTSUPP;
+
+ if (copy_from_user(&id, useraddr, sizeof(id)))
+ return -EFAULT;
+
+ return dev->ethtool_ops->set_save_fcs(dev, id.data);
+}
+
+
/* The main entry point in this file. Called from net/core/dev.c */
int dev_ethtool(struct net *net, struct ifreq *ifr)
@@ -2152,6 +2184,12 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
case ETHTOOL_GET_DUMP_DATA:
rc = ethtool_get_dump_data(dev, useraddr);
break;
+ case ETHTOOL_SETRXFCS:
+ rc = ethtool_set_rx_fcs(dev, useraddr);
+ break;
+ case ETHTOOL_GETRXFCS:
+ rc = ethtool_get_rx_fcs(dev, useraddr);
+ break;
default:
rc = -EOPNOTSUPP;
}
--
1.7.3.4
^ permalink raw reply related
* [RFC 2/2] e100: Support receiving Ethernet FCS.
From: greearb @ 2011-06-17 4:30 UTC (permalink / raw)
To: netdev; +Cc: Ben Greear
In-Reply-To: <1308285007-11302-1-git-send-email-greearb@candelatech.com>
From: Ben Greear <greearb@candelatech.com>
Helps when sniffing packets.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 e336c79... 80fcadf... M drivers/net/e100.c
drivers/net/e100.c | 39 ++++++++++++++++++++++++++++++++++++---
1 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index e336c79..80fcadf 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -587,6 +587,7 @@ struct nic {
multicast_all = (1 << 2),
wol_magic = (1 << 3),
ich_10h_workaround = (1 << 4),
+ save_fcs = (1 << 5),
} flags ____cacheline_aligned;
enum mac mac;
@@ -1130,6 +1131,9 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
config->promiscuous_mode = 0x1; /* 1=on, 0=off */
}
+ if (nic->flags & save_fcs)
+ config->rx_crc_transfer = 0x1; /* 1=save, 0=discard */
+
if (nic->flags & multicast_all)
config->multicast_all = 0x1; /* 1=accept, 0=no */
@@ -1917,6 +1921,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
struct sk_buff *skb = rx->skb;
struct rfd *rfd = (struct rfd *)skb->data;
u16 rfd_status, actual_size;
+ u16 fcs_pad = 0;
if (unlikely(work_done && *work_done >= work_to_do))
return -EAGAIN;
@@ -1949,9 +1954,11 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
}
/* Get actual data size */
+ if (nic->flags & save_fcs)
+ fcs_pad = 4;
actual_size = le16_to_cpu(rfd->actual_size) & 0x3FFF;
- if (unlikely(actual_size > RFD_BUF_LEN - sizeof(struct rfd)))
- actual_size = RFD_BUF_LEN - sizeof(struct rfd);
+ if (unlikely(actual_size > RFD_BUF_LEN + fcs_pad - sizeof(struct rfd)))
+ actual_size = RFD_BUF_LEN + fcs_pad - sizeof(struct rfd);
/* Get data */
pci_unmap_single(nic->pdev, rx->dma_addr,
@@ -1978,7 +1985,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
if (unlikely(!(rfd_status & cb_ok))) {
/* Don't indicate if hardware indicates errors */
dev_kfree_skb_any(skb);
- } else if (actual_size > ETH_DATA_LEN + VLAN_ETH_HLEN) {
+ } else if (actual_size > ETH_DATA_LEN + VLAN_ETH_HLEN + fcs_pad) {
/* Don't indicate oversized frames */
nic->rx_over_length_errors++;
dev_kfree_skb_any(skb);
@@ -2370,6 +2377,30 @@ static int e100_set_settings(struct net_device *netdev, struct ethtool_cmd *cmd)
return err;
}
+static int e100_set_save_fcs(struct net_device *netdev, u32 data)
+{
+ struct nic *nic = netdev_priv(netdev);
+ if (data)
+ nic->flags |= save_fcs;
+ else
+ nic->flags &= ~save_fcs;
+
+ e100_exec_cb(nic, NULL, e100_configure);
+
+ return 0;
+}
+
+static int e100_get_save_fcs(struct net_device *netdev, u32* data)
+{
+ struct nic *nic = netdev_priv(netdev);
+ if (nic->flags & save_fcs)
+ *data = 1;
+ else
+ *data = 0;
+
+ return 0;
+}
+
static void e100_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *info)
{
@@ -2689,6 +2720,8 @@ static const struct ethtool_ops e100_ethtool_ops = {
.set_phys_id = e100_set_phys_id,
.get_ethtool_stats = e100_get_ethtool_stats,
.get_sset_count = e100_get_sset_count,
+ .set_save_fcs = e100_set_save_fcs,
+ .get_save_fcs = e100_get_save_fcs,
};
static int e100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH 1/2] IGMP snooping: set mrouters_only flag for IPv4 traffic properly
From: Fernando Luis Vazquez Cao @ 2011-06-17 4:39 UTC (permalink / raw)
To: David Miller; +Cc: herbert, shemminger, netdev, kakuta.hayato
In-Reply-To: <20110616.231447.1625738654020726451.davem@davemloft.net>
David Miller <davem@davemloft.net> wrote:
> From: Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
> Date: Tue, 14 Jun 2011 10:04:43 +0900
>
> > Upon reception of a IGMP/IGMPv2 membership report the kernel sets the
> > mrouters_only flag in a skb that may be a clone of the original skb, which
> > means that sometimes the bridge loses track of membership report packets (cb
> > buffers are tied to a specific skb and not shared) and it ends up forwading
> > join requests to the bridge interface.
> >
> > This can cause unexpected membership timeouts and intermitent/permanent loss
> > of connectivity as described in RFC 4541 [2.1.1. IGMP Forwarding Rules]:
> >
> > A snooping switch should forward IGMP Membership Reports only to
> > those ports where multicast routers are attached.
> > [...]
> > Sending membership reports to other hosts can result, for IGMPv1
> > and IGMPv2, in unintentionally preventing a host from joining a
> > specific multicast group.
> >
> >
> > Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
> > Tested-by: Hayato Kakuta <kakuta.hayato@oss.ntt.co.jp>
>
> Applied.
Thank you David.
By the way, What kernel version(s) are you targeting for these two
patches. It would be great if we could get them upstream before 3.0
comes out. Without this fix the IGMP snooping code is simply unusable in
certain configurations.
- Fernando
^ permalink raw reply
* RE: [PATCH] vmxnet3: fix starving rx ring when alloc_skb fails
From: Scott Goldman @ 2011-06-17 4:40 UTC (permalink / raw)
To: David Miller; +Cc: netdev@vger.kernel.org, pv-drivers@vmware.com
In-Reply-To: <20110617.001610.2160676566738613200.davem@davemloft.net>
Hi David.
> This is why other drivers allocate the replacement skb _first_ before
> handing the current receive packet to the stack.
>
> And if the replacement allocation fails, they elide passing the packet
> to the stack, and instead recycle it back onto the RX ring.
>
> Please implement your RX policy in this manner, as we advise all Linux
> networking drivers to, and you simply won't have this problem.
I'm sorry if my patch description was unclear, but as I understand it, what you are describing is what this patch implements. The patched rx handler does something like:
1) poll the rx ring, peel off a pending skb (don't pass the packet up the stack yet)
2) if the ring needs to be repopulated, we do that
3) if the ring was repopulated successfully, then that's great, and we pass up the pending skb to the network stack.
4) if not and there are no skbs left on the ring, we reuse the pending skb and recycle it back on the ring (effectively dropping the packet we were about to pass up to the network stack)
Maybe the code structure is a bit unclear? Since we don't always repopulate the ring every iteration (only when we hit a low watermark), it's true that we don't strictly always allocate a new skb before passing up the old one, but since this is only a problem when there are no skbs on the ring, and we do elide passing up the pending skb in this case, is that not ok?
thanks,
-sjg
^ permalink raw reply
* Re: [PATCH net-next 1/2] net: Remove casts of void *
From: Joe Perches @ 2011-06-17 4:52 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Geert Uytterhoeven
In-Reply-To: <20110616.232344.2285390268187937319.davem@davemloft.net>
On Thu, 2011-06-16 at 23:23 -0400, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Mon, 13 Jun 2011 19:21:26 -0700
> > Unnecessary casts of void * clutter the code.
> > Signed-off-by: Joe Perches <joe@perches.com>
> Applied.
Hey David.
The equivalent drivers/net patch is marked "changes requested".
I think that's not true as I only saw acks.
Geert commented and I'll do a separate pr_<level>/netdev_<level>
neatening pass for a2065, lib8390 and zorro8390 and maybe any
other 8390 driver Geert wants.
As I now have a working m68k cross compiler,
these will be compile tested only.
fyi: this version
http://www.kernel.org/pub/tools/crosstool/files/bin/i686/4.6.0/i686-gcc-4.6.0-nolibc_m68k-linux.tar.bz2
doesn't cross compile for m68k/amiga successfully,
but the 3.4.5 version does
http://www.kernel.org/pub/tools/crosstool/files/bin/old/m68k-gcc-3.4.5-glibc-2.3.6.tar.bz2
cheers, Joe
^ permalink raw reply
* Re: [PATCH] vmxnet3: fix starving rx ring when alloc_skb fails
From: David Miller @ 2011-06-17 4:53 UTC (permalink / raw)
To: scottjg; +Cc: netdev, pv-drivers
In-Reply-To: <03E840D17E263A48A5766AD576E0423A012911782E@exch-mbx-111.vmware.com>
From: Scott Goldman <scottjg@vmware.com>
Date: Thu, 16 Jun 2011 21:40:15 -0700
> I'm sorry if my patch description was unclear, but as I understand it, what you are describing is what this patch implements. The patched rx handler does something like:
> 1) poll the rx ring, peel off a pending skb (don't pass the packet up the stack yet)
> 2) if the ring needs to be repopulated, we do that
> 3) if the ring was repopulated successfully, then that's great, and we pass up the pending skb to the network stack.
> 4) if not and there are no skbs left on the ring, we reuse the pending skb and recycle it back on the ring (effectively dropping the packet we were about to pass up to the network stack)
You shouldn't restrict this logic to when the ring is empty, you
should never leave any RX ring slots empty.
Every RX ring entry should be processed with a "alloc_skb()" first,
and if the allocation fails you recycle the RX ring's SKB.
^ permalink raw reply
* Re: [PATCH net-next 1/2] net: Remove casts of void *
From: David Miller @ 2011-06-17 4:54 UTC (permalink / raw)
To: joe; +Cc: netdev, geert
In-Reply-To: <1308286320.12072.25.camel@Joe-Laptop>
From: Joe Perches <joe@perches.com>
Date: Thu, 16 Jun 2011 21:52:00 -0700
> On Thu, 2011-06-16 at 23:23 -0400, David Miller wrote:
>> From: Joe Perches <joe@perches.com>
>> Date: Mon, 13 Jun 2011 19:21:26 -0700
>> > Unnecessary casts of void * clutter the code.
>> > Signed-off-by: Joe Perches <joe@perches.com>
>> Applied.
>
> Hey David.
>
> The equivalent drivers/net patch is marked "changes requested".
> I think that's not true as I only saw acks.
You were asked to modify the logic of your changes in one hunk
and even provided the RFC patch, please integrate that RFC patch
into your patch and resubmit.
^ 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