For the 802.1Q packets, if the NIC doesn't support hw-accel-vlan-rx, RPS
won't inspect the internal 4 tuples to generate skb->rxhash, so this kind
of traffic can't get any benefit from RPS.
This patch adds the support for 802.1Q to RPS.
Signed-off-by: Changli Gao <redacted>
---
net/core/dev.c | 8 ++++++++
1 file changed, 8 insertions(+)
For the 802.1Q packets, if the NIC doesn't support hw-accel-vlan-rx, RPS
won't inspect the internal 4 tuples to generate skb->rxhash, so this kind
of traffic can't get any benefit from RPS.
This patch adds the support for 802.1Q to RPS.
Signed-off-by: Changli Gao <redacted>
For the 802.1Q packets, if the NIC doesn't support hw-accel-vlan-rx, RPS
won't inspect the internal 4 tuples to generate skb->rxhash, so this kind
of traffic can't get any benefit from RPS.
This patch adds the support for 802.1Q to RPS.
Signed-off-by: Changli Gao <redacted>
Looks fine, applied to net-next, thanks!
Thanks for applying it. I have another patch which adds the support
for PPPOE session messages. Do you think it worth doing?
--
Regards,
Changli Gao(xiaosuo@gmail.com)
For the 802.1Q packets, if the NIC doesn't support hw-accel-vlan-rx, RPS
won't inspect the internal 4 tuples to generate skb->rxhash, so this kind
of traffic can't get any benefit from RPS.
This patch adds the support for 802.1Q to RPS.
Signed-off-by: Changli Gao <redacted>
Looks fine, applied to net-next, thanks!
Thanks for applying it. I have another patch which adds the support
for PPPOE session messages. Do you think it worth doing?
From: Ben Hutchings <hidden> Date: 2011-08-19 11:54:17
On Fri, 2011-08-19 at 13:05 +0800, Changli Gao wrote:
For the 802.1Q packets, if the NIC doesn't support hw-accel-vlan-rx, RPS
won't inspect the internal 4 tuples to generate skb->rxhash, so this kind
of traffic can't get any benefit from RPS.
This patch adds the support for 802.1Q to RPS.
Should this really be reading an unlimited number of tags? What if an
attacker starts sending packets full of VLAN tags? Since this runs
before netfilter, there would be no way to prevent those packets burning
our CPU time. And if there are legitimately multiple VLAN tags, they
presumably won't all have the 802.1q Ethertype.
Ben.
--
Ben Hutchings, Staff 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.
On Fri, Aug 19, 2011 at 7:54 PM, Ben Hutchings
[off-list ref] wrote:
Should this really be reading an unlimited number of tags?
Not unlimited, but it won't stop until reaching the end of the packet.
What if an
attacker starts sending packets full of VLAN tags? Since this runs
before netfilter, there would be no way to prevent those packets burning
our CPU time. And if there are legitimately multiple VLAN tags, they
presumably won't all have the 802.1q Ethertype.
Do we need to limit the number of rounds to stop this kind of "bad"
packets from burning our CPU time? Then, __netif_receive_skb() has to
be update too, so the inspection of tunnel in __skb_get_rxhash() does.
Is there a such limitation in xfrm?
Thanks.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
From: Ben Hutchings <hidden> Date: 2011-08-20 01:12:53
On Fri, 2011-08-19 at 23:05 +0800, Changli Gao wrote:
On Fri, Aug 19, 2011 at 7:54 PM, Ben Hutchings
[off-list ref] wrote:
quoted
Should this really be reading an unlimited number of tags?
Not unlimited, but it won't stop until reaching the end of the packet.
Right, I understand that the parsing is properly range-checked against
the length of the packet.
quoted
What if an
attacker starts sending packets full of VLAN tags? Since this runs
before netfilter, there would be no way to prevent those packets burning
our CPU time. And if there are legitimately multiple VLAN tags, they
presumably won't all have the 802.1q Ethertype.
Do we need to limit the number of rounds to stop this kind of "bad"
packets from burning our CPU time?
Well, maybe. Then again, the most effective way for an attacker to
waste a target's CPU time (aside from application-level vulnerabilities)
will often be just to send minimum size packets.
Then, __netif_receive_skb() has to
be update too, so the inspection of tunnel in __skb_get_rxhash() does.
Yes, if we agree this is something worth defending against then we would
need to be consistent in limiting any such parsing loop in pre-netfilter
processing.
Is there a such limitation in xfrm?
It appears to be limited to 6 levels of encapsulation.
Ben.
--
Ben Hutchings, Staff 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.