Bug 782001 - backport vlan support for pktgen
Summary: backport vlan support for pktgen
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.8
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: ---
Assignee: Jiri Pirko
QA Contact: Jan Tluka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-16 10:08 UTC by Jan Tluka
Modified: 2015-05-05 01:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
VLAN Support for pktgen VLAN support has been added to the pktgen module. The pktgen module is now able to produce 802.1Q tagged frames.
Clone Of:
Environment:
Last Closed: 2013-01-08 04:20:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0006 0 normal SHIPPED_LIVE Red Hat Enterprise Linux 5.9 kernel update 2013-01-08 08:48:56 UTC

Description Jan Tluka 2012-01-16 10:08:25 UTC
Description of problem:

RHEL5 kernel currently does not support vlans in pktgen module. It's not possible to test kernel network stack with VLANs involved. The support has been added in 2.6.19 Linux kernel so the backport should be easy.

Version-Release number of selected component (if applicable):

kernel-2.6.18-303.el5

Steps to Reproduce:

Use any of the commands below to setup the packet generator.
 pgset "vlan_id 77"       set VLAN ID 0-4095
 pgset "vlan_p 3"         set priority bit 0-7 (default 0)
 pgset "vlan_cfi 0"       set canonical format identifier 0-1 (default 0)

or use echo alternatives:
 echo "vlan_id 77" > /proc/net/pktgen/eth0

Dump network traffic using tcpdump or wireshark network sniffer and check vlan id is applied.

Actual results:
Write error when trying to set VLAN id.

Expected results:
VLAN id is applied to pktgen traffic.

Comment 1 Jan Tluka 2012-01-16 10:23:27 UTC
commit	34954ddc4f3e790fb6d5ed331513f54b38713234

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=patch;h=34954ddc4f3e790fb6d5ed331513f54b38713234

Comment 2 Jiri Pirko 2012-01-16 10:37:48 UTC
0f37c6057414fb68024793966b1dcb6a135cb844 is needed as well.

Comment 5 RHEL Program Management 2012-03-30 14:20:59 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 8 Jan Tluka 2012-09-12 09:28:59 UTC
Verified on 2.6.18-339.el5 kernel.

pktgen module can be loaded and all supported vlan options can be set and applied on generated traffic.

Testing included following:

1. Setting VLAN id and it's priority
# echo "vlan_id 22" > /proc/net/pktgen/eth1
# echo "vlan_p 3" > /proc/net/pktgen/eth1

10:57:05.448307 52:54:00:aa:bb:c1 > 52:54:00:a5:bd:dc, ethertype 802.1Q (0x8100), length 62: vlan 22, p 3, ethertype IPv4, 192.168.122.2.9 > 192.168.122.1.9: UDP, length 16

3. CFI enabled:
# echo "vlan_cfi 1" > /proc/net/pktgen/eth1

11:03:37.678324 52:54:00:a5:bd:dc > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 46: vlan 22, p 0, ethertype ARP, Request who-has 192.168.122.2 tell 192.168.122.1, length 283. 

4. CFI disabled:
# echo "vlan_cfi 0" > /proc/net/pktgen/eth1

11:03:53.583772 52:54:00:aa:bb:c1 > 52:54:00:a5:bd:dc, ethertype 802.1Q (0x8100), length 62: vlan 22, p 3, ethertype IPv4, 192.168.122.2.9 > 192.168.122.1.9: UDP, length 16

5. Setting SVLAN id and it's priority:
# echo "svlan_id 4" > /proc/net/pktgen/eth1
echo "svlan_p 2" > /proc/net/pktgen/eth1

11:17:35.439637 52:54:00:aa:bb:c1 > 52:54:00:a5:bd:dc, ethertype 802.1Q (0x8100), length 66: vlan 4, p 2, ethertype 802.1Q, vlan 22, p 3, ethertype IPv4, 192.168.122.2.9 > 192.168.122.1.9: UDP, length 16

6. Disabling VLAN/SVLAN taggging:
# echo "svlan_id 4096" > /proc/net/pktgen/eth1

11:14:33.421531 52:54:00:aa:bb:c1 > 52:54:00:a5:bd:dc, ethertype IPv4 (0x0800), length 60: 192.168.122.2.9 > 192.168.122.1.9: UDP, length 18

Comment 10 errata-xmlrpc 2013-01-08 04:20:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0006.html


Note You need to log in before you can comment on or make changes to this bug.