fedora 14 kernel performance with ip forwarding workload
by Jesse Brandeburg
The other day I was running the stock fedora kernel on my ip
forwarding setup, to see what the performance was, and the performance
wasn't very good.
system is S5520HC dual socket 2.93GHz Xeon 5570 (Nehalem) with 3 quad
port 82580 adapters (12 ports). Traffic is bidirectional 64 byte
packets being forwarded and received on each port, basically port to
port routing. I am only using 12 flows currently.
The driver is igb, and I am using an affinity script that lines up
each pair of ports that are forwarding traffic into optimal
configurations for cache locality. I am also disabling
remote_node_defrag_ratio to stop cross node traffic.
With the fedora default kernel from F14 it appears that
CONFIG_NETFILTER=y means that I cannot unload all of netfilter even if
I stop iptables service.
perf showed netfilter being prominent, and removing it gives me much
higher throughput. Is there a reason CONFIG_NETFILTER=y ? Isn't it a
good thing to be able to disable netfilter if you want to?
Jesse
8 years, 9 months
Re: [kernel] Disable debugging options.
by Thorsten Leemhuis
On 18.06.2012 15:09, Josh Boyer wrote:
> commit 3b37beedf48825354c42e25f7001677320958d38
> Author: Josh Boyer <jwboyer(a)redhat.com>
> Date: Mon Jun 18 09:09:58 2012 -0400
>
> Disable debugging options.
>
> config-generic | 8 ++--
> config-nodebug | 112 ++++++++++++++++++++++++++--------------------------
> config-x86-generic | 2 +-
> kernel.spec | 9 +++-
> 4 files changed, 67 insertions(+), 64 deletions(-)
> ---
> diff --git a/config-generic b/config-generic
> index 6b1c651..08c28ba 100644
> --- a/config-generic
> +++ b/config-generic
> @@ -1446,13 +1446,13 @@ CONFIG_B43_SDIO=y
> CONFIG_B43_BCMA=y
> # CONFIG_B43_BCMA_EXTRA is not set
> CONFIG_B43_BCMA_PIO=y
> -CONFIG_B43_DEBUG=y
> +# CONFIG_B43_DEBUG is not set
> [...]
Just out of curiosity: Why is enabling and disabling the debug options
done via "make {no,}debug" in the git checkout and not by an conditional
within the spec file? That afaics makes it harder to switch the debug
options off if you only have the SRPM at hand.
Or am I missing something obvious here?
CU
knurd
11 years, 4 months
Broadcom CrystalHD in-between support
by Nicolas Chauvet
Hi,
The current broadcom crystalhd support in the staging area kernel is in-between.
I mean that a lot of work is missing from what is available in the Jarod's tree:
git.linuxtv.org/jarod/crystalhd.git
Notably the support for the last chipset BCM70015 is missing, which is
confusing because the crystalhd module is present.
What is missing for this work to get merged in linux staging area ?
At least that would help not to split the content of the two repositories.
On a side note, I have such hardware. So I've successfully validated
usability of the code. (with two trivial patches found over the web).
Thx for the advices.
Nicolas (kwizart)
11 years, 6 months
enable kernel options for criu
by Adrian Reber
Now Checkpoint/Restart in Userspace[1] has released the first version of
their user-space tools I want to ask if it is possible to enable a few
kernel configuration options to use criu? I have prepared a package for
crtools but not yet submitted. As long as the kernel support is not
enabled is does not make much sense.
Following additional options (according to http://criu.org/CR_tools)
are necessary:
CONFIG_CHECKPOINT_RESTORE
which depends on
CONFIG_EXPERT
Any plans on enabling these options? Any chance these options can be
enabled?
Adrian
[1] http://criu.org/
11 years, 7 months
Fedora Kernel Meeting Minutes Aug 17, 2012
by Josh Boyer
======================================
#fedora-meeting: Fedora Kernel Meeting
======================================
Meeting started by jwb at 18:01:18 UTC. The full logs are available at
http://meetbot.fedoraproject.org/fedora-meeting/2012-08-17/fedora-kernel....
.
Meeting summary
---------------
* role call (jwb, 18:01:45)
* F16 (jwb, 18:02:53)
* 3.4.9 in updates-testing. Test and karma please (jwb, 18:06:06)
* F17 (jwb, 18:07:00)
* drm and direct-io issues two biggest problems. currently on 3.5.x
(jwb, 18:10:52)
* F18/rawhide (jwb, 18:11:31)
* F18/Rawhide on 3.6-rcX. Alpha will ship with debugging enabled
(jwb, 18:14:38)
* Open Floor (jwb, 18:17:31)
* IDEA: document some bug report cases from filing to resolution as
examples (jwb, 18:31:49)
Meeting ended at 18:34:55 UTC.
Action Items
------------
Action Items, by person
-----------------------
* **UNASSIGNED**
* (none)
People Present (lines said)
---------------------------
* jwb (59)
* davej (16)
* rbergeron (14)
* jforbes (12)
* pjones (5)
* nirik (4)
* zodbot (3)
* jsmith (3)
* brunowolff (1)
* tibbs|w (1)
Generated by `MeetBot`_ 0.1.4
.. _`MeetBot`: http://wiki.debian.org/MeetBot
11 years, 7 months
Adding the cp210x module to the NAO kernel
by Ankur Sinha
Hi folks,
I'm using the NAO[1] for my research. It uses a linux 2.6.29.6-rt24
kernel[2] which they seem to have customized to their needs. I need to
use a NavChip[3] IMU(inertial measurement unit) with the NAO. The
NavChip works out of the box with my Fedora 17
kernel(3.5.1-1.fc17.x86_64). This is what dmesg says when I plug it in:
> [71406.521154] usb 2-1.5: new full-speed USB device number 6 using ehci_hcd
> [71406.607360] usb 2-1.5: New USB device found, idVendor=10c4, idProduct=ea60
> [71406.607367] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [71406.607372] usb 2-1.5: Product: CP2102 USB to UART Bridge Controller
> [71406.607376] usb 2-1.5: Manufacturer: Silicon Labs
> [71406.607379] usb 2-1.5: SerialNumber: 0001
> [71406.772438] usbcore: registered new interface driver cp210x
> [71406.772468] USB Serial support registered for cp210x
> [71406.772513] cp210x 2-1.5:1.0: cp210x converter detected
> [71406.845220] usb 2-1.5: reset full-speed USB device number 6 using ehci_hcd
> [71406.931690] usb 2-1.5: cp210x converter now attached to ttyUSB0
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$
However, when I plug it into the NAO, it isn't detected. I looked up,
and the kernel they use doesn't seem to have the cp210x module that is
required for the NavChip (I think?).
The NavChip's processor is an AMD Geode[1] which is x86 compatible
according to wiki.
Can you please tell me how I can add the required module to the NAO's
kernel?
I already tried something, but this is my first brush with kernel
compilation, so it was probably wrong:
I built the cp210x module using the NAO kernel tree:
> [ankur@ankur aldebaran-linux-aldebaran-66f8749]$ pwd
> /home/ankur/Documents/work/code/NAO/OS/aldebaran-linux-aldebaran-66f8749
> [ankur@ankur aldebaran-linux-aldebaran-66f8749]$ file drivers/usb/serial/cp210x.ko
> drivers/usb/serial/cp210x.ko: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), BuildID[sha1]=0x61274b6a395ca0bbb45729b87283f361c04b396f, not stripped
> [ankur@ankur aldebaran-linux-aldebaran-66f8749]$
>
I placed this into the drivers/usb/serial directory in the NAO system,
but it didn't work (no surprise there!). It gave me an error:
"Invalid module format" when I tried modprobe or insmod.
The /var/log/messages had this:
"no version for struct_module found: kernel tainted".
Any hints please? It's probably something simple, just not simple enough
for a kernel newbie :)
This is the set of modules they ship their kernel with:
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$ pwd
> /run/media/ankur/OpenNao-system/lib/modules/2.6.29.6-rt24-aldebaran-rt
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$ ll
> total 409
> lrwxrwxrwx. 1 root root 93 Jun 4 01:23 build -> /opennao-geode/tmp/portage/ald-kernel/opennao-kernel-2.6.29-r41/work/linux-2.6.29-opennao-r41
> drwxr-xr-x. 5 root root 1024 Jun 4 01:23 kernel
> -rw-r--r--. 1 root root 59429 Aug 14 11:01 modules.alias
> -rw-r--r--. 1 root root 49998 Aug 14 11:01 modules.alias.bin
> -rw-r--r--. 1 root root 69 Aug 14 11:01 modules.ccwmap
> -rw-r--r--. 1 root root 11117 Aug 14 11:01 modules.dep
> -rw-r--r--. 1 root root 13279 Aug 14 11:01 modules.dep.bin
> -rw-r--r--. 1 root root 73 Aug 14 11:01 modules.ieee1394map
> -rw-r--r--. 1 root root 141 Aug 14 11:01 modules.inputmap
> -rw-r--r--. 1 root root 81 Aug 14 11:01 modules.isapnpmap
> -rw-r--r--. 1 root root 74 Aug 14 11:01 modules.ofmap
> -rw-r--r--. 1 root root 937 Jun 3 17:25 modules.order
> -rw-r--r--. 1 root root 2829 Aug 14 11:01 modules.pcimap
> -rw-r--r--. 1 root root 85 Aug 14 11:01 modules.seriomap
> -rw-r--r--. 1 root root 25281 Aug 14 11:01 modules.symbols
> -rw-r--r--. 1 root root 36981 Aug 14 11:01 modules.symbols.bin
> -rw-r--r--. 1 root root 199651 Aug 14 11:01 modules.usbmap
> lrwxrwxrwx. 1 root root 93 Jun 4 01:23 source -> /opennao-geode/tmp/portage/ald-kernel/opennao-kernel-2.6.29-r41/work/linux-2.6.29-opennao-r41
> drwxr-xr-x. 5 root root 1024 Jun 4 01:23 updates
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$ find . -name "*.ko" -not -name "cp210x.ko" -print
> ./updates/compat/compat.ko
> ./updates/compat/compat_firmware_class.ko
> ./updates/net/wireless/cfg80211.ko
> ./updates/net/mac80211/mac80211.ko
> ./updates/net/rfkill/rfkill_backport.ko
> ./updates/drivers/misc/eeprom/eeprom_93cx6.ko
> ./updates/drivers/net/wireless/rt2x00/rt2x00pci.ko
> ./updates/drivers/net/wireless/rt2x00/rt2800lib.ko
> ./updates/drivers/net/wireless/rt2x00/rt2400pci.ko
> ./updates/drivers/net/wireless/rt2x00/rt61pci.ko
> ./updates/drivers/net/wireless/rt2x00/rt2x00usb.ko
> ./updates/drivers/net/wireless/rt2x00/rt2800pci.ko
> ./updates/drivers/net/wireless/rt2x00/rt2x00lib.ko
> ./updates/drivers/net/wireless/rt2x00/rt2500usb.ko
> ./updates/drivers/net/wireless/rt2x00/rt2800usb.ko
> ./updates/drivers/net/wireless/rt2x00/rt73usb.ko
> ./updates/drivers/net/wireless/rt2x00/rt2500pci.ko
> ./updates/drivers/net/wireless/zd1211rw/zd1211rw.ko
> ./kernel/net/wireless/cfg80211.ko
> ./kernel/net/mac80211/mac80211.ko
> ./kernel/net/bluetooth/sco.ko
> ./kernel/net/bluetooth/hidp/hidp.ko
> ./kernel/net/bluetooth/l2cap.ko
> ./kernel/net/bluetooth/bnep/bnep.ko
> ./kernel/net/bluetooth/rfcomm/rfcomm.ko
> ./kernel/lib/cimarron/cimarron.ko
> ./kernel/lib/crc-itu-t.ko
> ./kernel/drivers/staging/rt2870/rt3070sta.ko
> ./kernel/drivers/misc/eeprom/eeprom_93cx6.ko
> ./kernel/drivers/usb/class/cdc-acm.ko
> ./kernel/drivers/usb/serial/usbserial.ko
> ./kernel/drivers/usb/serial/ftdi_sio.ko
> ./kernel/drivers/hid/hid.ko
> ./kernel/drivers/net/wireless/zd1211rw/zd1211rw.ko
> ./kernel/drivers/net/wireless/rtl818x/rtl8187.ko
> ./kernel/drivers/hwmon/lm90.ko
> ./kernel/drivers/scsi/scsi_wait_scan.ko
> ./kernel/drivers/media/video/lxv4l2/lxv4l2.ko
> ./kernel/drivers/i2c/busses/scx200_acb.ko
> ./kernel/drivers/i2c/busses/i2c-serial.ko
> ./kernel/drivers/bluetooth/btusb.ko
> ./kernel/drivers/bluetooth/bfusb.ko
> ./kernel/drivers/bluetooth/bcm203x.ko
> ./kernel/drivers/bluetooth/hci_vhci.ko
> [ankur@ankur 2.6.29.6-rt24-aldebaran-rt]$
Please let me know if you need any more info, and I'll provide it.
The kernel goes on a USB flash drive that needs to be inserted into the
NAO to make it boot. They provide a utility that formats the flash drive
as such:
> [ankur@ankur ~]$ cd /run/media/ankur/
> [ankur@ankur ankur]$ ll
> total 5
> drwxr-xr-x. 7 root root 4096 Aug 6 22:28 OpenNao-data
> drwxr-xr-x. 17 root root 1024 Aug 14 10:50 OpenNao-system
> [ankur@ankur ankur]$ mount | egrep OpenNao
> /dev/sdb1 on /run/media/ankur/OpenNao-system type ext3 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
> /dev/sdb2 on /run/media/ankur/OpenNao-data type ext3 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uhelper=udisks2)
> [ankur@ankur ankur]$
>
I realize that this may not be the correct list for this query. Please
feel free to point me to the correct list.
[1] http://en.wikipedia.org/wiki/Nao_(robot)
[2] https://github.com/aldebaran/linux-aldebaran/
[3] http://www.intersense.com/pages/16/16/
[4] http://en.wikipedia.org/wiki/Geode_(processor)
--
Thanks,
Warm regards,
Ankur: "FranciscoD"
Please only print if necessary.
Looking to contribute to Fedora? Look here: https://fedoraproject.org/wiki/Fedora_Join_SIG
http://fedoraproject.org/wiki/User:Ankursinha
http://dodoincfedora.wordpress.com/
11 years, 7 months
kernel-3.5.0-4.fc17.x86_64
by Frank Murphy
kernel-3.5.0-4.fc17.x86_64 doesn't take luks key.
types in, press enter prompt returns after following:
Main line I can remember
"check that kernel supports aes-xts-plain64 ciper"
Cannot fint this line in any logs, unsure to file a bz.
--
Regards,
Frank
"Jack of all, fubars"
11 years, 7 months
[PATCH F18] team: update to latest net-next
by Jiri Pirko
Update team driver to latest net-next.
Split patches available here:
http://people.redhat.com/jpirko/f18_team_update_2/
Jiri Pirko (4):
netlink: add signed types
team: add signed 32-bit team option type
team: add per port priority option
team: add support for queue override by setting queue_id for port
drivers/net/team/team.c | 200 ++++++++++++++++++++++++++++++++++++++++++++++-
include/linux/if_team.h | 7 ++
include/net/netlink.h | 98 +++++++++++++++++++++++
3 files changed, 303 insertions(+), 2 deletions(-)
Signed-off-by: Jiri Pirko <jpirko(a)redhat.com>
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 87707ab..ba10c46 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -658,6 +658,122 @@ static rx_handler_result_t team_handle_frame(struct sk_buff **pskb)
}
+/*************************************
+ * Multiqueue Tx port select override
+ *************************************/
+
+static int team_queue_override_init(struct team *team)
+{
+ struct list_head *listarr;
+ unsigned int queue_cnt = team->dev->num_tx_queues - 1;
+ unsigned int i;
+
+ if (!queue_cnt)
+ return 0;
+ listarr = kmalloc(sizeof(struct list_head) * queue_cnt, GFP_KERNEL);
+ if (!listarr)
+ return -ENOMEM;
+ team->qom_lists = listarr;
+ for (i = 0; i < queue_cnt; i++)
+ INIT_LIST_HEAD(listarr++);
+ return 0;
+}
+
+static void team_queue_override_fini(struct team *team)
+{
+ kfree(team->qom_lists);
+}
+
+static struct list_head *__team_get_qom_list(struct team *team, u16 queue_id)
+{
+ return &team->qom_lists[queue_id - 1];
+}
+
+/*
+ * note: already called with rcu_read_lock
+ */
+static bool team_queue_override_transmit(struct team *team, struct sk_buff *skb)
+{
+ struct list_head *qom_list;
+ struct team_port *port;
+
+ if (!team->queue_override_enabled || !skb->queue_mapping)
+ return false;
+ qom_list = __team_get_qom_list(team, skb->queue_mapping);
+ list_for_each_entry_rcu(port, qom_list, qom_list) {
+ if (!team_dev_queue_xmit(team, port, skb))
+ return true;
+ }
+ return false;
+}
+
+static void __team_queue_override_port_del(struct team *team,
+ struct team_port *port)
+{
+ list_del_rcu(&port->qom_list);
+ synchronize_rcu();
+ INIT_LIST_HEAD(&port->qom_list);
+}
+
+static bool team_queue_override_port_has_gt_prio_than(struct team_port *port,
+ struct team_port *cur)
+{
+ if (port->priority < cur->priority)
+ return true;
+ if (port->priority > cur->priority)
+ return false;
+ if (port->index < cur->index)
+ return true;
+ return false;
+}
+
+static void __team_queue_override_port_add(struct team *team,
+ struct team_port *port)
+{
+ struct team_port *cur;
+ struct list_head *qom_list;
+ struct list_head *node;
+
+ if (!port->queue_id || !team_port_enabled(port))
+ return;
+
+ qom_list = __team_get_qom_list(team, port->queue_id);
+ node = qom_list;
+ list_for_each_entry(cur, qom_list, qom_list) {
+ if (team_queue_override_port_has_gt_prio_than(port, cur))
+ break;
+ node = &cur->qom_list;
+ }
+ list_add_tail_rcu(&port->qom_list, node);
+}
+
+static void __team_queue_override_enabled_check(struct team *team)
+{
+ struct team_port *port;
+ bool enabled = false;
+
+ list_for_each_entry(port, &team->port_list, list) {
+ if (!list_empty(&port->qom_list)) {
+ enabled = true;
+ break;
+ }
+ }
+ if (enabled == team->queue_override_enabled)
+ return;
+ netdev_dbg(team->dev, "%s queue override\n",
+ enabled ? "Enabling" : "Disabling");
+ team->queue_override_enabled = enabled;
+}
+
+static void team_queue_override_port_refresh(struct team *team,
+ struct team_port *port)
+{
+ __team_queue_override_port_del(team, port);
+ __team_queue_override_port_add(team, port);
+ __team_queue_override_enabled_check(team);
+}
+
+
/****************
* Port handling
****************/
@@ -688,6 +804,7 @@ static void team_port_enable(struct team *team,
hlist_add_head_rcu(&port->hlist,
team_port_index_hash(team, port->index));
team_adjust_ops(team);
+ team_queue_override_port_refresh(team, port);
if (team->ops.port_enabled)
team->ops.port_enabled(team, port);
}
@@ -716,6 +833,7 @@ static void team_port_disable(struct team *team,
hlist_del_rcu(&port->hlist);
__reconstruct_port_hlist(team, port->index);
port->index = -1;
+ team_queue_override_port_refresh(team, port);
__team_adjust_ops(team, team->en_port_count - 1);
/*
* Wait until readers see adjusted ops. This ensures that
@@ -881,6 +999,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
port->dev = port_dev;
port->team = team;
+ INIT_LIST_HEAD(&port->qom_list);
port->orig.mtu = port_dev->mtu;
err = dev_set_mtu(port_dev, dev->mtu);
@@ -1092,6 +1211,49 @@ static int team_user_linkup_en_option_set(struct team *team,
return 0;
}
+static int team_priority_option_get(struct team *team,
+ struct team_gsetter_ctx *ctx)
+{
+ struct team_port *port = ctx->info->port;
+
+ ctx->data.s32_val = port->priority;
+ return 0;
+}
+
+static int team_priority_option_set(struct team *team,
+ struct team_gsetter_ctx *ctx)
+{
+ struct team_port *port = ctx->info->port;
+
+ port->priority = ctx->data.s32_val;
+ team_queue_override_port_refresh(team, port);
+ return 0;
+}
+
+static int team_queue_id_option_get(struct team *team,
+ struct team_gsetter_ctx *ctx)
+{
+ struct team_port *port = ctx->info->port;
+
+ ctx->data.u32_val = port->queue_id;
+ return 0;
+}
+
+static int team_queue_id_option_set(struct team *team,
+ struct team_gsetter_ctx *ctx)
+{
+ struct team_port *port = ctx->info->port;
+
+ if (port->queue_id == ctx->data.u32_val)
+ return 0;
+ if (ctx->data.u32_val >= team->dev->real_num_tx_queues)
+ return -EINVAL;
+ port->queue_id = ctx->data.u32_val;
+ team_queue_override_port_refresh(team, port);
+ return 0;
+}
+
+
static const struct team_option team_options[] = {
{
.name = "mode",
@@ -1120,6 +1282,20 @@ static const struct team_option team_options[] = {
.getter = team_user_linkup_en_option_get,
.setter = team_user_linkup_en_option_set,
},
+ {
+ .name = "priority",
+ .type = TEAM_OPTION_TYPE_S32,
+ .per_port = true,
+ .getter = team_priority_option_get,
+ .setter = team_priority_option_set,
+ },
+ {
+ .name = "queue_id",
+ .type = TEAM_OPTION_TYPE_U32,
+ .per_port = true,
+ .getter = team_queue_id_option_get,
+ .setter = team_queue_id_option_set,
+ },
};
static struct lock_class_key team_netdev_xmit_lock_key;
@@ -1155,6 +1331,9 @@ static int team_init(struct net_device *dev)
for (i = 0; i < TEAM_PORT_HASHENTRIES; i++)
INIT_HLIST_HEAD(&team->en_port_hlist[i]);
INIT_LIST_HEAD(&team->port_list);
+ err = team_queue_override_init(team);
+ if (err)
+ goto err_team_queue_override_init;
team_adjust_ops(team);
@@ -1170,6 +1349,8 @@ static int team_init(struct net_device *dev)
return 0;
err_options_register:
+ team_queue_override_fini(team);
+err_team_queue_override_init:
free_percpu(team->pcpu_stats);
return err;
@@ -1187,6 +1368,7 @@ static void team_uninit(struct net_device *dev)
__team_change_mode(team, NULL); /* cleanup */
__team_options_unregister(team, team_options, ARRAY_SIZE(team_options));
+ team_queue_override_fini(team);
mutex_unlock(&team->lock);
}
@@ -1216,10 +1398,12 @@ static int team_close(struct net_device *dev)
static netdev_tx_t team_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct team *team = netdev_priv(dev);
- bool tx_success = false;
+ bool tx_success;
unsigned int len = skb->len;
- tx_success = team->ops.transmit(team, skb);
+ tx_success = team_queue_override_transmit(team, skb);
+ if (!tx_success)
+ tx_success = team->ops.transmit(team, skb);
if (tx_success) {
struct team_pcpu_stats *pcpu_stats;
@@ -1787,6 +1971,12 @@ static int team_nl_fill_one_option_get(struct sk_buff *skb, struct team *team,
nla_put_flag(skb, TEAM_ATTR_OPTION_DATA))
goto nest_cancel;
break;
+ case TEAM_OPTION_TYPE_S32:
+ if (nla_put_u8(skb, TEAM_ATTR_OPTION_TYPE, NLA_S32))
+ goto nest_cancel;
+ if (nla_put_s32(skb, TEAM_ATTR_OPTION_DATA, ctx.data.s32_val))
+ goto nest_cancel;
+ break;
default:
BUG();
}
@@ -1975,6 +2165,9 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
case NLA_FLAG:
opt_type = TEAM_OPTION_TYPE_BOOL;
break;
+ case NLA_S32:
+ opt_type = TEAM_OPTION_TYPE_S32;
+ break;
default:
goto team_put;
}
@@ -2031,6 +2224,9 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
case TEAM_OPTION_TYPE_BOOL:
ctx.data.bool_val = attr_data ? true : false;
break;
+ case TEAM_OPTION_TYPE_S32:
+ ctx.data.s32_val = nla_get_s32(attr_data);
+ break;
default:
BUG();
}
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index 6960fc1..33fcc20 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -67,6 +67,9 @@ struct team_port {
struct netpoll *np;
#endif
+ s32 priority; /* lower number ~ higher priority */
+ u16 queue_id;
+ struct list_head qom_list; /* node in queue override mapping list */
long mode_priv[0];
};
@@ -130,6 +133,7 @@ enum team_option_type {
TEAM_OPTION_TYPE_STRING,
TEAM_OPTION_TYPE_BINARY,
TEAM_OPTION_TYPE_BOOL,
+ TEAM_OPTION_TYPE_S32,
};
struct team_option_inst_info {
@@ -146,6 +150,7 @@ struct team_gsetter_ctx {
u32 len;
} bin_val;
bool bool_val;
+ s32 s32_val;
} data;
struct team_option_inst_info *info;
};
@@ -197,6 +202,8 @@ struct team {
const struct team_mode *mode;
struct team_mode_ops ops;
+ bool queue_override_enabled;
+ struct list_head *qom_lists; /* array of queue override mapping lists */
long mode_priv[TEAM_MODE_PRIV_LONGS];
};
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 785f37a..09175d5 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -98,6 +98,10 @@
* nla_put_u16(skb, type, value) add u16 attribute to skb
* nla_put_u32(skb, type, value) add u32 attribute to skb
* nla_put_u64(skb, type, value) add u64 attribute to skb
+ * nla_put_s8(skb, type, value) add s8 attribute to skb
+ * nla_put_s16(skb, type, value) add s16 attribute to skb
+ * nla_put_s32(skb, type, value) add s32 attribute to skb
+ * nla_put_s64(skb, type, value) add s64 attribute to skb
* nla_put_string(skb, type, str) add string attribute to skb
* nla_put_flag(skb, type) add flag attribute to skb
* nla_put_msecs(skb, type, jiffies) add msecs attribute to skb
@@ -121,6 +125,10 @@
* nla_get_u16(nla) get payload for a u16 attribute
* nla_get_u32(nla) get payload for a u32 attribute
* nla_get_u64(nla) get payload for a u64 attribute
+ * nla_get_s8(nla) get payload for a s8 attribute
+ * nla_get_s16(nla) get payload for a s16 attribute
+ * nla_get_s32(nla) get payload for a s32 attribute
+ * nla_get_s64(nla) get payload for a s64 attribute
* nla_get_flag(nla) return 1 if flag is true
* nla_get_msecs(nla) get payload for a msecs attribute
*
@@ -160,6 +168,10 @@ enum {
NLA_NESTED_COMPAT,
NLA_NUL_STRING,
NLA_BINARY,
+ NLA_S8,
+ NLA_S16,
+ NLA_S32,
+ NLA_S64,
__NLA_TYPE_MAX,
};
@@ -183,6 +195,8 @@ enum {
* NLA_NESTED_COMPAT Minimum length of structure payload
* NLA_U8, NLA_U16,
* NLA_U32, NLA_U64,
+ * NLA_S8, NLA_S16,
+ * NLA_S32, NLA_S64,
* NLA_MSECS Leaving the length field zero will verify the
* given type fits, using it verifies minimum length
* just like "All other"
@@ -879,6 +893,50 @@ static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value)
}
/**
+ * nla_put_s8 - Add a s8 netlink attribute to a socket buffer
+ * @skb: socket buffer to add attribute to
+ * @attrtype: attribute type
+ * @value: numeric value
+ */
+static inline int nla_put_s8(struct sk_buff *skb, int attrtype, s8 value)
+{
+ return nla_put(skb, attrtype, sizeof(s8), &value);
+}
+
+/**
+ * nla_put_s16 - Add a s16 netlink attribute to a socket buffer
+ * @skb: socket buffer to add attribute to
+ * @attrtype: attribute type
+ * @value: numeric value
+ */
+static inline int nla_put_s16(struct sk_buff *skb, int attrtype, s16 value)
+{
+ return nla_put(skb, attrtype, sizeof(s16), &value);
+}
+
+/**
+ * nla_put_s32 - Add a s32 netlink attribute to a socket buffer
+ * @skb: socket buffer to add attribute to
+ * @attrtype: attribute type
+ * @value: numeric value
+ */
+static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
+{
+ return nla_put(skb, attrtype, sizeof(s32), &value);
+}
+
+/**
+ * nla_put_s64 - Add a s64 netlink attribute to a socket buffer
+ * @skb: socket buffer to add attribute to
+ * @attrtype: attribute type
+ * @value: numeric value
+ */
+static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value)
+{
+ return nla_put(skb, attrtype, sizeof(s64), &value);
+}
+
+/**
* nla_put_string - Add a string netlink attribute to a socket buffer
* @skb: socket buffer to add attribute to
* @attrtype: attribute type
@@ -994,6 +1052,46 @@ static inline __be64 nla_get_be64(const struct nlattr *nla)
}
/**
+ * nla_get_s32 - return payload of s32 attribute
+ * @nla: s32 netlink attribute
+ */
+static inline s32 nla_get_s32(const struct nlattr *nla)
+{
+ return *(s32 *) nla_data(nla);
+}
+
+/**
+ * nla_get_s16 - return payload of s16 attribute
+ * @nla: s16 netlink attribute
+ */
+static inline s16 nla_get_s16(const struct nlattr *nla)
+{
+ return *(s16 *) nla_data(nla);
+}
+
+/**
+ * nla_get_s8 - return payload of s8 attribute
+ * @nla: s8 netlink attribute
+ */
+static inline s8 nla_get_s8(const struct nlattr *nla)
+{
+ return *(s8 *) nla_data(nla);
+}
+
+/**
+ * nla_get_s64 - return payload of s64 attribute
+ * @nla: s64 netlink attribute
+ */
+static inline s64 nla_get_s64(const struct nlattr *nla)
+{
+ s64 tmp;
+
+ nla_memcpy(&tmp, nla, sizeof(tmp));
+
+ return tmp;
+}
+
+/**
* nla_get_flag - return payload of flag attribute
* @nla: flag netlink attribute
*/
11 years, 7 months