Re: [PATCH net-next 3/6] net: remove dsa.h include from linux/netdevice.h
Thu, Oct 08, 2015 at 11:04:48AM CEST, l...@intel.com wrote: >Hi Vivien, > >[auto build test ERROR on net-next/master -- if it's inappropriate base, >please ignore] > >config: arm64-allyesconfig (attached as .config) >reproduce: >wget > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross > -O ~/bin/make.cross >chmod +x ~/bin/make.cross ># save the attached .config to linux build tree >make.cross ARCH=arm64 > >All errors (new ones prefixed by >>): > > In file included from drivers/net/ethernet/hisilicon/hns/hnae.c:15:0: >>> drivers/net/ethernet/hisilicon/hns/hnae.h:465:2: error: unknown type name >>> 'phy_interface_t' > phy_interface_t phy_if; > ^ > >vim +/phy_interface_t +465 drivers/net/ethernet/hisilicon/hns/hnae.h Looks like hnae.c needs to do "#include " directly. Cc'ing maintainer. > >6fe6611f huangdaode 2015-09-17 449 struct hnae_ae_dev { >6fe6611f huangdaode 2015-09-17 450struct device cls_dev; /* the class dev >*/ >6fe6611f huangdaode 2015-09-17 451struct device *dev; /* the presented >dev */ >6fe6611f huangdaode 2015-09-17 452struct hnae_ae_ops *ops; >6fe6611f huangdaode 2015-09-17 453struct list_head node; >6fe6611f huangdaode 2015-09-17 454struct module *owner; /* the module who >provides this dev */ >6fe6611f huangdaode 2015-09-17 455int id; >6fe6611f huangdaode 2015-09-17 456char name[AE_NAME_SIZE]; >6fe6611f huangdaode 2015-09-17 457struct list_head handle_list; >6fe6611f huangdaode 2015-09-17 458spinlock_t lock; /* lock to protect the >handle_list */ >6fe6611f huangdaode 2015-09-17 459 }; >6fe6611f huangdaode 2015-09-17 460 >6fe6611f huangdaode 2015-09-17 461 struct hnae_handle { >6fe6611f huangdaode 2015-09-17 462struct device *owner_dev; /* the device >which make use of this handle */ >6fe6611f huangdaode 2015-09-17 463struct hnae_ae_dev *dev; /* the device >who provides this handle */ >6fe6611f huangdaode 2015-09-17 464struct device_node *phy_node; >6fe6611f huangdaode 2015-09-17 @465phy_interface_t phy_if; >6fe6611f huangdaode 2015-09-17 466u32 if_support; >6fe6611f huangdaode 2015-09-17 467int q_num; >6fe6611f huangdaode 2015-09-17 468int vf_id; >6fe6611f huangdaode 2015-09-17 469u32 eport_id; >6fe6611f huangdaode 2015-09-17 470enum hnae_port_type port_type; >6fe6611f huangdaode 2015-09-17 471struct list_head node;/* list to >hnae_ae_dev->handle_list */ >6fe6611f huangdaode 2015-09-17 472struct hnae_buf_ops *bops; /* operation >for the buffer */ >6fe6611f huangdaode 2015-09-17 473struct hnae_queue **qs; /* array base >of all queues */ > >:: The code at line 465 was first introduced by commit >:: 6fe6611ff275522a4e4c0359e2f46cdd07780d2f net: add Hisilicon Network >Subsystem hnae framework support > >:: TO: huangdaode>:: CC: David S. Miller > >--- >0-DAY kernel test infrastructureOpen Source Technology Center >https://lists.01.org/pipermail/kbuild-all Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH iproute2] bridge: add batch command support
2015-10-08 7:53 GMT+02:00 Roopa Prabhu: > From: Wilson Kok > > This patch adds support to batch bridge commands. > Follows ip batch code. Hello Roopa, Thanks for providing the useful batch feature to the bridge command. The patch looks good, except a detail: > fprintf(stderr, > "Usage: bridge [ OPTIONS ] OBJECT { COMMAND | help }\n" > +" bridge [ -force ] -batch filename\n" in the usage display, a tab is used to indent the second form of the bridge command. Spaces should be used instead, to align with the first form: "Usage: bridge [ OPTIONS ] OBJECT { COMMAND | help }\n" " bridge [ -force ] -batch filename\n" ^^^ Except for this detail, Acked-by: Christophe Gouault -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch net-next RFC 2/3] switchdev: allow caller to explicitly use deferred attr_set version
Thu, Oct 08, 2015 at 08:03:35AM CEST, sfel...@gmail.com wrote: >On Wed, Oct 7, 2015 at 10:39 PM, Jiri Pirkowrote: >> Thu, Oct 08, 2015 at 06:27:07AM CEST, sfel...@gmail.com wrote: >>>On Wed, Oct 7, 2015 at 11:30 AM, Jiri Pirko wrote: From: Jiri Pirko Caller should know if he can call attr_set directly (when holding RTNL) or if he has to use deferred version of this function. This also allows drivers to sleep inside attr_set and report operation status back to switchdev core. Switchdev core then warns if status is not ok, instead of silent errors happening in drivers. Signed-off-by: Jiri Pirko --- include/net/switchdev.h | 2 + net/bridge/br_stp.c | 4 +- net/switchdev/switchdev.c | 113 +- 3 files changed, 65 insertions(+), 54 deletions(-) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 89266a3..320be44 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -168,6 +168,8 @@ int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr *attr); int switchdev_port_attr_set(struct net_device *dev, struct switchdev_attr *attr); +int switchdev_port_attr_set_deferred(struct net_device *dev, +struct switchdev_attr *attr); >>> >>>Rather than adding another op, use attr->flags and define: >>> >>>#define SWITCHDEV_F_DEFERRED BIT(x) >>> >>>So we get: >>> >>>void br_set_state(struct net_bridge_port *p, unsigned int state) >>>{ >>>struct switchdev_attr attr = { >>>.id = SWITCHDEV_ATTR_ID_PORT_STP_STATE, >>>+ .flags = SWITCHDEV_F_DEFERRED, >>>.u.stp_state = state, >>>}; >>>int err; >>> >>>p->state = state; >>>err = switchdev_port_attr_set(p->dev, ); >>>if (err && err != -EOPNOTSUPP) >>>br_warn(p->br, "error setting offload STP state on >>>port %u(%s)\n", >>>(unsigned int) p->port_no, >>>p->dev->name); >>>} >>> >>>(And add obj->flags to do the same). >> >> That's what I wanted to avoid. Also because the obj is const and for >> call from work, this flag would have to be removed. > >What did you want to avoid? Having this as a flag. I don't like it too much. But that is cosmetics. Other than that, does the patchset make sense? Do you see some possible issues? Thanks. Jiri -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] iwlwifi:Fix incorrect fallthrough in switch statement in the function iwl_mvm_check_running_scans
On Tue, 2015-09-22 at 20:24 -0400, Nicholas Krause wrote: > This fixes incorrect fallthrough in the switch statment checking > the scan type passed by the caller to iwl_mvm_check_running_scans > for the switch case IWL_MVM_SCAN_SCHED to return directly after > the call to iwl_mvm_scan_stop in order to avoid fallthrough into > the next case and incorrectly return zero indicating success to > the caller even if the function call to iwl_mvm_scan_stop fails. > > Signed-off-by: Nicholas Krause> --- Applied to our internal tree with a modified commit message. Thanks! -- Luca.
Re: [PATCH net-next 3/6] net: remove dsa.h include from linux/netdevice.h
Hi Vivien, [auto build test ERROR on net-next/master -- if it's inappropriate base, please ignore] config: arm64-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm64 All errors (new ones prefixed by >>): In file included from drivers/net/ethernet/hisilicon/hns/hnae.c:15:0: >> drivers/net/ethernet/hisilicon/hns/hnae.h:465:2: error: unknown type name >> 'phy_interface_t' phy_interface_t phy_if; ^ vim +/phy_interface_t +465 drivers/net/ethernet/hisilicon/hns/hnae.h 6fe6611f huangdaode 2015-09-17 449 struct hnae_ae_dev { 6fe6611f huangdaode 2015-09-17 450 struct device cls_dev; /* the class dev */ 6fe6611f huangdaode 2015-09-17 451 struct device *dev; /* the presented dev */ 6fe6611f huangdaode 2015-09-17 452 struct hnae_ae_ops *ops; 6fe6611f huangdaode 2015-09-17 453 struct list_head node; 6fe6611f huangdaode 2015-09-17 454 struct module *owner; /* the module who provides this dev */ 6fe6611f huangdaode 2015-09-17 455 int id; 6fe6611f huangdaode 2015-09-17 456 char name[AE_NAME_SIZE]; 6fe6611f huangdaode 2015-09-17 457 struct list_head handle_list; 6fe6611f huangdaode 2015-09-17 458 spinlock_t lock; /* lock to protect the handle_list */ 6fe6611f huangdaode 2015-09-17 459 }; 6fe6611f huangdaode 2015-09-17 460 6fe6611f huangdaode 2015-09-17 461 struct hnae_handle { 6fe6611f huangdaode 2015-09-17 462 struct device *owner_dev; /* the device which make use of this handle */ 6fe6611f huangdaode 2015-09-17 463 struct hnae_ae_dev *dev; /* the device who provides this handle */ 6fe6611f huangdaode 2015-09-17 464 struct device_node *phy_node; 6fe6611f huangdaode 2015-09-17 @465 phy_interface_t phy_if; 6fe6611f huangdaode 2015-09-17 466 u32 if_support; 6fe6611f huangdaode 2015-09-17 467 int q_num; 6fe6611f huangdaode 2015-09-17 468 int vf_id; 6fe6611f huangdaode 2015-09-17 469 u32 eport_id; 6fe6611f huangdaode 2015-09-17 470 enum hnae_port_type port_type; 6fe6611f huangdaode 2015-09-17 471 struct list_head node;/* list to hnae_ae_dev->handle_list */ 6fe6611f huangdaode 2015-09-17 472 struct hnae_buf_ops *bops; /* operation for the buffer */ 6fe6611f huangdaode 2015-09-17 473 struct hnae_queue **qs; /* array base of all queues */ :: The code at line 465 was first introduced by commit :: 6fe6611ff275522a4e4c0359e2f46cdd07780d2f net: add Hisilicon Network Subsystem hnae framework support :: TO: huangdaode:: CC: David S. Miller --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
[PATCH v3 1/2] ne: Add h8300 support.
Changes v3 none Changes v2 Use CONFIG_H8300 Signed-off-by: Yoshinori Sato--- drivers/net/ethernet/8390/Kconfig | 2 +- drivers/net/ethernet/8390/ne.c| 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/8390/Kconfig b/drivers/net/ethernet/8390/Kconfig index edf7225..44d7167 100644 --- a/drivers/net/ethernet/8390/Kconfig +++ b/drivers/net/ethernet/8390/Kconfig @@ -88,7 +88,7 @@ config MCF8390 config NE2000 tristate "NE2000/NE1000 support" depends on (ISA || (Q40 && m) || M32R || MACH_TX49XX || \ - ATARI_ETHERNEC) + ATARI_ETHERNEC || H8300) select CRC32 ---help--- If you have a network (Ethernet) card of this type, say Y here. diff --git a/drivers/net/ethernet/8390/ne.c b/drivers/net/ethernet/8390/ne.c index c063b41..90bf71b 100644 --- a/drivers/net/ethernet/8390/ne.c +++ b/drivers/net/ethernet/8390/ne.c @@ -422,7 +422,8 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr) stop_page = NE1SM_STOP_PG; } -#if defined(CONFIG_PLAT_MAPPI) || defined(CONFIG_PLAT_OAKS32R) +#if defined(CONFIG_PLAT_MAPPI) || defined(CONFIG_PLAT_OAKS32R) || \ + defined(CONFIG_H8300) neX000 = ((SA_prom[14] == 0x57 && SA_prom[15] == 0x57) || (SA_prom[14] == 0x42 && SA_prom[15] == 0x42)); #else -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch net-next RFC 3/3] switchdev: introduce deferred variants of obj_add/del helpers
Thu, Oct 08, 2015 at 08:45:58AM CEST, gerlitz...@gmail.com wrote: >On Wed, Oct 7, 2015 at 9:30 PM, Jiri Pirkowrote: >> From: Jiri Pirko >> >> Similar to the attr usecase, the caller knows if he is holding RTNL and is >> in atomic section. So let the called to decide the correct call variant. >> >> This allows drivers to sleep inside their ops and wait for hw to get the >> operation status. Then the status is propagated into switchdev core. >> This avoids silent errors in drivers. >> >> Signed-off-by: Jiri Pirko > >> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c >> index 7f7d551..2086767 100644 >> --- a/net/bridge/br_fdb.c >> +++ b/net/bridge/br_fdb.c >> @@ -139,7 +139,7 @@ static void fdb_del_external_learn(struct >> net_bridge_fdb_entry *f) >> .vid = f->vlan_id, >> }; >> >> - switchdev_port_obj_del(f->dst->dev, ); >> + switchdev_port_obj_del_deferred(f->dst->dev, ); >> } > > >> static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry >> *f) >> diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c >> index c29f4ee..49e6e6f 100644 >> --- a/net/switchdev/switchdev.c >> +++ b/net/switchdev/switchdev.c >> @@ -362,6 +362,75 @@ int switchdev_port_obj_add(struct net_device *dev, >> } >> EXPORT_SYMBOL_GPL(switchdev_port_obj_add); >> >> +struct switchdev_obj_work { >> + struct work_struct work; >> + struct net_device *dev; >> + struct switchdev_obj obj; >> + bool add; /* add of del */ >> +}; >> + >> +static void switchdev_port_obj_work(struct work_struct *work) >> +{ >> + struct switchdev_obj_work *ow = >> + container_of(work, struct switchdev_obj_work, work); >> + int err; >> + >> + rtnl_lock(); >> + if (ow->add) >> + err = switchdev_port_obj_add(ow->dev, >obj); >> + else >> + err = switchdev_port_obj_del(ow->dev, >obj); >> + if (err && err != -EOPNOTSUPP) >> + netdev_err(ow->dev, "failed (err=%d) to %s object (id=%d)\n", >> + err, ow->add ? "add" : "del", ow->obj.id); > >This introduced a regression to the 2-phase commit scheme, since the >prepare commit can fail >and that would go un-noticed toward the upper layer, agree? Well, no. This still does the transaction for all lower devices in one go. No change in that. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 2/2] ne: DeviceTree support.
Changes v3 Use dev_of_node Changes v2 none Signed-off-by: Yoshinori Sato--- Documentation/devicetree/bindings/net/ne2000.txt | 17 + drivers/net/ethernet/8390/ne.c | 20 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/net/ne2000.txt diff --git a/Documentation/devicetree/bindings/net/ne2000.txt b/Documentation/devicetree/bindings/net/ne2000.txt new file mode 100644 index 000..8b0dfbf --- /dev/null +++ b/Documentation/devicetree/bindings/net/ne2000.txt @@ -0,0 +1,17 @@ +NE2000 compatible network controller + +Required properties: +- compatible: "national,ne2000" +- reg: base address and length of NE2000. +- interrupts: interrupt specifier for the sole interrupt. +- national,dcr: DCR setting value. + +Example + + ne2000: ethernet@20 { + compatible = "national,ne2000"; + reg = <0x20 32>; + interrupts = <17 0>; + national,dcr = <0x48>; + }; + diff --git a/drivers/net/ethernet/8390/ne.c b/drivers/net/ethernet/8390/ne.c index 90bf71b..82a4ec3 100644 --- a/drivers/net/ethernet/8390/ne.c +++ b/drivers/net/ethernet/8390/ne.c @@ -52,6 +52,7 @@ static const char version2[] = #include #include #include +#include #include @@ -72,6 +73,7 @@ static int io[MAX_NE_CARDS]; static int irq[MAX_NE_CARDS]; static int bad[MAX_NE_CARDS]; static u32 ne_msg_enable; +static unsigned int of_dcr_val; #ifdef MODULE module_param_array(io, int, NULL, 0); @@ -171,6 +173,8 @@ bad_clone_list[] __initdata = { # define DCR_VAL 0x48 /* 8-bit mode */ #elif defined(CONFIG_ATARI)/* 8-bit mode on Atari, normal on Q40 */ # define DCR_VAL (MACH_IS_ATARI ? 0x48 : 0x49) +#elif defined(CONFIG_OF_NET) +# define DCR_VAL of_dcr_val #else # define DCR_VAL 0x49 #endif @@ -304,7 +308,8 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr) struct ei_device *ei_local = netdev_priv(dev); if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME)) - return -EBUSY; + if (!request_mem_region(ioaddr, NE_IO_EXTENT, DRV_NAME)) + return -EBUSY; reg0 = inb_p(ioaddr); if (reg0 == 0xFF) { @@ -809,11 +814,18 @@ static int __init ne_drv_probe(struct platform_device *pdev) if (!dev) return -ENOMEM; + if (dev_of_node(dev)) + of_property_read_u32(dev_of_node(dev), +"national,dcr", _dcr_val); + /* ne.c doesn't populate resources in platform_device, but * rbtx4927_ne_init and rbtx4938_ne_init do register devices * with resources. */ res = platform_get_resource(pdev, IORESOURCE_IO, 0); + if (!res) + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (res) { dev->base_addr = res->start; dev->irq = platform_get_irq(pdev, 0); @@ -915,12 +927,18 @@ static int ne_drv_resume(struct platform_device *pdev) #define ne_drv_resume NULL #endif +static const struct of_device_id ne2000_of_table[] __maybe_unused = { + { .compatible = "national,ne2000" }, + { } +}; + static struct platform_driver ne_driver = { .remove = ne_drv_remove, .suspend= ne_drv_suspend, .resume = ne_drv_resume, .driver = { .name = DRV_NAME, + .of_match_table = of_match_ptr(ne2000_of_table), }, }; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 0/2] net: fix some bugs in HNS drivers
This patchset fixes the two bugs in HNS driver, one is for fixing the compilation warning bug on arm 32-bit platform, another is fixing the wrong mac port judgement bug which is found during internal tests. huangdaode (2): net: Fix Hisilicon Network Subsystem compilation warning net: fix a bug on Hisilicon Network Subsystem drivers/net/ethernet/hisilicon/hns/hnae.c | 12 ++-- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs
* Alexei Starovoitovwrote: > As far as sysctl we can look at two with similar purpose: > sysctl_perf_event_paranoid and modules_disabled. > First one is indeed multi level, but not because of the fear of bugs, > but because of real security implications. It serves both purposes flexibly, and note that most people and distros will use the default value. > [...] Like raw events on hyperthreaded cpu or uncore events can extract data > from other user processes. So it controls these extra privileges. It also controls the generally increased risk caused by a larger attack surface, which some users may not want to carry and which they can thus shrink. With a static keys approach there would be no runtime overhead worth speaking of, so I see no reason why unprivileged eBPF couldn't have a sysctl too - with the default value set to permissive. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch net-next RFC 3/3] switchdev: introduce deferred variants of obj_add/del helpers
On Wed, Oct 7, 2015 at 9:30 PM, Jiri Pirkowrote: > From: Jiri Pirko > > Similar to the attr usecase, the caller knows if he is holding RTNL and is > in atomic section. So let the called to decide the correct call variant. > > This allows drivers to sleep inside their ops and wait for hw to get the > operation status. Then the status is propagated into switchdev core. > This avoids silent errors in drivers. > > Signed-off-by: Jiri Pirko > diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c > index 7f7d551..2086767 100644 > --- a/net/bridge/br_fdb.c > +++ b/net/bridge/br_fdb.c > @@ -139,7 +139,7 @@ static void fdb_del_external_learn(struct > net_bridge_fdb_entry *f) > .vid = f->vlan_id, > }; > > - switchdev_port_obj_del(f->dst->dev, ); > + switchdev_port_obj_del_deferred(f->dst->dev, ); > } > static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry *f) > diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c > index c29f4ee..49e6e6f 100644 > --- a/net/switchdev/switchdev.c > +++ b/net/switchdev/switchdev.c > @@ -362,6 +362,75 @@ int switchdev_port_obj_add(struct net_device *dev, > } > EXPORT_SYMBOL_GPL(switchdev_port_obj_add); > > +struct switchdev_obj_work { > + struct work_struct work; > + struct net_device *dev; > + struct switchdev_obj obj; > + bool add; /* add of del */ > +}; > + > +static void switchdev_port_obj_work(struct work_struct *work) > +{ > + struct switchdev_obj_work *ow = > + container_of(work, struct switchdev_obj_work, work); > + int err; > + > + rtnl_lock(); > + if (ow->add) > + err = switchdev_port_obj_add(ow->dev, >obj); > + else > + err = switchdev_port_obj_del(ow->dev, >obj); > + if (err && err != -EOPNOTSUPP) > + netdev_err(ow->dev, "failed (err=%d) to %s object (id=%d)\n", > + err, ow->add ? "add" : "del", ow->obj.id); This introduced a regression to the 2-phase commit scheme, since the prepare commit can fail and that would go un-noticed toward the upper layer, agree? Or. > + rtnl_unlock(); > + > + dev_put(ow->dev); > + kfree(ow); > +} -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] net namespace: dynamically configure new net namespace inherit net config
Hi, Miller Would you like to check this patch? Thanks a lot. Zhu Yanjun On 06/26/2015 05:37 PM, Zhu Yanjun wrote: The new net namespace can inherit from the original net config, or the current net config. As such, a config is needed to decide where the new namespace inherit from. Signed-off-by: Zhu Yanjun--- init/Kconfig | 9 + net/ipv4/devinet.c | 13 + 2 files changed, 22 insertions(+) diff --git a/init/Kconfig b/init/Kconfig index dc24dec..fab8c41 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1212,6 +1212,15 @@ config NET_NS Allow user space to create what appear to be multiple instances of the network stack. +config NET_NS_INHERIT_ORIGINAL + bool "New network namespace inherits from original net config" + depends on NET_NS + default n + help + Allow new network namespace inherit from original net config. + If no, the new network namespace inherits from the current net + config including the modified net config. + endif # NAMESPACES config SCHED_AUTOGROUP diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 419d23c..cf635e4 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -2271,6 +2271,7 @@ static __net_init int devinet_init_net(struct net *net) #endif err = -ENOMEM; +#ifndef CONFIG_NET_NS_INHERIT_ORIGINAL all = _devconf; dflt = _devconf_dflt; @@ -2282,6 +2283,15 @@ static __net_init int devinet_init_net(struct net *net) dflt = kmemdup(dflt, sizeof(ipv4_devconf_dflt), GFP_KERNEL); if (!dflt) goto err_alloc_dflt; +#else + all = kmemdup(_devconf, sizeof(ipv4_devconf), GFP_KERNEL); + if (!all) + goto err_alloc_all; + + dflt = kmemdup(_devconf_dflt, sizeof(ipv4_devconf_dflt), GFP_KERNEL); + if (!dflt) + goto err_alloc_dflt; +#endif #ifdef CONFIG_SYSCTL tbl = kmemdup(tbl, sizeof(ctl_forward_entry), GFP_KERNEL); @@ -2292,7 +2302,10 @@ static __net_init int devinet_init_net(struct net *net) tbl[0].extra1 = all; tbl[0].extra2 = net; #endif + +#ifndef CONFIG_NET_NS_INHERIT_ORIGINAL } +#endif #ifdef CONFIG_SYSCTL err = __devinet_sysctl_register(net, "all", all); -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 2/2] ne: DeviceTree support.
Hi Yoshinori, [auto build test WARNING on v4.3-rc4 -- if it's inappropriate base, please ignore] config: m68k-multi_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=m68k All warnings (new ones prefixed by >>): drivers/net/ethernet/8390/ne.c: In function 'ne_drv_probe': >> drivers/net/ethernet/8390/ne.c:817:6: warning: passing argument 1 of >> 'dev_of_node' from incompatible pointer type if (dev_of_node(dev)) ^ In file included from include/linux/pnp.h:11:0, from include/linux/isapnp.h:26, from drivers/net/ethernet/8390/ne.c:47: include/linux/device.h:967:35: note: expected 'struct device *' but argument is of type 'struct net_device *' static inline struct device_node *dev_of_node(struct device *dev) ^ drivers/net/ethernet/8390/ne.c:818:24: warning: passing argument 1 of 'dev_of_node' from incompatible pointer type of_property_read_u32(dev_of_node(dev), ^ In file included from include/linux/pnp.h:11:0, from include/linux/isapnp.h:26, from drivers/net/ethernet/8390/ne.c:47: include/linux/device.h:967:35: note: expected 'struct device *' but argument is of type 'struct net_device *' static inline struct device_node *dev_of_node(struct device *dev) ^ vim +/dev_of_node +817 drivers/net/ethernet/8390/ne.c 801 } 802 803 outb_p(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */ 804 ei_status.dmaing &= ~0x01; 805 } 806 807 static int __init ne_drv_probe(struct platform_device *pdev) 808 { 809 struct net_device *dev; 810 int err, this_dev = pdev->id; 811 struct resource *res; 812 813 dev = alloc_eip_netdev(); 814 if (!dev) 815 return -ENOMEM; 816 > 817 if (dev_of_node(dev)) 818 of_property_read_u32(dev_of_node(dev), 819 "national,dcr", _dcr_val); 820 821 /* ne.c doesn't populate resources in platform_device, but 822 * rbtx4927_ne_init and rbtx4938_ne_init do register devices 823 * with resources. 824 */ 825 res = platform_get_resource(pdev, IORESOURCE_IO, 0); --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH net-next 06/15] ipv4: Merge ip_local_out and ip_local_out_sk
Le 07/10/2015 22:39, Eric W. Biederman a écrit : Nicolas Dichtelwrites: Le 06/10/2015 20:53, Eric W. Biederman a écrit : It is confusing and silly hiding a paramater so modify all of the callers to pass in the appropriate socket or skb->sk if no socket is known. Signed-off-by: "Eric W. Biederman" --- [snip] @@ -456,7 +456,7 @@ packet_routed: skb->priority = sk->sk_priority; skb->mark = sk->sk_mark; - res = ip_local_out(skb); + res = ip_local_out(sk, skb); As stated in the comment at the top of this function (ip_queue_xmit()), skb->sk can be different from sk. See also commit b0270e91014d ("ipv4: add a sock pointer to ip_queue_xmit()"). Not sure if this change is right. Good catch. This change should not have been buried in this patch. It needs to be it's own separate bug fix. As I read the code we actually do want to pass sk not skb->sk into ip_local_out. For all of the reasons that sk is potentially different from skb->sk already. The way I understand this is we have pushed an sk parameter through the output path so that sk_mc_loop(sk) can be called with the tunnel's socket not whatever is on skb->sk. This allows for looking to see if local multicast loopback is configured on the tunnels socket not on the originating socket of the packet. Ok, thank you for the explanation. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 5/6] net: dsa: push prepare phase in port_fdb_add
On Wed, Oct 7, 2015 at 4:48 PM, Vivien Didelotwrote: > Now that the prepare phase is pushed down to the DSA drivers, propagate > it to the port_fdb_add function. > > Signed-off-by: Vivien Didelot Reviewed-by: Scott Feldman -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 6/6] net: dsa: use switchdev obj in port_fdb_del
On Wed, Oct 7, 2015 at 4:48 PM, Vivien Didelotwrote: > For consistency with the FDB add operation, propagate the > switchdev_obj_port_fdb structure in the DSA drivers. > > Signed-off-by: Vivien Didelot Reviewed-by: Scott Feldman -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 1/2] bpf: enable non-root eBPF programs
On 10/7/15 11:21 PM, Ingo Molnar wrote: so I see no reason why unprivileged eBPF couldn't have a sysctl too - with the default value set to permissive. agreed. sent out v2 follows 'modules_disabled' style. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next v2 1/4] switchdev: add bridge attributes
From: Scott FeldmanSetting the stage to push bridge-level attributes down to port driver so hardware can be programmed accordingly. Bridge-level attribute example is ageing_time. This is a per-bridge attribute, not a per-bridge-port attr. Signed-off-by: Scott Feldman --- include/net/switchdev.h |5 + include/uapi/linux/if_link.h |2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 89266a3..8d92cd0 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -43,6 +43,7 @@ enum switchdev_attr_id { SWITCHDEV_ATTR_ID_PORT_PARENT_ID, SWITCHDEV_ATTR_ID_PORT_STP_STATE, SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, + SWITCHDEV_ATTR_ID_BRIDGE, }; struct switchdev_attr { @@ -52,6 +53,10 @@ struct switchdev_attr { struct netdev_phys_item_id ppid;/* PORT_PARENT_ID */ u8 stp_state; /* PORT_STP_STATE */ unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */ + struct switchdev_attr_bridge { /* BRIDGE */ + enum ifla_br attr; + u32 val; + } bridge; } u; }; diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index e3b6217..30177b3 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h @@ -222,7 +222,7 @@ enum in6_addr_gen_mode { /* Bridge section */ -enum { +enum ifla_br { IFLA_BR_UNSPEC, IFLA_BR_FORWARD_DELAY, IFLA_BR_HELLO_TIME, -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next v2 0/4] switchdev: push bridge attributes down
From: Scott FeldmanPush bridge-level attributes down to switchdev drivers. This patchset adds the infrastructure and then pushes, as an example, ageing_time attribute down from bridge to switchdev (rocker) driver. Add some range-checking for ageing_time. # ip link set dev br0 type bridge ageing_time 1000 # ip link set dev br0 type bridge ageing_time 999 RTNETLINK answers: Numerical result out of range Up until now, switchdev attrs where port-level attrs, so the netdev used in switchdev_attr_set() would be a switch port or bond of switch ports. With bridge-level attrs, the netdev passed to switchdev_attr_set() is the bridge netdev. The same recusive algo is used to visit the leaves of the stacked drivers to set the attr, it's just in this case we start one layer higher in the stack. One note is not all ports in the bridge may support setting a bridge-level attribute, so rather than failing the entire set, we'll skip over those ports returning -EOPNOTSUPP. v1->v2: rebase w/ net-next Scott Feldman (4): switchdev: add bridge attributes switchdev: skip over ports returning -EOPNOTSUPP when recursing ports bridge: push bridge setting ageing_time down to switchdev rocker: handle setting bridge ageing_time drivers/net/ethernet/rocker/rocker.c | 22 ++ include/net/switchdev.h |6 ++ include/uapi/linux/if_link.h |2 +- net/bridge/br_ioctl.c|3 +-- net/bridge/br_netlink.c |6 +++--- net/bridge/br_private.h |1 + net/bridge/br_stp.c | 24 net/bridge/br_sysfs_br.c |3 +-- net/switchdev/switchdev.c|9 - 9 files changed, 67 insertions(+), 9 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next v2 4/4] rocker: handle setting bridge ageing_time
From: Scott FeldmanThe FDB cleanup timer will get rescheduled to re-evaluate FDB entries based on new ageing_time. Signed-off-by: Scott Feldman --- drivers/net/ethernet/rocker/rocker.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c index cf91ffc..3c7f9ae 100644 --- a/drivers/net/ethernet/rocker/rocker.c +++ b/drivers/net/ethernet/rocker/rocker.c @@ -4361,6 +4361,24 @@ static int rocker_port_brport_flags_set(struct rocker_port *rocker_port, return err; } +static int rocker_port_bridge_set(struct rocker_port *rocker_port, + struct switchdev_trans *trans, + struct switchdev_attr_bridge *bridge) +{ + switch (bridge->attr) { + case IFLA_BR_AGEING_TIME: + if (switchdev_trans_ph_prepare(trans)) + return 0; + rocker_port->ageing_time = clock_t_to_jiffies(bridge->val); + mod_timer(_port->rocker->fdb_cleanup_timer, jiffies); + break; + default: + return -EOPNOTSUPP; + } + + return 0; +} + static int rocker_port_attr_set(struct net_device *dev, struct switchdev_attr *attr, struct switchdev_trans *trans) @@ -4378,6 +4396,10 @@ static int rocker_port_attr_set(struct net_device *dev, err = rocker_port_brport_flags_set(rocker_port, trans, attr->u.brport_flags); break; + case SWITCHDEV_ATTR_ID_BRIDGE: + err = rocker_port_bridge_set(rocker_port, trans, +>u.bridge); + break; default: err = -EOPNOTSUPP; break; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next v2 3/4] bridge: push bridge setting ageing_time down to switchdev
From: Scott FeldmanUse SWITCHDEV_F_SKIP_EOPNOTSUPP to skip over ports in bridge that don't support setting ageing_time (or setting bridge attrs in general). If push fails, don't update ageing_time in bridge and return err to user. If push succeeds, update ageing_time in bridge and run gc_timer now to recalabrate when to run gc_timer next, based on new ageing_time. Signed-off-by: Scott Feldman Signed-off-by: Jiri Pirko --- net/bridge/br_ioctl.c|3 +-- net/bridge/br_netlink.c |6 +++--- net/bridge/br_private.h |1 + net/bridge/br_stp.c | 24 net/bridge/br_sysfs_br.c |3 +-- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index 8d423bc..263b4de 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c @@ -200,8 +200,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) return -EPERM; - br->ageing_time = clock_t_to_jiffies(args[1]); - return 0; + return br_set_ageing_time(br, args[1]); case BRCTL_GET_PORT_INFO: { diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index d78b442..544ab96 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -870,9 +870,9 @@ static int br_changelink(struct net_device *brdev, struct nlattr *tb[], } if (data[IFLA_BR_AGEING_TIME]) { - u32 ageing_time = nla_get_u32(data[IFLA_BR_AGEING_TIME]); - - br->ageing_time = clock_t_to_jiffies(ageing_time); + err = br_set_ageing_time(br, nla_get_u32(data[IFLA_BR_AGEING_TIME])); + if (err) + return err; } if (data[IFLA_BR_STP_STATE]) { diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 09d3ecb..ba0c67b 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -882,6 +882,7 @@ void __br_set_forward_delay(struct net_bridge *br, unsigned long t); int br_set_forward_delay(struct net_bridge *br, unsigned long x); int br_set_hello_time(struct net_bridge *br, unsigned long x); int br_set_max_age(struct net_bridge *br, unsigned long x); +int br_set_ageing_time(struct net_bridge *br, u32 ageing_time); /* br_stp_if.c */ diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index 3a982c0..ae3286b 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c @@ -566,6 +566,30 @@ int br_set_max_age(struct net_bridge *br, unsigned long val) } +int br_set_ageing_time(struct net_bridge *br, u32 ageing_time) +{ + struct switchdev_attr attr = { + .id = SWITCHDEV_ATTR_ID_BRIDGE, + .flags = SWITCHDEV_F_SKIP_EOPNOTSUPP, + .u.bridge.attr = IFLA_BR_AGEING_TIME, + .u.bridge.val = ageing_time, + }; + unsigned long t = clock_t_to_jiffies(ageing_time); + int err; + + if (t < BR_MIN_AGEING_TIME || t > BR_MAX_AGEING_TIME) + return -ERANGE; + + err = switchdev_port_attr_set(br->dev, ); + if (err) + return err; + + br->ageing_time = t; + mod_timer(>gc_timer, jiffies); + + return 0; +} + void __br_set_forward_delay(struct net_bridge *br, unsigned long t) { br->bridge_forward_delay = t; diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 4c97fc5..04ef192 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c @@ -102,8 +102,7 @@ static ssize_t ageing_time_show(struct device *d, static int set_ageing_time(struct net_bridge *br, unsigned long val) { - br->ageing_time = clock_t_to_jiffies(val); - return 0; + return br_set_ageing_time(br, val); } static ssize_t ageing_time_store(struct device *d, -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next v2 2/4] switchdev: skip over ports returning -EOPNOTSUPP when recursing ports
From: Scott FeldmanThis allows us to recurse over all the ports, skipping over unsupporting ports. Without the change, the recursion would stop at first unsupported port. Signed-off-by: Scott Feldman --- include/net/switchdev.h |1 + net/switchdev/switchdev.c |9 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 8d92cd0..f3de6f4 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -16,6 +16,7 @@ #include #define SWITCHDEV_F_NO_RECURSE BIT(0) +#define SWITCHDEV_F_SKIP_EOPNOTSUPPBIT(1) struct switchdev_trans_item { struct list_head list; diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index 6e4a4f9..7a9ab90 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c @@ -147,7 +147,7 @@ static int __switchdev_port_attr_set(struct net_device *dev, return ops->switchdev_port_attr_set(dev, attr, trans); if (attr->flags & SWITCHDEV_F_NO_RECURSE) - return err; + goto done; /* Switch device port(s) may be stacked under * bond/team/vlan dev, so recurse down to set attr on @@ -156,10 +156,17 @@ static int __switchdev_port_attr_set(struct net_device *dev, netdev_for_each_lower_dev(dev, lower_dev, iter) { err = __switchdev_port_attr_set(lower_dev, attr, trans); + if (err == -EOPNOTSUPP && + attr->flags & SWITCHDEV_F_SKIP_EOPNOTSUPP) + continue; if (err) break; } +done: + if (err == -EOPNOTSUPP && attr->flags & SWITCHDEV_F_SKIP_EOPNOTSUPP) + err = 0; + return err; } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 4/6] net: dsa: add port_fdb_prepare
On Wed, Oct 7, 2015 at 4:48 PM, Vivien Didelotwrote: > Push the prepare phase for FDB operations down to the DSA drivers, with > a new port_fdb_prepare function. Currently only mv88e6xxx is affected. > > Signed-off-by: Vivien Didelot Reviewed-by: Scott Feldman -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next v2 1/5] net: move net_get_random_once to lib
On 10/08/2015 07:12 AM, kbuild test robot wrote: Hi Hannes, [auto build test WARNING on net-next/master -- if it's inappropriate base, please ignore] config: mips-ip27_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=mips All warnings (new ones prefixed by >>): mips-linux-gnu-ld: lib/lockref.o: warning: Inconsistent ISA between e_flags and .MIPS.abiflags mips-linux-gnu-ld: lib/lockref.o: warning: Inconsistent ISA extensions between e_flags and .MIPS.abiflags [...] mips-linux-gnu-ld: lib/reciprocal_div.o: warning: Inconsistent ISA between e_flags and .MIPS.abiflags mips-linux-gnu-ld: lib/reciprocal_div.o: warning: Inconsistent ISA extensions between e_flags and .MIPS.abiflags mips-linux-gnu-ld: lib/once.o: warning: Inconsistent ISA between e_flags and .MIPS.abiflags mips-linux-gnu-ld: lib/once.o: warning: Inconsistent ISA extensions between e_flags and .MIPS.abiflags Looks like a known issue on MIPS given the warning is not new also on other object files. Here was what was discussed recently on this subject on a refactoring patch from David Ahern: https://patchwork.ozlabs.org/patch/525102/ Thanks! mips-linux-gnu-ld: lib/string_helpers.o: warning: Inconsistent ISA between e_flags and .MIPS.abiflags mips-linux-gnu-ld: lib/string_helpers.o: warning: Inconsistent ISA extensions between e_flags and .MIPS.abiflags [...] -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 2/2] net: fix a bug on Hisilicon Network Subsystem
This patch fixes a bug in hns driver during internal testing of the driver. Signed-off-by: huangdaodeSigned-off-by: yankejian --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c index 95bf42a..e162e4a 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c @@ -179,7 +179,7 @@ static int hns_mac_get_inner_port_num(struct hns_mac_cb *mac_cb, return -EINVAL; } } else if (mac_cb->dsaf_dev->dsaf_mode < DSAF_MODE_MAX) { - if (mac_cb->mac_id <= DSAF_MAX_PORT_NUM_PER_CHIP) { + if (mac_cb->mac_id >= DSAF_MAX_PORT_NUM_PER_CHIP) { dev_err(mac_cb->dev, "input invalid,%s mac%d vmid%d!\n", mac_cb->dsaf_dev->ae_dev.name, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch net-next RFC 2/3] switchdev: allow caller to explicitly use deferred attr_set version
On Wed, Oct 7, 2015 at 10:39 PM, Jiri Pirkowrote: > Thu, Oct 08, 2015 at 06:27:07AM CEST, sfel...@gmail.com wrote: >>On Wed, Oct 7, 2015 at 11:30 AM, Jiri Pirko wrote: >>> From: Jiri Pirko >>> >>> Caller should know if he can call attr_set directly (when holding RTNL) >>> or if he has to use deferred version of this function. >>> >>> This also allows drivers to sleep inside attr_set and report operation >>> status back to switchdev core. Switchdev core then warns if status is >>> not ok, instead of silent errors happening in drivers. >>> >>> Signed-off-by: Jiri Pirko >>> --- >>> include/net/switchdev.h | 2 + >>> net/bridge/br_stp.c | 4 +- >>> net/switchdev/switchdev.c | 113 >>> +- >>> 3 files changed, 65 insertions(+), 54 deletions(-) >>> >>> diff --git a/include/net/switchdev.h b/include/net/switchdev.h >>> index 89266a3..320be44 100644 >>> --- a/include/net/switchdev.h >>> +++ b/include/net/switchdev.h >>> @@ -168,6 +168,8 @@ int switchdev_port_attr_get(struct net_device *dev, >>> struct switchdev_attr *attr); >>> int switchdev_port_attr_set(struct net_device *dev, >>> struct switchdev_attr *attr); >>> +int switchdev_port_attr_set_deferred(struct net_device *dev, >>> +struct switchdev_attr *attr); >> >>Rather than adding another op, use attr->flags and define: >> >>#define SWITCHDEV_F_DEFERRED BIT(x) >> >>So we get: >> >>void br_set_state(struct net_bridge_port *p, unsigned int state) >>{ >>struct switchdev_attr attr = { >>.id = SWITCHDEV_ATTR_ID_PORT_STP_STATE, >>+ .flags = SWITCHDEV_F_DEFERRED, >>.u.stp_state = state, >>}; >>int err; >> >>p->state = state; >>err = switchdev_port_attr_set(p->dev, ); >>if (err && err != -EOPNOTSUPP) >>br_warn(p->br, "error setting offload STP state on >>port %u(%s)\n", >>(unsigned int) p->port_no, >>p->dev->name); >>} >> >>(And add obj->flags to do the same). > > That's what I wanted to avoid. Also because the obj is const and for > call from work, this flag would have to be removed. What did you want to avoid? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 1/2] net: Fix Hisilicon Network Subsystem compilation warning
This patch fix a compilation warning on arm 32-bit platform Signed-off-by: huangdaodeSigned-off-by: yankejian --- drivers/net/ethernet/hisilicon/hns/hnae.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.c b/drivers/net/ethernet/hisilicon/hns/hnae.c index 0a0a9e8..ccbb666 100644 --- a/drivers/net/ethernet/hisilicon/hns/hnae.c +++ b/drivers/net/ethernet/hisilicon/hns/hnae.c @@ -448,12 +448,12 @@ static ssize_t handles_show(struct device *dev, s += sprintf(buf + s, "handle %d (eport_id=%u from %s):\n", i++, h->eport_id, h->dev->name); for (j = 0; j < h->q_num; j++) { - s += sprintf(buf + s, "\tqueue[%d] on 0x%llx\n", -j, (u64)h->qs[i]->io_base); -#define HANDEL_TX_MSG "\t\ttx_ring on 0x%llx:%u,%u,%u,%u,%u,%llu,%llu\n" + s += sprintf(buf + s, "\tqueue[%d] on 0x%p\n", +j, h->qs[i]->io_base); +#define HANDEL_TX_MSG "\t\ttx_ring on 0x%p:%u,%u,%u,%u,%u,%llu,%llu\n" s += sprintf(buf + s, HANDEL_TX_MSG, -(u64)h->qs[i]->tx_ring.io_base, +h->qs[i]->tx_ring.io_base, h->qs[i]->tx_ring.buf_size, h->qs[i]->tx_ring.desc_num, h->qs[i]->tx_ring.max_desc_num_per_pkt, @@ -462,8 +462,8 @@ static ssize_t handles_show(struct device *dev, h->qs[i]->tx_ring.stats.sw_err_cnt, h->qs[i]->tx_ring.stats.io_err_cnt); s += sprintf(buf + s, - "\t\trx_ring on 0x%llx:%u,%u,%llu,%llu,%llu\n", - (u64)h->qs[i]->rx_ring.io_base, + "\t\trx_ring on 0x%p:%u,%u,%llu,%llu,%llu\n", + h->qs[i]->rx_ring.io_base, h->qs[i]->rx_ring.buf_size, h->qs[i]->rx_ring.desc_num, h->qs[i]->rx_ring.stats.sw_err_cnt, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next v2 1/4] switchdev: add bridge attributes
Thu, Oct 08, 2015 at 08:04:40AM CEST, sfel...@gmail.com wrote: >From: Scott Feldman> >Setting the stage to push bridge-level attributes down to port driver so >hardware can be programmed accordingly. Bridge-level attribute example is >ageing_time. This is a per-bridge attribute, not a per-bridge-port attr. > >Signed-off-by: Scott Feldman >--- > include/net/switchdev.h |5 + > include/uapi/linux/if_link.h |2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/include/net/switchdev.h b/include/net/switchdev.h >index 89266a3..8d92cd0 100644 >--- a/include/net/switchdev.h >+++ b/include/net/switchdev.h >@@ -43,6 +43,7 @@ enum switchdev_attr_id { > SWITCHDEV_ATTR_ID_PORT_PARENT_ID, > SWITCHDEV_ATTR_ID_PORT_STP_STATE, > SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, >+ SWITCHDEV_ATTR_ID_BRIDGE, > }; > > struct switchdev_attr { >@@ -52,6 +53,10 @@ struct switchdev_attr { > struct netdev_phys_item_id ppid;/* PORT_PARENT_ID */ > u8 stp_state; /* PORT_STP_STATE */ > unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */ >+ struct switchdev_attr_bridge { /* BRIDGE */ >+ enum ifla_br attr; I don't like pushing down IFLA_BR_* values throught switchdev. I think it might better to just intruduce: SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME and "u32 ageing_time" here. Something similar to stp_state. Much easier to read and does not give blank cheque for passing any bridge IFLA_BR_* down to drivers. It also aligns with bridge code nicely, I believe. >+ u32 val; >+ } bridge; > } u; > }; > >diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h >index e3b6217..30177b3 100644 >--- a/include/uapi/linux/if_link.h >+++ b/include/uapi/linux/if_link.h >@@ -222,7 +222,7 @@ enum in6_addr_gen_mode { > > /* Bridge section */ > >-enum { >+enum ifla_br { > IFLA_BR_UNSPEC, > IFLA_BR_FORWARD_DELAY, > IFLA_BR_HELLO_TIME, >-- >1.7.10.4 > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH RFC] net: mvneta: add ethtool statistics
On Thu, Oct 08, 2015 at 01:03:33AM +0200, Andrew Lunn wrote: > On Tue, Oct 06, 2015 at 09:41:08PM +0100, Russell King wrote: > > Add support for the ethtool statistic interface, returning the full set > > of statistics which both Armada 370 and Armada XP can support. > > > > Signed-off-by: Russell King> > --- > > Andrew, > > > > Here's the patch updated to use the example set by mv643xx_eth.c. > > Hi Russell > > I did some quick tests on an Armada XP based DLINK WRT1900AC. We have > some inconsistencies: > > root@wrt1900ac:~# ethtool -S eth0 > NIC statistics: > good_octets_received: 4300691 > good_frames_received: 7655 ... > good_octets_sent: 383562 > good_frames_sent: 7665 > excessive_collision: 0 > multicast_frames_sent: 8 > broadcast_frames_sent: 3 > fc_sent: 0 > internal_mac_transmit_err: 0 > root@wrt1900ac:~# ifconfig eth0 > eth0 Link encap:Ethernet HWaddr 94:10:3e:80:bc:f3 > inet6 addr: fe80::9610:3eff:fe80:bcf3/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:2 errors:0 dropped:0 overruns:0 frame:0 > TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:532 > RX bytes:497 (497.0 B) TX bytes:648 (648.0 B) > Interrupt:27 > > I'm guessing ethtool is including the uboot TFTP packets, where as > ifconfig is just Linux? Yes, since the counters will be zero at reset. > This would suggest the driver is not clearing the statistics when it > loads. Should it? That's an interesting question, one which I have no answer for. > Apart from that, i pinged with a few different sizes and the right > frame size counter went up. I broadcast pinged and the broadcast > counter went up. So not exhaustive testing, but better than nothing. > Since clearing the statistics is a separate issue: > > Tested-by: Andrew Lunn Thanks. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net] fix return of iptunnel_xmit
All users of iptunnel_xmit expect the return value to be the error code from ip_output_local, but currently the return value is length of the send data on success or zero on error. Change iptunnel_xmit returns to match the callers expectation. This bug was introduced when the ip_tunnel_core code was refactored. Fixes: 0e6fbc5b6c6218987c93b8c7ca60cf786062899d Signed-off-by: Andreas Schultz--- net/ipv4/ip_tunnel_core.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index 84dce6a..f25ccea 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -54,7 +54,6 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, { int pkt_len = skb->len - skb_inner_network_offset(skb); struct iphdr *iph; - int err; skb_scrub_packet(skb, xnet); @@ -79,10 +78,7 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, __ip_select_ident(dev_net(rt->dst.dev), iph, skb_shinfo(skb)->gso_segs ?: 1); - err = ip_local_out_sk(sk, skb); - if (unlikely(net_xmit_eval(err))) - pkt_len = 0; - return pkt_len; + return ip_local_out_sk(sk, skb); } EXPORT_SYMBOL_GPL(iptunnel_xmit); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net v2] fix return of iptunnel_xmit
All users of iptunnel_xmit expect the return value to be the error code from ip_output_local, but currently the return value is length of the send data on success or zero on error. Change iptunnel_xmit returns to match the callers expectation. This bug was introduced when the ip_tunnel_core code was refactored. Fixes: 0e6fbc5b6c6218987c93b8c7ca60cf786062899d Signed-off-by: Andreas Schultz--- Change in v2: - remove unused variable pkt_len --- net/ipv4/ip_tunnel_core.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index 84dce6a..c167c4a 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -52,9 +52,7 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, __be32 src, __be32 dst, __u8 proto, __u8 tos, __u8 ttl, __be16 df, bool xnet) { - int pkt_len = skb->len - skb_inner_network_offset(skb); struct iphdr *iph; - int err; skb_scrub_packet(skb, xnet); @@ -79,10 +77,7 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, __ip_select_ident(dev_net(rt->dst.dev), iph, skb_shinfo(skb)->gso_segs ?: 1); - err = ip_local_out_sk(sk, skb); - if (unlikely(net_xmit_eval(err))) - pkt_len = 0; - return pkt_len; + return ip_local_out_sk(sk, skb); } EXPORT_SYMBOL_GPL(iptunnel_xmit); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [net-next 00/18][pull request] Intel Wired LAN Driver Updates 2015-10-07
From: Jeff KirsherDate: Wed, 7 Oct 2015 15:46:54 -0700 > This series contains updates to i40e and i40evf only. Pulled, thanks Jeff. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Patch net] act_mirred: clear sender cpu before sending to tx
From: Cong WangDate: Tue, 6 Oct 2015 17:23:47 -0700 > Similar to commit c29390c6dfee ("xps: must clear sender_cpu before > forwarding") > the skb->sender_cpu needs to be cleared when moving from Rx > Tx, otherwise kernel could crash. > > Cc: Eric Dumazet > Cc: Jamal Hadi Salim > Signed-off-by: Cong Wang > Signed-off-by: Cong Wang Applied and queued up for -stable. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/4] sh_eth: Remove obsolete platform_device_id entries
From: Geert UytterhoevenDate: Wed, 7 Oct 2015 10:14:13 +0200 > Since commit 3d7608e4c169af03 ("ARM: shmobile: bockw: remove legacy > board file and config"), which is now in arm-soc/for-next, shmobile SoCs > are only supported in generic DT-only ARM multi-platform builds. > The sh_eth driver doesn't need to match platform devices by name > anymore, hence this series removes the corresponding platform_device_id > entries. > > Changes since v1: > - Protect some data and functions by #ifdef CONFIG_OF to silence > unused compiler warnings on SH, > - New patches 3 and 4. Since that commit isn't in any of my trees why don't you merge this via arm-soc/for-next? Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next] net: Do not drop to make_route if oif is l3mdev
From: David AhernDate: Wed, 7 Oct 2015 08:40:13 -0700 > Commit deaa0a6a930 ("net: Lookup actual route when oif is VRF device") > exposed a bug in __ip_route_output_key_hash for VRF devices: on FIB lookup > failure if the oif is specified the current logic drops to make_route on > the assumption that the route tables are wrong. For VRF/L3 master devices > this leads to wrong dst entries and route lookups. For example: > $ ip route ls table vrf-red > unreachable default > broadcast 10.2.1.0 dev eth1 proto kernel scope link src 10.2.1.2 > 10.2.1.0/24 dev eth1 proto kernel scope link src 10.2.1.2 > local 10.2.1.2 dev eth1 proto kernel scope host src 10.2.1.2 > broadcast 10.2.1.255 dev eth1 proto kernel scope link src 10.2.1.2 > > $ ip route get oif vrf-red 1.1.1.1 > 1.1.1.1 dev vrf-red src 10.0.0.2 > cache > > With this patch: > $ ip route get oif vrf-red 1.1.1.1 > RTNETLINK answers: No route to host > > which is the correct response based on the default route > > Signed-off-by: David Ahern Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2] bridge/netfilter: avoid unused label warning
With the ARM mini2440_defconfig, the bridge netfilter code gets built with both CONFIG_NF_DEFRAG_IPV4 and CONFIG_NF_DEFRAG_IPV6 disabled, which leads to a harmless gcc warning: net/bridge/br_netfilter_hooks.c: In function 'br_nf_dev_queue_xmit': net/bridge/br_netfilter_hooks.c:792:2: warning: label 'drop' defined but not used [-Wunused-label] This gets rid of the warning by cleaning up the code to avoid the respective #ifdefs causing this problem, and replacing them with if(IS_ENABLED()) checks. I have verified that the resulting object code is unchanged, and an additional advantage is that we now get compile coverage of the unused functions in more configurations. Signed-off-by: Arnd BergmannFixes: dd302b59bde0 ("netfilter: bridge: don't leak skb in error paths") --- Version 2: Rebased to git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c index 13f03671c88d..18905d4781db 100644 --- a/net/bridge/br_netfilter_hooks.c +++ b/net/bridge/br_netfilter_hooks.c @@ -111,7 +111,6 @@ static inline __be16 pppoe_proto(const struct sk_buff *skb) /* largest possible L2 header, see br_nf_dev_queue_xmit() */ #define NF_BRIDGE_MAX_MAC_HEADER_LENGTH (PPPOE_SES_HLEN + ETH_HLEN) -#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV4) || IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) struct brnf_frag_data { char mac[NF_BRIDGE_MAX_MAC_HEADER_LENGTH]; u8 encap_size; @@ -121,7 +120,6 @@ struct brnf_frag_data { }; static DEFINE_PER_CPU(struct brnf_frag_data, brnf_frag_data_storage); -#endif static void nf_bridge_info_free(struct sk_buff *skb) { @@ -666,7 +664,6 @@ static unsigned int br_nf_forward_arp(void *priv, return NF_STOLEN; } -#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV4) || IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) static int br_nf_push_frag_xmit(struct net *net, struct sock *sk, struct sk_buff *skb) { struct brnf_frag_data *data; @@ -696,9 +693,7 @@ static int br_nf_push_frag_xmit_sk(struct sock *sk, struct sk_buff *skb) struct net *net = dev_net(skb_dst(skb)->dev); return br_nf_push_frag_xmit(net, sk, skb); } -#endif -#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV4) static int br_nf_ip_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, int (*output)(struct sock *, struct sk_buff *)) @@ -716,7 +711,6 @@ br_nf_ip_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, return ip_do_fragment(sk, skb, output); } -#endif static unsigned int nf_bridge_mtu_reduction(const struct sk_buff *skb) { @@ -739,11 +733,11 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff nf_bridge = nf_bridge_info_get(skb); -#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV4) /* This is wrong! We should preserve the original fragment * boundaries by preserving frag_list rather than refragmenting. */ - if (skb->protocol == htons(ETH_P_IP)) { + if (IS_ENABLED(CONFIG_NF_DEFRAG_IPV4) && + skb->protocol == htons(ETH_P_IP)) { struct brnf_frag_data *data; if (br_validate_ipv4(net, skb)) @@ -765,9 +759,8 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff return br_nf_ip_fragment(net, sk, skb, br_nf_push_frag_xmit_sk); } -#endif -#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) - if (skb->protocol == htons(ETH_P_IPV6)) { + if (IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) && + skb->protocol == htons(ETH_P_IPV6)) { const struct nf_ipv6_ops *v6ops = nf_get_ipv6_ops(); struct brnf_frag_data *data; @@ -791,7 +784,6 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff kfree_skb(skb); return -EMSGSIZE; } -#endif nf_bridge_info_free(skb); return br_dev_queue_push_xmit(net, sk, skb); drop: -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] mlxsw: fix warnings for big-endian 32-bit dma_addr_t
From: Arnd BergmannDate: Wed, 07 Oct 2015 08:58:34 +0200 > The recently added mlxsw driver produces warnings in ARM > allmodconfig: > > drivers/net/ethernet/mellanox/mlxsw/pci.c: In function 'mlxsw_pci_cmd_exec': > drivers/net/ethernet/mellanox/mlxsw/pci.c:1585:59: warning: right shift count > >= width of type [-Wshift-count-overflow] > linux/byteorder/big_endian.h:38:51: note: in definition of macro > '__cpu_to_be32' > drivers/net/ethernet/mellanox/mlxsw/pci.c:76:2: note: in expansion of macro > 'iowrite32be' > > This uses upper_32_bits() to extract the bits while avoiding that warning. > > Signed-off-by: Arnd Bergmann > Acked-by: Jiri Pirko > Fixes: eda6500a987a "mlxsw: Add PCI bus implementation" Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2 net] net/mlx4_core: Test interrupts fail if not all comp vectors called request_irq
On Wed, Oct 7, 2015 at 12:27 AM,wrote: > From: Carol L Soto > > Test interrupts fails if not all completion vectors called > request_irq. This case can happen if only mlx4_en loads and > we have more completion vectors than rx rings. > > Fixes: c66fa19c405a ('net/mlx4: Add EQ pool') > Acked-by: Matan Barak > Signed-off-by: Carol L Soto Here too, I will submit this with other fixes we have, thanks a lot. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next] bpf, skb_do_redirect: clear sender_cpu before xmit
From: Daniel BorkmannDate: Wed, 7 Oct 2015 10:16:09 +0200 > Similar to commit c29390c6dfee ("xps: must clear sender_cpu before > forwarding"), we also need to clear the skb->sender_cpu when moving > from RX to TX via skb_do_redirect() due to the shared location of > napi_id (used on RX) and sender_cpu (used on TX). > > Fixes: 27b29f63058d ("bpf: add bpf_redirect() helper") > Signed-off-by: Daniel Borkmann Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] net: mdio-octeon: Drop obsolete Kconfig advice
From: Jean DelvareDate: Wed, 7 Oct 2015 10:26:38 +0200 > "Y" was the right answer for MDIO_OCTEON when this option was only > available on CAVIUM_OCTEON_SOC. But now that the option is visible on > all (64-bit) systems, this piece of advice no longer makes sense. This > helper module is selected automatically by drivers which need it > anyway. > > Signed-off-by: Jean Delvare > Fixes: a6d6786452 ("net: mdio-octeon: Modify driver to work on both ThunderX > and Octeon") Applied, thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 0/6] net: dsa: push switchdev prepare phase in FDB ops
From: Vivien DidelotDate: Wed, 7 Oct 2015 19:48:25 -0400 > The first 3 patches removes the dsa.h include from linux/netdevice.h, which > broke the inclusion of switchdev.h in dsa.h. I still don't agree with bloating up struct netdevice just to deal with an include file ordering issue, sorry. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] af_unix: introduce unix_sk_const helper
On Thursday 08 October 2015 04:03:32 David Miller wrote: > From: Arnd Bergmann> Date: Tue, 06 Oct 2015 22:52:46 +0200 > > > Commit 124613012db1 ("af_unix: Convert the unix_sk macro to an inline > > function for type safety") was recently added to catch incorrect > > uses of the unix_sk helper using compiler warnings. > > > > It has now caught one such case in lsm_audit.c. The code is technically > > correct, but as it converts a const pointer to a non-const pointer, > > the annotation got lost, which gcc now warns about. > > > > This patch avoids the warning by introducing an additional helper > > that has const input and output, which makes the lsm_audit code build > > cleanly again. > > > > Signed-off-by: Arnd Bergmann > > --- > > I'm not entirely happy with this workaround myself, but could not come > > up with a better one. > > You can make the argument unconditionally const, as Paul Moore has done > in a separate patch submission. Ok, I see now how Paul's "audit: constify parts of common_audit_data and lsm_network_audit" patch caused the problem and is now gone from linux-next. That seems nicer indeed. Arnd -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] net/mlx4: Remove shared_ports variable at mlx4_enable_msi_x
On 10/8/2015 3:20 PM, David Miller wrote: Applied, thanks. Hi Dave, As I wrote an hour ago, I took this one and now sent it out within a small series to net. I just made the change-log a little better, so if you want, it's ok to stick with what you picked and avoid taking it from what I sent, sorry for any possible confusion created here. Or. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH iproute2] ip, realms: also allow to pass in raw realms value
If get_rt_realms() fails, try to get a possible raw u32 realms value for the u32 RTA_FLOW/FRA_FLOW attribute, as it might be useful to directly configure the hex value itself. And only if that fails, then bail out. The source realm is provided in the upper u16 (mask: 0x) and the destination realm through the lower u16 part (mask: 0x). This can be useful for tc's bpf realm matcher, but also a full hex/mask param can be provided already for matching through iptables' --realm cmdline option, for example. Signed-off-by: Daniel Borkmann--- include/rtm_map.h | 3 +-- ip/iproute.c | 6 +++--- ip/iprule.c | 2 +- ip/rtm_map.c | 10 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/include/rtm_map.h b/include/rtm_map.h index 70bda7d..d6e5885 100644 --- a/include/rtm_map.h +++ b/include/rtm_map.h @@ -4,7 +4,6 @@ char *rtnl_rtntype_n2a(int id, char *buf, int len); int rtnl_rtntype_a2n(int *id, char *arg); -int get_rt_realms(__u32 *realms, char *arg); - +int get_rt_realms_or_raw(__u32 *realms, char *arg); #endif /* __RTM_MAP_H__ */ diff --git a/ip/iproute.c b/ip/iproute.c index b0cd299..40e6ebe 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -749,7 +749,7 @@ static int parse_one_nh(struct rtmsg *r, struct rtattr *rta, } else if (matches(*argv, "realms") == 0) { __u32 realm; NEXT_ARG(); - if (get_rt_realms(, *argv)) + if (get_rt_realms_or_raw(, *argv)) invarg("\"realm\" value is invalid\n", *argv); rta_addattr32(rta, 4096, RTA_FLOW, realm); rtnh->rtnh_len += sizeof(struct rtattr) + 4; @@ -1050,7 +1050,7 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv) } else if (matches(*argv, "realms") == 0) { __u32 realm; NEXT_ARG(); - if (get_rt_realms(, *argv)) + if (get_rt_realms_or_raw(, *argv)) invarg("\"realm\" value is invalid\n", *argv); addattr32(, sizeof(req), RTA_FLOW, realm); } else if (strcmp(*argv, "onlink") == 0) { @@ -1383,7 +1383,7 @@ static int iproute_list_flush_or_save(int argc, char **argv, int action) } else if (matches(*argv, "realms") == 0) { __u32 realm; NEXT_ARG(); - if (get_rt_realms(, *argv)) + if (get_rt_realms_or_raw(, *argv)) invarg("invalid realms\n", *argv); filter.realm = realm; filter.realmmask = ~0U; diff --git a/ip/iprule.c b/ip/iprule.c index 714278a..128b16a 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -305,7 +305,7 @@ static int iprule_modify(int cmd, int argc, char **argv) } else if (matches(*argv, "realms") == 0) { __u32 realm; NEXT_ARG(); - if (get_rt_realms(, *argv)) + if (get_rt_realms_or_raw(, *argv)) invarg("invalid realms\n", *argv); addattr32(, sizeof(req), FRA_FLOW, realm); } else if (matches(*argv, "table") == 0 || diff --git a/ip/rtm_map.c b/ip/rtm_map.c index 21e818b..1d7d2c7 100644 --- a/ip/rtm_map.c +++ b/ip/rtm_map.c @@ -93,7 +93,7 @@ int rtnl_rtntype_a2n(int *id, char *arg) return 0; } -int get_rt_realms(__u32 *realms, char *arg) +static int get_rt_realms(__u32 *realms, char *arg) { __u32 realm = 0; char *p = strchr(arg, '/'); @@ -114,3 +114,11 @@ int get_rt_realms(__u32 *realms, char *arg) *realms |= realm; return 0; } + +int get_rt_realms_or_raw(__u32 *realms, char *arg) +{ + if (!get_rt_realms(realms, arg)) + return 0; + + return get_unsigned(realms, arg, 0); +} -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] af_unix: constify the sock parameter in unix_sk()
From: Paul MooreDate: Tue, 06 Oct 2015 15:03:53 -0400 > Make unix_sk() just like inet[6]_sk() by constify'ing the sock > parameter. > > Signed-off-by: Paul Moore Applied, thanks Paul. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v4 00/14] RDS: connection scalability and performance improvements
From: Santosh ShilimkarDate: Wed, 7 Oct 2015 08:53:34 -0700 > [v4] > Re-sending the same patches from v3 again since my repost of > patch 05/14 from v3 was whitespace damaged. > > [v3] > Updated patch "[PATCH v2 05/14] RDS: defer the over_batch work to > send worker" as per David Miller's comment [4] to avoid the magic > value usage. Patch now makes use of already available but unused > send_batch_count module parameter. Rest of the patches are same as > earlier version v2 [3] > > [v2]: > Dropped "[PATCH 05/15] RDS: increase size of hash-table to 8K" from > earlier version [1]. I plan to address the hash table scalability using > re-sizable hash tables as suggested by David Laight and David Miller [2] > > This series addresses RDS connection bottlenecks on massive workloads and > improve the RDMA performance almost by 3X. RDS TCP also gets a small gain > of about 12%. > > RDS is being used in massive systems with high scalability where several > hundred thousand end points and tens of thousands of local processes > are operating in tens of thousand sockets. Being RC(reliable connection), > socket bind and release happens very often and any inefficiencies in > bind hash look ups hurts the overall system performance. RDS bin hash-table > uses global spin-lock which is the biggest bottleneck. To make matter worst, > it uses rcu inside global lock for hash buckets. > This is being addressed by simply using per bucket rw lock which makes the > locking simple and very efficient. The hash table size is still an issue and > I plan to address it by using re-sizable hash tables as suggested on the list. > > For RDS RDMA improvement, the completion handling is revamped so that we > can do batch completions. Both send and receive completion handlers are > split logically to achieve the same. RDS 8K messages being one of the > key usecase, mr pool is adapted to have the 8K mrs along with default 1M > mrs. And while doing this, few fixes and couple of bottlenecks seen with > rds_sendmsg() are addressed. > > Series applies against 4.3-rc1 as well net-next. Its tested on Oracle > hardware with IB fabric for both bcopy as well as RDMA mode. RDS TCP is > tested with iXGB NIC. Like last time, iWARP transport is untested with > these changes. The patchset is also available at below git repo: > > git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git > net/rds/4.3-v3 > > As a side note, the IB HCA driver I used for testing misses at least 3 > important patches in upstream to see the full blown IB performance and > am hoping to get that in mainline with help of them. Pulled, thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 0/3] net: remove dsa.h from netdevice.h
From: Vivien DidelotDate: Tue, 6 Oct 2015 17:54:24 -0400 > In order to push switchdev objects down to DSA drivers, I need to include > switchdev.h in dsa.h. But compilation fails because of a circular dependency > issue, since dsa.h is also included in linux/netdevice.h. > > dsa.h is included for two purposes: to have the definition of struct > dsa_switch_tree; and to have access to dsa_uses_tagged_protocol(), used by > netdev_uses_dsa(). > > This patchset forward declares struct dsa_switch_tree; adds a new uses_hw_tag > boolean to struct net_device, which is more explicit than the DSA helper, and > finally get rid of the dsa.h include. > > With this patchset, switchdev.h can safely be included in dsa.h. The netdevice structure is already too big, and bloating it up even more to satisfy some include ordering issue is rather unacceptable as far as I am concerned. Just forward declare the pointer type, you're not dereferencing it. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
EMPLOYEE #: MS-284-GS “Secret Shopping”
Congratulation!!! You have been selected to participate in a paid Customer Research Program known as “Secret Shopping”. As one of the people selected to represent our firm, you will be acting as a Customer Service Evaluator of selected companies in your area. Get back with the requested data below for more Information. 1. Name: 2. Address: 3. Contact Phone Number: 4. Zip Code: 5. Age: 6. Occupation: John Mclin Director of Operation Mystery Shopper -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 3/6] net: remove dsa.h include from linux/netdevice.h
On 10/8/2015 10:18 AM, Jiri Pirko wrote: > Thu, Oct 08, 2015 at 11:04:48AM CEST, l...@intel.com wrote: >> Hi Vivien, >> >> [auto build test ERROR on net-next/master -- if it's inappropriate base, >> please ignore] >> >> config: arm64-allyesconfig (attached as .config) >> reproduce: >>wget >> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross >> -O ~/bin/make.cross >>chmod +x ~/bin/make.cross >># save the attached .config to linux build tree >>make.cross ARCH=arm64 >> >> All errors (new ones prefixed by >>): >> >> In file included from drivers/net/ethernet/hisilicon/hns/hnae.c:15:0: drivers/net/ethernet/hisilicon/hns/hnae.h:465:2: error: unknown type name 'phy_interface_t' >> phy_interface_t phy_if; >> ^ >> >> vim +/phy_interface_t +465 drivers/net/ethernet/hisilicon/hns/hnae.h > > Hi Jiri, > Looks like hnae.c needs to do "#include " directly. > Cc'ing maintainer. > Thanks! We will send the fix patch soon. Best Regards, Wei > >> >> 6fe6611f huangdaode 2015-09-17 449 struct hnae_ae_dev { >> 6fe6611f huangdaode 2015-09-17 450 struct device cls_dev; /* the >> class dev */ >> 6fe6611f huangdaode 2015-09-17 451 struct device *dev; /* the >> presented dev */ >> 6fe6611f huangdaode 2015-09-17 452 struct hnae_ae_ops *ops; >> 6fe6611f huangdaode 2015-09-17 453 struct list_head node; >> 6fe6611f huangdaode 2015-09-17 454 struct module *owner; /* the >> module who provides this dev */ >> 6fe6611f huangdaode 2015-09-17 455 int id; >> 6fe6611f huangdaode 2015-09-17 456 char name[AE_NAME_SIZE]; >> 6fe6611f huangdaode 2015-09-17 457 struct list_head handle_list; >> 6fe6611f huangdaode 2015-09-17 458 spinlock_t lock; /* lock to >> protect the handle_list */ >> 6fe6611f huangdaode 2015-09-17 459 }; >> 6fe6611f huangdaode 2015-09-17 460 >> 6fe6611f huangdaode 2015-09-17 461 struct hnae_handle { >> 6fe6611f huangdaode 2015-09-17 462 struct device *owner_dev; /* >> the device which make use of this handle */ >> 6fe6611f huangdaode 2015-09-17 463 struct hnae_ae_dev *dev; /* >> the device who provides this handle */ >> 6fe6611f huangdaode 2015-09-17 464 struct device_node *phy_node; >> 6fe6611f huangdaode 2015-09-17 @465 phy_interface_t phy_if; >> 6fe6611f huangdaode 2015-09-17 466 u32 if_support; >> 6fe6611f huangdaode 2015-09-17 467 int q_num; >> 6fe6611f huangdaode 2015-09-17 468 int vf_id; >> 6fe6611f huangdaode 2015-09-17 469 u32 eport_id; >> 6fe6611f huangdaode 2015-09-17 470 enum hnae_port_type port_type; >> 6fe6611f huangdaode 2015-09-17 471 struct list_head node;/* >> list to hnae_ae_dev->handle_list */ >> 6fe6611f huangdaode 2015-09-17 472 struct hnae_buf_ops *bops; /* >> operation for the buffer */ >> 6fe6611f huangdaode 2015-09-17 473 struct hnae_queue **qs; /* >> array base of all queues */ >> >> :: The code at line 465 was first introduced by commit >> :: 6fe6611ff275522a4e4c0359e2f46cdd07780d2f net: add Hisilicon Network >> Subsystem hnae framework support >> >> :: TO: huangdaode>> :: CC: David S. Miller >> >> --- >> 0-DAY kernel test infrastructureOpen Source Technology Center >> https://lists.01.org/pipermail/kbuild-all Intel Corporation > > > > . > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] bridge/netfilter: avoid unused label warning
From: Arnd BergmannDate: Tue, 06 Oct 2015 21:22:12 +0200 > With the ARM mini2440_defconfig, the bridge netfilter code gets > built with both CONFIG_NF_DEFRAG_IPV4 and CONFIG_NF_DEFRAG_IPV6 > disabled, which leads to a harmless gcc warning: > > net/bridge/br_netfilter_hooks.c: In function 'br_nf_dev_queue_xmit': > net/bridge/br_netfilter_hooks.c:792:2: warning: label 'drop' defined but not > used [-Wunused-label] > > This gets rid of the warning by cleaning up the code to avoid > the respective #ifdefs causing this problem, and replacing them > with if(IS_ENABLED()) checks. I have verified that the resulting > object code is unchanged, and an additional advantage is that > we now get compile coverage of the unused functions in more > configurations. > > Signed-off-by: Arnd Bergmann > Fixes: dd302b59bde0 ("netfilter: bridge: don't leak skb in error paths") This commit is in v4.2-rc3 and later, but this patch only applies to net-next as far as I can tell. Wouldn't it be better to base this on 'net', or even better Pablo's netfilter fixes tree, and while you are at it submit it properly to netfilter-devel with Pablo CC:'d as well? Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 3/6] net: remove dsa.h include from linux/netdevice.h
Thu, Oct 08, 2015 at 02:11:11PM CEST, huangda...@hisilicon.com wrote: >On 2015/10/8 17:18, Jiri Pirko wrote: >>Thu, Oct 08, 2015 at 11:04:48AM CEST, l...@intel.com wrote: >>>Hi Vivien, >>> >>>[auto build test ERROR on net-next/master -- if it's inappropriate base, >>>please ignore] >>> >>>config: arm64-allyesconfig (attached as .config) >>>reproduce: >>>wget >>> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross >>> -O ~/bin/make.cross >>>chmod +x ~/bin/make.cross >>># save the attached .config to linux build tree >>>make.cross ARCH=arm64 >>> >>>All errors (new ones prefixed by >>): >>> >>> In file included from drivers/net/ethernet/hisilicon/hns/hnae.c:15:0: >drivers/net/ethernet/hisilicon/hns/hnae.h:465:2: error: unknown type name >'phy_interface_t' >>> phy_interface_t phy_if; >>> ^ >>> >>>vim +/phy_interface_t +465 drivers/net/ethernet/hisilicon/hns/hnae.h >> >>Looks like hnae.c needs to do "#include " directly. >>Cc'ing maintainer. >> >> >>>6fe6611f huangdaode 2015-09-17 449 struct hnae_ae_dev { >>>6fe6611f huangdaode 2015-09-17 450 struct device cls_dev; /* the >>>class dev */ >>>6fe6611f huangdaode 2015-09-17 451 struct device *dev; /* the >>>presented dev */ >>>6fe6611f huangdaode 2015-09-17 452 struct hnae_ae_ops *ops; >>>6fe6611f huangdaode 2015-09-17 453 struct list_head node; >>>6fe6611f huangdaode 2015-09-17 454 struct module *owner; /* the >>>module who provides this dev */ >>>6fe6611f huangdaode 2015-09-17 455 int id; >>>6fe6611f huangdaode 2015-09-17 456 char name[AE_NAME_SIZE]; >>>6fe6611f huangdaode 2015-09-17 457 struct list_head handle_list; >>>6fe6611f huangdaode 2015-09-17 458 spinlock_t lock; /* lock to >>>protect the handle_list */ >>>6fe6611f huangdaode 2015-09-17 459 }; >>>6fe6611f huangdaode 2015-09-17 460 >>>6fe6611f huangdaode 2015-09-17 461 struct hnae_handle { >>>6fe6611f huangdaode 2015-09-17 462 struct device *owner_dev; /* >>>the device which make use of this handle */ >>>6fe6611f huangdaode 2015-09-17 463 struct hnae_ae_dev *dev; /* >>>the device who provides this handle */ >>>6fe6611f huangdaode 2015-09-17 464 struct device_node *phy_node; >>>6fe6611f huangdaode 2015-09-17 @465 phy_interface_t phy_if; >>>6fe6611f huangdaode 2015-09-17 466 u32 if_support; >>>6fe6611f huangdaode 2015-09-17 467 int q_num; >>>6fe6611f huangdaode 2015-09-17 468 int vf_id; >>>6fe6611f huangdaode 2015-09-17 469 u32 eport_id; >>>6fe6611f huangdaode 2015-09-17 470 enum hnae_port_type port_type; >>>6fe6611f huangdaode 2015-09-17 471 struct list_head node;/* >>>list to hnae_ae_dev->handle_list */ >>>6fe6611f huangdaode 2015-09-17 472 struct hnae_buf_ops *bops; /* >>>operation for the buffer */ >>>6fe6611f huangdaode 2015-09-17 473 struct hnae_queue **qs; /* >>>array base of all queues */ >>> >>>:: The code at line 465 was first introduced by commit >>>:: 6fe6611ff275522a4e4c0359e2f46cdd07780d2f net: add Hisilicon Network >>>Subsystem hnae framework support >>> >>>:: TO: huangdaode>>>:: CC: David S. Miller >>> >>>--- >>>0-DAY kernel test infrastructureOpen Source Technology Center >>>https://lists.01.org/pipermail/kbuild-all Intel Corporation >> >>-- >>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >>the body of a message to majord...@vger.kernel.org >>More majordomo info at http://vger.kernel.org/majordomo-info.html >>Please read the FAQ at http://www.tux.org/lkml/ >> >>. >> >Hi Jiri >thanks for your information. i have compiled the latest net-next repo using >your config file, but don't find the error you mentioned. >the attachment is the build log and the config file. > >also, i used the following command to compile, but still fail to reproduce >your issue. >/ daode@Turing-Arch-b:~/work/net-next$ cat build.sh // >//export ARCH=arm64 // >//export CROSS_COMPILE=aarch64-linux-gnu-// >//make allyesconfig// >//make -j16 // >daode@Turing-Arch-b:~/work/net-next$ / > >so could you please help me to reproduce the issue. The patch is not in tree. That does not change the fact that you should include linux/phy.h directly. Please send the patch adding that. Thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net 0/5] Mellanox driver update to 4.3-rc4
Hi Dave, Small set of fixes for net, which includes Carol's patches, a fix from Achiad to have the right behaviour for mlx5 Eth devices w.r.t VLANs in promiscuous mode, a good-bye patch from Ido who left Mellanox and the 1st patch from Jiri to our NIC drivers (I love one-liners)... Or. Achiad Shochat (1): Achiad Shochat (1): net/mlx5e: Disable VLAN filter in promiscuous mode Carol L Soto (2): net/mlx4_core: Avoid failing the interrupts test net/mlx4: Avoid going into legacy completion mode when unnecessary Ido Shamay (1): MAINTAINERS: Update mlx4_en driver entry Jiri Pirko (1): net/mlx5: Fix typo in mlx5_query_port_pvlc MAINTAINERS | 1 - drivers/net/ethernet/mellanox/mlx4/eq.c | 4 drivers/net/ethernet/mellanox/mlx4/main.c | 10 ++ drivers/net/ethernet/mellanox/mlx5/core/en_flow_table.c | 16 ++-- drivers/net/ethernet/mellanox/mlx5/core/port.c | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net 2/5] net/mlx4: Avoid going into legacy completion mode when unnecessary
From: Carol L SotoIf we get MAX_MSIX interrupts we can have each receive ring to get their own msix interrupt line. As such, it's wrong to go into legacy mode on that case, avoid that. Fixes: 9293267a3e2a ('net/mlx4_core: Capping number of requested MSIXs to MAX_MSIX') Signed-off-by: Carol L Soto Acked-by: Matan Barak Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx4/main.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 006757f..cc3a989 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -2669,14 +2669,11 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev) if (msi_x) { int nreq = dev->caps.num_ports * num_online_cpus() + 1; - bool shared_ports = false; nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); - if (nreq > MAX_MSIX) { + if (nreq > MAX_MSIX) nreq = MAX_MSIX; - shared_ports = true; - } entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL); if (!entries) @@ -2699,9 +2696,6 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev) bitmap_zero(priv->eq_table.eq[MLX4_EQ_ASYNC].actv_ports.ports, dev->caps.num_ports); - if (MLX4_IS_LEGACY_EQ_MODE(dev->caps)) - shared_ports = true; - for (i = 0; i < dev->caps.num_comp_vectors + 1; i++) { if (i == MLX4_EQ_ASYNC) continue; @@ -2709,7 +2703,7 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev) priv->eq_table.eq[i].irq = entries[i + 1 - !!(i > MLX4_EQ_ASYNC)].vector; - if (shared_ports) { + if (MLX4_IS_LEGACY_EQ_MODE(dev->caps)) { bitmap_fill(priv->eq_table.eq[i].actv_ports.ports, dev->caps.num_ports); /* We don't set affinity hint when there -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] net: nhs: fix 32-bit build warning
From: Arnd BergmannDate: Tue, 06 Oct 2015 23:53:57 +0200 > The recently added hns driver causes a build warning in ARM > allmodconfig builds: > > drivers/net/ethernet/hisilicon/hns/hnae.c: In function 'handles_show': > drivers/net/ethernet/hisilicon/hns/hnae.c:452:13: warning: cast from pointer > to integer of different size [-Wpointer-to-int-cast] > j, (u64)h->qs[i]->io_base); > ^ > > This removes the pointless cast and prints the pointer address using > the "%p" format string in all three locations. > > Signed-off-by: Arnd Bergmann Applied with subject typo fixed, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] Do not set shared_ports when nreq > MAX_MSIX
From: Carol SotoDate: Tue, 6 Oct 2015 16:46:06 -0500 > > > On 10/6/2015 4:39 PM, Or Gerlitz wrote: >> On Wed, Oct 7, 2015 at 12:27 AM, wrote: >>> From: Carol L Soto >>> >>> If we get MAX_MSIX interrupts would like to have each receive ring >>> with his own msix interrupt line. >> so 9293267a3e2a was only partially correct? and/or not fully optimal? >> please elaborate more on that in your change log. > just not fully optimal, with commit 9293267a3e2a if I have 64 MSIXs > and 2 ports I can get 8 rings for each port but then the rings will > share the interrupt lines. For 64 MSIXs we can have each ring with his > own interrupt line. > >>> Fixes: 9293267a3e2a ('net/mlx4_core: Capping number of requested MSIXs >>> to MAX_MSIX') >>> Signed-off-by: Carol L Soto >> Carol, you didn't use net/mlx4: prefix as ask for mlx4 driver patch >> titles, so please repost, but before that I'd like to see an ack from >> Matan for this patch as well. > Sorry completely missed it. When Matan acks will resend it. Also please fix you subject to have a proper "mlx4: " subsystem prefix. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] bridge/netfilter: avoid unused label warning
On Thursday 08 October 2015 04:42:53 David Miller wrote: > From: Arnd Bergmann> Date: Tue, 06 Oct 2015 21:22:12 +0200 > > > With the ARM mini2440_defconfig, the bridge netfilter code gets > > built with both CONFIG_NF_DEFRAG_IPV4 and CONFIG_NF_DEFRAG_IPV6 > > disabled, which leads to a harmless gcc warning: > > > > net/bridge/br_netfilter_hooks.c: In function 'br_nf_dev_queue_xmit': > > net/bridge/br_netfilter_hooks.c:792:2: warning: label 'drop' defined but > > not used [-Wunused-label] > > > > This gets rid of the warning by cleaning up the code to avoid > > the respective #ifdefs causing this problem, and replacing them > > with if(IS_ENABLED()) checks. I have verified that the resulting > > object code is unchanged, and an additional advantage is that > > we now get compile coverage of the unused functions in more > > configurations. > > > > Signed-off-by: Arnd Bergmann > > Fixes: dd302b59bde0 ("netfilter: bridge: don't leak skb in error paths") > > This commit is in v4.2-rc3 and later, but this patch only applies to net-next > as far as I can tell. > > Wouldn't it be better to base this on 'net', or even better Pablo's netfilter > fixes tree, and while you are at it submit it properly to netfilter-devel > with Pablo CC:'d as well? Ok, done. Arnd -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next v3] BNX2: fix a Null Pointer for stats_blk
we have two processes to do: P1#: ifconfig eth0 down; which will call bnx2_close, then will , and set Null to stats_blk P2#: ifconfig eth0; which will call bnx2_get_stats64, it will use stats_blk. In one case: --P1#-- --P2#-- stats_blk(no null) bnx2_free_mem ->bp->stats_blk = NULL GET_64BIT_NET_STATS then it will cause 'NULL Pointer' Problem. it is as well with 'ethtool -S ethx'. Allocate the statistics block at probe time so that this problem is impossible Signed-off-by: Wang Weidong--- Change in v2: - Use Allocate the statistics block instead of spinlock, which suggested by David Miller. - Updating commit message according to changes. Change in v3: - bnx2_alloc_stats_blk is just allocating the stats block. - use 'bp->status_blk' to store the status_blk which would used in other funcs, just to key the codes simplified. --- drivers/net/ethernet/broadcom/bnx2.c | 79 drivers/net/ethernet/broadcom/bnx2.h | 1 + 2 files changed, 53 insertions(+), 27 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 2b66ef3..6259064 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -813,6 +813,46 @@ bnx2_alloc_rx_mem(struct bnx2 *bp) } static void +bnx2_free_stats_blk(struct net_device *dev) +{ + struct bnx2 *bp = netdev_priv(dev); + + if (bp->status_blk) { + dma_free_coherent(>pdev->dev, bp->status_stats_size, + bp->status_blk, + bp->status_blk_mapping); + bp->status_blk = NULL; + bp->stats_blk = NULL; + } +} + +static int +bnx2_alloc_stats_blk(struct net_device *dev) +{ + int status_blk_size; + void *status_blk; + struct bnx2 *bp = netdev_priv(dev); + + /* Combine status and statistics blocks into one allocation. */ + status_blk_size = L1_CACHE_ALIGN(sizeof(struct status_block)); + if (bp->flags & BNX2_FLAG_MSIX_CAP) + status_blk_size = L1_CACHE_ALIGN(BNX2_MAX_MSIX_HW_VEC * +BNX2_SBLK_MSIX_ALIGN_SIZE); + bp->status_stats_size = status_blk_size + + sizeof(struct statistics_block); + status_blk = dma_zalloc_coherent(>pdev->dev, bp->status_stats_size, +>status_blk_mapping, GFP_KERNEL); + if (status_blk == NULL) + return -ENOMEM; + + bp->status_blk = status_blk; + bp->stats_blk = status_blk + status_blk_size; + bp->stats_blk_mapping = bp->status_blk_mapping + status_blk_size; + + return 0; +} + +static void bnx2_free_mem(struct bnx2 *bp) { int i; @@ -829,37 +869,19 @@ bnx2_free_mem(struct bnx2 *bp) bp->ctx_blk[i] = NULL; } } - if (bnapi->status_blk.msi) { - dma_free_coherent(>pdev->dev, bp->status_stats_size, - bnapi->status_blk.msi, - bp->status_blk_mapping); + + if (bnapi->status_blk.msi) bnapi->status_blk.msi = NULL; - bp->stats_blk = NULL; - } } static int bnx2_alloc_mem(struct bnx2 *bp) { - int i, status_blk_size, err; + int i, err; struct bnx2_napi *bnapi; - void *status_blk; - - /* Combine status and statistics blocks into one allocation. */ - status_blk_size = L1_CACHE_ALIGN(sizeof(struct status_block)); - if (bp->flags & BNX2_FLAG_MSIX_CAP) - status_blk_size = L1_CACHE_ALIGN(BNX2_MAX_MSIX_HW_VEC * -BNX2_SBLK_MSIX_ALIGN_SIZE); - bp->status_stats_size = status_blk_size + - sizeof(struct statistics_block); - - status_blk = dma_zalloc_coherent(>pdev->dev, bp->status_stats_size, ->status_blk_mapping, GFP_KERNEL); - if (status_blk == NULL) - goto alloc_mem_err; bnapi = >bnx2_napi[0]; - bnapi->status_blk.msi = status_blk; + bnapi->status_blk.msi = bp->status_blk; bnapi->hw_tx_cons_ptr = >status_blk.msi->status_tx_quick_consumer_index0; bnapi->hw_rx_cons_ptr = @@ -870,7 +892,7 @@ bnx2_alloc_mem(struct bnx2 *bp) bnapi = >bnx2_napi[i]; - sblk = (status_blk + BNX2_SBLK_MSIX_ALIGN_SIZE * i); + sblk = (bp->status_blk + BNX2_SBLK_MSIX_ALIGN_SIZE * i); bnapi->status_blk.msix = sblk; bnapi->hw_tx_cons_ptr = >status_tx_quick_consumer_index; @@ -880,10 +902,6 @@ bnx2_alloc_mem(struct bnx2 *bp) } } -
Re: [PATCH] ip: find correct route for socket which is not bound (v2)
From: Wengang WangDate: Thu, 8 Oct 2015 11:31:05 +0800 > Any comment on this patch? I'm still thinking about it, so if nobody else chimes in with a review that convinces me one way or another you will just have to patiently wait for me. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next v3 1/2] regmap: Allow installing custom reg_update_bits function
From: Mark BrownDate: Tue, 6 Oct 2015 17:30:11 +0100 > On Thu, Oct 01, 2015 at 12:38:07PM -0400, j...@ringle.org wrote: >> From: Jon Ringle >> >> This commit allows installing a custom reg_update_bits function for cases >> where >> the hardware provides a mechanism to set or clear register bits without a >> read/modify/write cycle. Such is the case with the Microchip ENCX24J600. > > Thanks, I've applied this. I'll extend it so that individual devices > can do this as well - I've not looked at your driver but it might be > that this is a better option than regmap_bus for your driver (but both > are supported so meh). Dave, I've tagged the commit and there's a pull > request for this below: > > The following changes since commit 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f: > > Linux 4.3-rc1 (2015-09-12 16:35:56 -0700) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git > tags/regmap-offload-update-bits I've pulled this into my 'net-next' tree, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] af_unix: introduce unix_sk_const helper
From: Arnd BergmannDate: Tue, 06 Oct 2015 22:52:46 +0200 > Commit 124613012db1 ("af_unix: Convert the unix_sk macro to an inline > function for type safety") was recently added to catch incorrect > uses of the unix_sk helper using compiler warnings. > > It has now caught one such case in lsm_audit.c. The code is technically > correct, but as it converts a const pointer to a non-const pointer, > the annotation got lost, which gcc now warns about. > > This patch avoids the warning by introducing an additional helper > that has const input and output, which makes the lsm_audit code build > cleanly again. > > Signed-off-by: Arnd Bergmann > --- > I'm not entirely happy with this workaround myself, but could not come > up with a better one. You can make the argument unconditionally const, as Paul Moore has done in a separate patch submission. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] net/mlx4: Remove shared_ports variable at mlx4_enable_msi_x
From: cls...@linux.vnet.ibm.com Date: Wed, 7 Oct 2015 12:31:46 -0400 > From: Carol L Soto> > If we get MAX_MSIX interrupts would like to have each receive ring > with his own msix interrupt line. Do not need the shared_ports > variable at mlx4_enable_msix > > Fixes: 9293267a3e2a ('net/mlx4_core: Capping number of requested MSIXs to > MAX_MSIX') > Signed-off-by: Carol L Soto > Acked-by: Matan Barak Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 00/16] net: Pass net through the output path v2
Le 07/10/2015 23:46, Eric W. Biederman a écrit : This is the next installment of my work to pass struct net through the output path so the code does not need to guess how to figure out which network namespace it is in, and ultimately routes can have output devices in another network namespace. The first patch in this series is a fix for a bug that came in when sk was passed through the functions in the output path, and as such is probably a candidate for net. At the same time my later patches depend on it so sending the fix separately would be confusing. The second patch in this series is another fix that for an issue that came in when sk was passed through the output path. I don't think it needs a backport as I don't think anyone uses the path where the code was incorrect. The rest of the patchset focuses on the path from xxx_local_out to dst_output and in the end succeeds in passing sock_net(sk) from the socket a packet locally originates on to the dst->output function. LGTM. Acked-by: Nicolas Dichtel-- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] fix return of iptunnel_xmit
Hi Andreas, [auto build test WARNING on net/master -- if it's inappropriate base, please ignore] config: microblaze-mmu_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=microblaze All warnings (new ones prefixed by >>): net/ipv4/ip_tunnel_core.c: In function 'iptunnel_xmit': >> net/ipv4/ip_tunnel_core.c:55:6: warning: unused variable 'pkt_len' >> [-Wunused-variable] int pkt_len = skb->len - skb_inner_network_offset(skb); ^ vim +/pkt_len +55 net/ipv4/ip_tunnel_core.c 0e6fbc5b Pravin B Shelar 2013-06-17 39 #include 0e6fbc5b Pravin B Shelar 2013-06-17 40 #include 0e6fbc5b Pravin B Shelar 2013-06-17 41 #include 0e6fbc5b Pravin B Shelar 2013-06-17 42 #include 0e6fbc5b Pravin B Shelar 2013-06-17 43 #include 0e6fbc5b Pravin B Shelar 2013-06-17 44 #include 0e6fbc5b Pravin B Shelar 2013-06-17 45 #include 0e6fbc5b Pravin B Shelar 2013-06-17 46 #include 0e6fbc5b Pravin B Shelar 2013-06-17 47 #include 0e6fbc5b Pravin B Shelar 2013-06-17 48 #include 63d008a4 Jiri Benc 2015-09-22 49 #include 0e6fbc5b Pravin B Shelar 2013-06-17 50 aad88724 Eric Dumazet2014-04-15 51 int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, 0e6fbc5b Pravin B Shelar 2013-06-17 52 __be32 src, __be32 dst, __u8 proto, 963a88b3 Nicolas Dichtel 2013-09-02 53 __u8 tos, __u8 ttl, __be16 df, bool xnet) 0e6fbc5b Pravin B Shelar 2013-06-17 54 { bc22a0e2 Nicolas Dichtel 2015-09-18 @55 int pkt_len = skb->len - skb_inner_network_offset(skb); 0e6fbc5b Pravin B Shelar 2013-06-17 56 struct iphdr *iph; 0e6fbc5b Pravin B Shelar 2013-06-17 57 963a88b3 Nicolas Dichtel 2013-09-02 58 skb_scrub_packet(skb, xnet); 963a88b3 Nicolas Dichtel 2013-09-02 59 7539fadc Tom Herbert 2013-12-15 60 skb_clear_hash(skb); 0e6fbc5b Pravin B Shelar 2013-06-17 61 skb_dst_set(skb, >dst); 0e6fbc5b Pravin B Shelar 2013-06-17 62 memset(IPCB(skb), 0, sizeof(*IPCB(skb))); 0e6fbc5b Pravin B Shelar 2013-06-17 63 :: The code at line 55 was first introduced by commit :: bc22a0e2ea03b75b51a1f722f93821744b5b5ff1 iptunnel: make rx/tx bytes counters consistent :: TO: Nicolas Dichtel:: CC: David S. Miller --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data
Re: [PATCH net-next 00/16] net: Pass net through the output path v2
From: ebied...@xmission.com (Eric W. Biederman) Date: Wed, 07 Oct 2015 16:46:49 -0500 > This is the next installment of my work to pass struct net through the > output path so the code does not need to guess how to figure out which > network namespace it is in, and ultimately routes can have output > devices in another network namespace. Seires applied, thanks Eric. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 0/5] Add support for Broadcom's iProc MDIO and Cygnus Ethernet PHY
From: Arun ParameswaranDate: Tue, 6 Oct 2015 12:25:45 -0700 > This patchset adds support for the iProc MDIO interface and the > Broadcom Cygnus SoC's internal Ethernet PHY. Series applied to net-next, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next v4] net: Microchip encx24j600 driver
From: j...@ringle.org Date: Tue, 6 Oct 2015 16:37:46 -0400 > From: Jon Ringle> > This ethernet driver supports the Micorchip enc424j600/626j600 Ethernet > controller over a SPI bus interface. This driver makes use of the regmap API > to > optimize access to registers by caching registers where possible. > > Datasheet: > http://ww1.microchip.com/downloads/en/DeviceDoc/39935b.pdf > > Signed-off-by: Jon Ringle > --- > > This patch requires that the pull request from Mark be applied first: > git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git > tags/regmap-offload-update-bits Applied, thanks Jon. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net] bpf: clear sender_cpu before xmit
From: Alexei StarovoitovDate: Tue, 6 Oct 2015 20:46:07 -0700 > Similar to commit c29390c6dfee ("xps: must clear sender_cpu before > forwarding") > the skb->sender_cpu needs to be cleared before xmit. > > Fixes: 3896d655f4d4 ("bpf: introduce bpf_clone_redirect() helper") > Signed-off-by: Alexei Starovoitov Applied and queued up for -stable. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] Do not set shared_ports when nreq > MAX_MSIX
On 10/8/2015 2:54 PM, David Miller wrote: Also please fix you subject to have a proper "mlx4: " subsystem prefix. Carol, I have the patch and will submit it with other fixes that we have. Or. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next] net: synack packets can be attached to request sockets
From: Eric Dumazetselinux needs few changes to accommodate fact that SYNACK messages can be attached to a request socket, lacking sk_security pointer (Only syncookies are still attached to a TCP_LISTEN socket) Adds a new sk_listener() helper, and use it in selinux and sch_fq Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener") Signed-off-by: Eric Dumazet Reported by: kernel test robot Cc: Paul Moore Cc: Stephen Smalley Cc: Eric Paris --- include/net/sock.h |8 net/sched/sch_fq.c |3 ++- security/selinux/hooks.c | 12 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index dfe2eb8e1132..771ca1996442 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2201,6 +2201,14 @@ static inline bool sk_fullsock(const struct sock *sk) return (1 << sk->sk_state) & ~(TCPF_TIME_WAIT | TCPF_NEW_SYN_RECV); } +/* This helper checks if a socket is a LISTEN or NEW_SYN_RECV + * SYNACK messages can be attached to either ones (depending on SYNCOOKIE) + */ +static inline bool sk_listener(const struct sock *sk) +{ + return (1 << sk->sk_state) & (TCPF_LISTEN | TCPF_NEW_SYN_RECV); +} + void sock_enable_timestamp(struct sock *sk, int flag); int sock_get_timestamp(struct sock *, struct timeval __user *); int sock_get_timestampns(struct sock *, struct timespec __user *); diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c index 3386cce4751e..109b2322778f 100644 --- a/net/sched/sch_fq.c +++ b/net/sched/sch_fq.c @@ -225,6 +225,7 @@ static struct fq_flow *fq_classify(struct sk_buff *skb, struct fq_sched_data *q) return >internal; /* SYNACK messages are attached to a TCP_NEW_SYN_RECV request socket +* or a listener (SYNCOOKIE mode) * 1) request sockets are not full blown, *they do not contain sk_pacing_rate * 2) They are not part of a 'flow' yet @@ -232,7 +233,7 @@ static struct fq_flow *fq_classify(struct sk_buff *skb, struct fq_sched_data *q) *especially if the listener set SO_MAX_PACING_RATE * 4) We pretend they are orphaned */ - if (!sk || sk->sk_state == TCP_NEW_SYN_RECV) { + if (!sk || sk_listener(sk)) { unsigned long hash = skb_get_hash(skb) & q->orphan_mask; /* By forcing low order bit to 1, we make sure to not diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 64340160f4ac..6e50841ef1f6 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -4898,7 +4898,7 @@ static unsigned int selinux_ip_output(struct sk_buff *skb, if (sk) { struct sk_security_struct *sksec; - if (sk->sk_state == TCP_LISTEN) + if (sk_listener(sk)) /* if the socket is the listening state then this * packet is a SYN-ACK packet which means it needs to * be labeled based on the connection/request_sock and @@ -5005,7 +5005,7 @@ static unsigned int selinux_ip_postroute(struct sk_buff *skb, * unfortunately, this means more work, but it is only once per * connection. */ if (skb_dst(skb) != NULL && skb_dst(skb)->xfrm != NULL && - !(sk != NULL && sk->sk_state == TCP_LISTEN)) + !(sk && sk_listener(sk))) return NF_ACCEPT; #endif @@ -5022,7 +5022,7 @@ static unsigned int selinux_ip_postroute(struct sk_buff *skb, secmark_perm = PACKET__SEND; peer_sid = SECINITSID_KERNEL; } - } else if (sk->sk_state == TCP_LISTEN) { + } else if (sk_listener(sk)) { /* Locally generated packet but the associated socket is in the * listening state which means this is a SYN-ACK packet. In * this particular case the correct security label is assigned @@ -5033,7 +5033,11 @@ static unsigned int selinux_ip_postroute(struct sk_buff *skb, * selinux_inet_conn_request(). See also selinux_ip_output() * for similar problems. */ u32 skb_sid; - struct sk_security_struct *sksec = sk->sk_security; + struct sk_security_struct *sksec; + + if (sk->sk_state == TCP_NEW_SYN_RECV) + sk = inet_reqsk(sk)->rsk_listener; + sksec = sk->sk_security; if (selinux_skb_peerlbl_sid(skb, family, _sid)) return NF_DROP; /* At this point, if the returned skb peerlbl is SECSID_NULL -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at
Re: [PATCH net-next v2 0/5] BPF/random32 updates
From: Daniel BorkmannDate: Thu, 8 Oct 2015 01:20:34 +0200 > BPF update to split the prandom state apart, and to move the > *once helpers to the core. For details, please see individual > patches. Given the changes and since it's in the tree for > quite some time, net-next is a better choice in our opinion. > > v1 -> v2: > - Make DO_ONCE() type-safe, remove the kvec helper. Credits >go to Alexei Starovoitov for the __VA_ARGS__ hint, thanks! > - Add a comment to the DO_ONCE() helper as suggested by Alexei. > - Rework prandom_init_once() helper to the new API. > - Keep Alexei's Acked-by on the last patch. Series applied, thanks everyone. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net 5/5] MAINTAINERS: Update mlx4_en driver entry
From: Ido ShamayRemove Ido Shamay as co-maintainer for the mlx4 Ethernet driver, as he no longer works for Mellanox. Signed-off-by: Ido Shamay Signed-off-by: Or Gerlitz --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 797236b..4bdc1bd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6778,7 +6778,6 @@ F:drivers/scsi/megaraid/ MELLANOX ETHERNET DRIVER (mlx4_en) M: Amir Vadai -M: Ido Shamay L: netdev@vger.kernel.org S: Supported W: http://www.mellanox.com -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net 3/5] net/mlx5: Fix typo in mlx5_query_port_pvlc
From: Jiri PirkoWe used the wrong register name for querying the PVLC register Fixes: a124d13ef59e ('net/mlx5_core: Add more query port helpers') Signed-off-by: Jiri Pirko Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx5/core/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c b/drivers/net/ethernet/mellanox/mlx5/core/port.c index 821caaa..3b9480f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/port.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c @@ -311,7 +311,7 @@ static int mlx5_query_port_pvlc(struct mlx5_core_dev *dev, u32 *pvlc, int err; memset(in, 0, sizeof(in)); - MLX5_SET(ptys_reg, in, local_port, local_port); + MLX5_SET(pvlc_reg, in, local_port, local_port); err = mlx5_core_access_reg(dev, in, sizeof(in), pvlc, pvlc_size, MLX5_REG_PVLC, 0, 0); -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net 1/5] net/mlx4_core: Avoid failing the interrupts test
From: Carol L SotoTest interrupts fails if not all completion vectors called request_irq. This case happens if only mlx4_en is loaded and we have more completion vectors than rx rings. Fixes: c66fa19c405a ('net/mlx4: Add EQ pool') Signed-off-by: Carol L Soto Acked-by: Matan Barak Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx4/eq.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c index 8e81e53..c344884 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c @@ -1364,6 +1364,10 @@ int mlx4_test_interrupts(struct mlx4_dev *dev) * and performing a NOP command */ for(i = 0; !err && (i < dev->caps.num_comp_vectors); ++i) { + /* Make sure request_irq was called */ + if (!priv->eq_table.eq[i].have_irq) + continue; + /* Temporary use polling for command completions */ mlx4_cmd_use_polling(dev); -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net 4/5] net/mlx5e: Disable VLAN filter in promiscuous mode
From: Achiad ShochatWhen the device was set to promiscuous mode, we didn't disable VLAN filtering, which is wrong behaviour, fix that. Now when the device is set to promiscuous mode RX packets sent over any VLAN (or no VLAN tag at all) will be accepted. Signed-off-by: Achiad Shochat Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx5/core/en_flow_table.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_flow_table.c b/drivers/net/ethernet/mellanox/mlx5/core/en_flow_table.c index e71563c..22d603f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_flow_table.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_flow_table.c @@ -598,6 +598,8 @@ void mlx5e_enable_vlan_filter(struct mlx5e_priv *priv) return; priv->vlan.filter_disabled = false; + if (priv->netdev->flags & IFF_PROMISC) + return; mlx5e_del_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_VID, 0); } @@ -607,6 +609,8 @@ void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv) return; priv->vlan.filter_disabled = true; + if (priv->netdev->flags & IFF_PROMISC) + return; mlx5e_add_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_VID, 0); } @@ -717,8 +721,12 @@ void mlx5e_set_rx_mode_work(struct work_struct *work) bool enable_broadcast = !ea->broadcast_enabled && broadcast_enabled; bool disable_broadcast = ea->broadcast_enabled && !broadcast_enabled; - if (enable_promisc) + if (enable_promisc) { mlx5e_add_eth_addr_rule(priv, >promisc, MLX5E_PROMISC); + if (!priv->vlan.filter_disabled) + mlx5e_add_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_VID, + 0); + } if (enable_allmulti) mlx5e_add_eth_addr_rule(priv, >allmulti, MLX5E_ALLMULTI); if (enable_broadcast) @@ -730,8 +738,12 @@ void mlx5e_set_rx_mode_work(struct work_struct *work) mlx5e_del_eth_addr_from_flow_table(priv, >broadcast); if (disable_allmulti) mlx5e_del_eth_addr_from_flow_table(priv, >allmulti); - if (disable_promisc) + if (disable_promisc) { + if (!priv->vlan.filter_disabled) + mlx5e_del_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_VID, + 0); mlx5e_del_eth_addr_from_flow_table(priv, >promisc); + } ea->promisc_enabled = promisc_enabled; ea->allmulti_enabled = allmulti_enabled; -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] bridge/netfilter: avoid unused label warning
On 10/08/2015 02:30 PM, Arnd Bergmann wrote: > With the ARM mini2440_defconfig, the bridge netfilter code gets > built with both CONFIG_NF_DEFRAG_IPV4 and CONFIG_NF_DEFRAG_IPV6 > disabled, which leads to a harmless gcc warning: > > net/bridge/br_netfilter_hooks.c: In function 'br_nf_dev_queue_xmit': > net/bridge/br_netfilter_hooks.c:792:2: warning: label 'drop' defined but not > used [-Wunused-label] > > This gets rid of the warning by cleaning up the code to avoid > the respective #ifdefs causing this problem, and replacing them > with if(IS_ENABLED()) checks. I have verified that the resulting > object code is unchanged, and an additional advantage is that > we now get compile coverage of the unused functions in more > configurations. > > Signed-off-by: Arnd Bergmann> Fixes: dd302b59bde0 ("netfilter: bridge: don't leak skb in error paths") > --- > Version 2: > > Rebased to git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next > Looks good to me, Reviewed-by: Nikolay Aleksandrov -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch net-next RFC 3/3] switchdev: introduce deferred variants of obj_add/del helpers
Thu, Oct 08, 2015 at 10:28:58AM CEST, j...@resnulli.us wrote: >Thu, Oct 08, 2015 at 08:45:58AM CEST, gerlitz...@gmail.com wrote: >>On Wed, Oct 7, 2015 at 9:30 PM, Jiri Pirkowrote: >>> From: Jiri Pirko >>> >>> Similar to the attr usecase, the caller knows if he is holding RTNL and is >>> in atomic section. So let the called to decide the correct call variant. >>> >>> This allows drivers to sleep inside their ops and wait for hw to get the >>> operation status. Then the status is propagated into switchdev core. >>> This avoids silent errors in drivers. >>> >>> Signed-off-by: Jiri Pirko >> >>> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c >>> index 7f7d551..2086767 100644 >>> --- a/net/bridge/br_fdb.c >>> +++ b/net/bridge/br_fdb.c >>> @@ -139,7 +139,7 @@ static void fdb_del_external_learn(struct >>> net_bridge_fdb_entry *f) >>> .vid = f->vlan_id, >>> }; >>> >>> - switchdev_port_obj_del(f->dst->dev, ); >>> + switchdev_port_obj_del_deferred(f->dst->dev, ); >>> } >> >> >>> static void fdb_delete(struct net_bridge *br, struct net_bridge_fdb_entry >>> *f) >>> diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c >>> index c29f4ee..49e6e6f 100644 >>> --- a/net/switchdev/switchdev.c >>> +++ b/net/switchdev/switchdev.c >>> @@ -362,6 +362,75 @@ int switchdev_port_obj_add(struct net_device *dev, >>> } >>> EXPORT_SYMBOL_GPL(switchdev_port_obj_add); >>> >>> +struct switchdev_obj_work { >>> + struct work_struct work; >>> + struct net_device *dev; >>> + struct switchdev_obj obj; >>> + bool add; /* add of del */ >>> +}; >>> + >>> +static void switchdev_port_obj_work(struct work_struct *work) >>> +{ >>> + struct switchdev_obj_work *ow = >>> + container_of(work, struct switchdev_obj_work, work); >>> + int err; >>> + >>> + rtnl_lock(); >>> + if (ow->add) >>> + err = switchdev_port_obj_add(ow->dev, >obj); >>> + else >>> + err = switchdev_port_obj_del(ow->dev, >obj); >>> + if (err && err != -EOPNOTSUPP) >>> + netdev_err(ow->dev, "failed (err=%d) to %s object >>> (id=%d)\n", >>> + err, ow->add ? "add" : "del", ow->obj.id); >> >>This introduced a regression to the 2-phase commit scheme, since the >>prepare commit can fail >>and that would go un-noticed toward the upper layer, agree? > >Well, no. This still does the transaction for all lower devices in one >go. No change in that. > Now I get it, yes you are right. But currently there is no code in kernel which would control retval of deferred attr_set or obj_add/del -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 0/6] net: dsa: push switchdev prepare phase in FDB ops
Hi David, On Oct. Thursday 08 (41) 05:28 AM, David Miller wrote: > From: Vivien Didelot> Date: Wed, 7 Oct 2015 19:48:25 -0400 > > > The first 3 patches removes the dsa.h include from linux/netdevice.h, which > > broke the inclusion of switchdev.h in dsa.h. > > I still don't agree with bloating up struct netdevice just to deal with > an include file ordering issue, sorry. Yes, I just saw your reply on the first version. I will resend the patchset with the forward declarations instead. But looking at the issue that Jiri and the kbuild bot pointed out earlier in the thread, we must agree that having the DSA header in netdevice.h is wrong. There are 2 points to note here: * checking a "rcv" member of a DSA-specific structure to anwser the question "does this interface uses hardware-inserted tag?" is not generic and not robust at all. * the "dsa_ptr" of net_device is just used to access the dsa_switch_tree from DSA packet_type receive functions. There must be another way to pass it, maybe from a netdev_priv or the packet_type->af_packet_priv? Thanks, -v -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/9] net: small improvement
This patchset makes several functions in net return bool to improve readability and/or simplicity because these functions only use one or zero as their return value. No functional changes. Yaowei Bai (9): net/netlink: lockdep_genl_is_held can be boolean net/ieee80211: ieee80211_is_* can be boolean net/nfnetlink: lockdep_nfnl_is_held can be boolean net/can: can_dropped_invalid_skb can be boolean net/dccp: dccp_list_has_service can be boolean net/dccp: dccp_bad_service_code can be boolean net/inetdevice: inet_ifa_match can be boolean net/inetdevice: bad_mask can be boolean net/core: lockdep_rtnl_is_held can be boolean include/linux/can/dev.h | 6 +-- include/linux/dccp.h| 6 +-- include/linux/genetlink.h | 2 +- include/linux/ieee80211.h | 76 ++--- include/linux/inetdevice.h | 10 ++--- include/linux/netfilter/nfnetlink.h | 6 +-- include/linux/rtnetlink.h | 6 +-- net/core/rtnetlink.c| 2 +- net/dccp/dccp.h | 4 +- net/netfilter/nfnetlink.c | 2 +- net/netlink/genetlink.c | 2 +- 11 files changed, 61 insertions(+), 61 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/9] net/dccp: dccp_list_has_service can be boolean
This patch makes dccp_list_has_service return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai--- include/linux/dccp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 2210254..61d042b 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h @@ -202,16 +202,16 @@ struct dccp_service_list { #define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1) #define DCCP_SERVICE_CODE_IS_ABSENT0 -static inline int dccp_list_has_service(const struct dccp_service_list *sl, +static inline bool dccp_list_has_service(const struct dccp_service_list *sl, const __be32 service) { if (likely(sl != NULL)) { u32 i = sl->dccpsl_nr; while (i--) if (sl->dccpsl_list[i] == service) - return 1; + return true; } - return 0; + return false; } struct dccp_ackvec; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/4] sh_eth: Remove obsolete platform_device_id entries
Hi David, [CC Arnd wearing the arm-soc merge hat] On Thu, Oct 8, 2015 at 2:10 PM, David Millerwrote: > From: Geert Uytterhoeven > Date: Wed, 7 Oct 2015 10:14:13 +0200 > >> Since commit 3d7608e4c169af03 ("ARM: shmobile: bockw: remove legacy >> board file and config"), which is now in arm-soc/for-next, shmobile SoCs >> are only supported in generic DT-only ARM multi-platform builds. >> The sh_eth driver doesn't need to match platform devices by name >> anymore, hence this series removes the corresponding platform_device_id >> entries. >> >> Changes since v1: >> - Protect some data and functions by #ifdef CONFIG_OF to silence >> unused compiler warnings on SH, >> - New patches 3 and 4. > > Since that commit isn't in any of my trees why don't you merge this > via arm-soc/for-next? This series just changes the sh_eth driver. There's no direct dependency on the arm-soc changes. Hence I think the sh_eth changes should go in through the netdev tree. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
pull request: bluetooth-next 2015-10-08
Hi Dave, Here's another set of Bluetooth & 802.15.4 patches for the 4.4 kernel. 802.15.4: - Many improvements & fixes to the mrf24j40 driver - Fixes and cleanups to nl802154, mac802154 & ieee802154 code Bluetooth: - New chipset support in btmrvl driver - Fixes & cleanups to btbcm, btmrvl, bpa10x & btintel drivers - Support for vendor specific diagnostic data through common API - Cleanups to the 6lowpan code - New events & message types for monitor channel Please let me know if there are any issues pulling. Thanks. Johan --- The following changes since commit 97170ea1823bf00cf6ed0f503129e9053a66c53a: drivers/net/ieee802154/at86rf230.c: seq_printf() now returns NULL (2015-09-21 20:41:44 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git for-upstream for you to fetch changes up to f640ee98bbeaa169684a571e0b96bea563bb6015: Bluetooth: Fix basic debugfs entries for unconfigured controllers (2015-10-08 15:33:18 +0300) Alexander Aring (42): mac802154: llsec: fix device deletion from list ieee802154: header_ops: fix frame control setting ieee802154: introduce wpan_dev_header_ops ieee802154: change needed headroom/tailroom mac802154: tx: add warning if MTU exceeds at86rf230: support edge triggered irq mrf24j40: cleanup define identation mrf24j40: use ieee802154_alloc_hw for private data mrf24j40: calling ieee802154_register_hw at last mrf24j40: remove spi settings overwrite mrf24j40: add device-tree support mrf24j40: add default channel setting mrf24j40: add random extended addr generation mrf24j40: add more register defines mrf24j40: add regmap support mrf24j40: use regmap for register access mrf24j40: change to frame delivery with crc ieee802154: add helpers for frame control checks mrf24j40: rework tx handling to async tx handling mrf24j40: rework rx handling to async rx handling mrf24j40: async interrupt handling mrf24j40: add csma params support mrf24j40: add cca mode support mrf24j40: add cca ed level support mrf24j40: add tx power support mrf24j40: add promiscuous mode support mrf24j40: change irq trigger type behaviour mrf24j40: replace magic numbers mrf24j40: remove trailing semicolon ieee802154: remove unnecessary includes mac802154: iface: assume big endian for af_packet netlink: add nla_get for le32 and le64 nl802154: use nla_get_le64 for get extended addr nl802154: add support for security layer mac802154: add comments for llsec issues ieee802154: change mtu size behaviour mac802154: check on len instead mac_len ieee802154: 6lowpan: change datagram var types ieee802154: 6lowpan: don't skip first dsn while fragmentation ieee802154: 6lowpan: add tx/rx stats ieee802154: handle datagram variables as u16 6lowpan: move shared settings to lowpan_netdev_setup Amitkumar Karwar (2): Bluetooth: btmrvl: remove extra space in cast Bluetooth: btmrvl: add sd8997 chipset support Dan Carpenter (1): nl802154: Missing return in nl802154_add_llsec_key() Frederic Danis (5): Bluetooth: Add BT_WARN and bt_dev_warn logging macros Bluetooth: hci_bcm: Fix IRQ polarity for T100 Bluetooth: hci_bcm: Prepare PM runtime support Bluetooth: Remove useless rx_lock spinlock Bluetooth: hci_bcm: Add suspend/resume runtime PM functions Jarkko Nikula (6): Bluetooth: hci_intel: Cleanup the device probe code Bluetooth: hci_bcm: Add missing acpi_dev_free_resource_list() Bluetooth: hci_bcm: Handle possible error from acpi_dev_get_resources() Bluetooth: hci_bcm: Remove needless acpi_match_device() call Bluetooth: hci_bcm: Remove needless looking code Bluetooth: hci_bcm: Do not test ACPI companion in bcm_acpi_probe() Johan Hedberg (6): Bluetooth: 6lowpan: Fix imtu & omtu values Bluetooth: 6lowpan: Remove redundant (and incorrect) MPS assignments Bluetooth: 6lowpan: Remove redundant BT_CONNECTED assignment Bluetooth: 6lowpan: Remove unnecessary chan_open() function Bluetooth: 6lowpan: Rename confusing 'pchan' variables Bluetooth: 6lowpan: Remove unnecessary chan_get() function Loic Poulain (2): Bluetooth: Add hci_cmd_sync function Bluetooth: btintel: Add iBT register access over HCI support Marcel Holtmann (18): Bluetooth: btbcm: Send HCI Reset before sending Apple specific commands Bluetooth: Limit userspace exposure of stack internal events Bluetooth: Introduce HCI_DEV_OPEN and HCI_DEV_CLOSE events Bluetooth: Move HCI_RUNNING check into hci_send_frame Bluetooth: Move handling of HCI_RUNNING flag into core Bluetooth: Send transport open and close monitor events
Re: [patch net-next RFC 3/3] switchdev: introduce deferred variants of obj_add/del helpers
Thu, Oct 08, 2015 at 03:21:44PM CEST, gerlitz...@gmail.com wrote: >On Thu, Oct 8, 2015 at 4:09 PM, Jiri Pirkowrote: >> Thu, Oct 08, 2015 at 10:28:58AM CEST, j...@resnulli.us wrote: >>>Thu, Oct 08, 2015 at 08:45:58AM CEST, gerlitz...@gmail.com wrote: On Wed, Oct 7, 2015 at 9:30 PM, Jiri Pirko wrote: > This introduced a regression to the 2-phase commit scheme, since the prepare commit can fail and that would go un-noticed toward the upper layer, agree? > >>>Well, no. This still does the transaction for all lower devices in one >>>go. No change in that. > >> Now I get it, yes you are right. But currently there is no code in >> kernel which would control retval of deferred attr_set or obj_add/del > >I am not sure to understand your reply. You are saying that when the deferred >procedures complete (e.g fail in the prepare phase) they can't actually let >the upper layer to realize that this change isn't possible? this is >exactly the bug. Correct. But check the code. Callers of current deferred variants do not care about the retval. Therefore this is not a regression. It makes sense in my opinion. If you are a called and you explicitly say to defer the operation, you cannot expect retval. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 0/6] net: dsa: push switchdev prepare phase in FDB ops
Thu, Oct 08, 2015 at 03:32:51PM CEST, vivien.dide...@savoirfairelinux.com wrote: >Hi David, > >On Oct. Thursday 08 (41) 05:28 AM, David Miller wrote: >> From: Vivien Didelot>> Date: Wed, 7 Oct 2015 19:48:25 -0400 >> >> > The first 3 patches removes the dsa.h include from linux/netdevice.h, which >> > broke the inclusion of switchdev.h in dsa.h. >> >> I still don't agree with bloating up struct netdevice just to deal with >> an include file ordering issue, sorry. > >Yes, I just saw your reply on the first version. I will resend the >patchset with the forward declarations instead. > >But looking at the issue that Jiri and the kbuild bot pointed out >earlier in the thread, we must agree that having the DSA header in >netdevice.h is wrong. > >There are 2 points to note here: > >* checking a "rcv" member of a DSA-specific structure to anwser the > question "does this interface uses hardware-inserted tag?" is not > generic and not robust at all. > >* the "dsa_ptr" of net_device is just used to access the dsa_switch_tree > from DSA packet_type receive functions. There must be another way to > pass it, maybe from a netdev_priv or the packet_type->af_packet_priv? I sent previously patch for this: http://patchwork.ozlabs.org/patch/336940/ So now my patch would have another user :) Vivien, I will refresh the patch and send it to you, the you can use the priv by dsa and send my patch along with your patchset. How does that sound? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next] openvswitch: report features supported by the kernel datapath
Allow the user space to query what features are supported by the openvswitch module. This will be used to allow or disallow certain configurations and/or switch between newer and older APIs depending on what the kernel supports. Two features are reported as supported by this patch: lwtunnel and IPv6 tunneling support. Theoretically, we could merge these two, as any of them implies the other with this patch applied, but it's better to keep them separate: kernel 4.3 supports lwtunnels but not IPv6 for ovs, and the separation of the two flags allows us to backport a version of this patch to 4.3 should the need arise. Signed-off-by: Jiri Benc--- This is intentionally submitted to net-next. Kernel 4.3 will be fine without this feature (but despite that, I'd like to keep the two flags separate). --- include/uapi/linux/openvswitch.h | 12 net/openvswitch/datapath.c | 21 ++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 32e07d8cbaf4..3d8d00b6e55d 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h @@ -73,6 +73,10 @@ enum ovs_datapath_cmd { * datapath. Always present in notifications. * @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the * datapath. Always present in notifications. + * @OVS_DP_ATTR_KERNEL_FEATURES: Bitmask of features that the datapath + * supports. When creating a datapath, this is a minimal feature set + * requested, the request will fail if it cannot be honored. On get + * operations, this contains all features supported by the datapath. * * These attributes follow the ovs_header within the Generic Netlink * payload for %OVS_DP_* commands. @@ -84,6 +88,7 @@ enum ovs_datapath_attr { OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */ OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */ + OVS_DP_ATTR_KERNEL_FEATURES,/* OVS_DP_KF_* */ __OVS_DP_ATTR_MAX }; @@ -121,6 +126,13 @@ struct ovs_vport_stats { /* Allow datapath to associate multiple Netlink PIDs to each vport */ #define OVS_DP_F_VPORT_PIDS(1 << 1) +/* Datapath features */ +#define OVS_DP_KF_LWTUNNEL (1ULL << 0) /* lwtunnel interface supported */ +#define OVS_DP_KF_IPV6_TUNNEL (1ULL << 1) /* IPv6 tunneling supported */ + +#define OVS_DP_KF_ALL (OVS_DP_KF_LWTUNNEL | \ +OVS_DP_KF_IPV6_TUNNEL) + /* Fixed logical ports. */ #define OVSP_LOCAL ((__u32)0) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index a75828091e21..896435779fc8 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1439,6 +1439,7 @@ static size_t ovs_dp_cmd_msg_size(void) msgsize += nla_total_size(sizeof(struct ovs_dp_stats)); msgsize += nla_total_size(sizeof(struct ovs_dp_megaflow_stats)); msgsize += nla_total_size(sizeof(u32)); /* OVS_DP_ATTR_USER_FEATURES */ + msgsize += nla_total_size(sizeof(u64)); /* OVS_DP_ATTR_KERNEL_FEATURES */ return msgsize; } @@ -1476,6 +1477,9 @@ static int ovs_dp_cmd_fill_info(struct datapath *dp, struct sk_buff *skb, if (nla_put_u32(skb, OVS_DP_ATTR_USER_FEATURES, dp->user_features)) goto nla_put_failure; + if (nla_put_u64(skb, OVS_DP_ATTR_KERNEL_FEATURES, OVS_DP_KF_ALL)) + goto nla_put_failure; + genlmsg_end(skb, ovs_header); return 0; @@ -1526,6 +1530,13 @@ static void ovs_dp_change(struct datapath *dp, struct nlattr *a[]) dp->user_features = nla_get_u32(a[OVS_DP_ATTR_USER_FEATURES]); } +static bool ovs_dp_kernel_features_ok(struct nlattr *a[]) +{ + if (!a[OVS_DP_ATTR_KERNEL_FEATURES]) + return true; + return !(nla_get_u64(a[OVS_DP_ATTR_KERNEL_FEATURES]) & ~OVS_DP_KF_ALL); +} + static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info) { struct nlattr **a = info->attrs; @@ -1536,9 +1547,10 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info) struct ovs_net *ovs_net; int err, i; - err = -EINVAL; if (!a[OVS_DP_ATTR_NAME] || !a[OVS_DP_ATTR_UPCALL_PID]) - goto err; + return -EINVAL; + if (!ovs_dp_kernel_features_ok(a)) + return -EOPNOTSUPP; reply = ovs_dp_cmd_alloc_info(info); if (!reply) @@ -1626,7 +1638,6 @@ err_free_dp: kfree(dp); err_free_reply: kfree_skb(reply); -err: return err; } @@ -1694,6 +1705,9 @@ static int ovs_dp_cmd_set(struct sk_buff *skb, struct genl_info *info) struct datapath *dp; int err; + if (!ovs_dp_kernel_features_ok(info->attrs)) + return -EOPNOTSUPP; + reply = ovs_dp_cmd_alloc_info(info); if (!reply)
[PATCH net-next 1/7] net/mlx5_core: Improve mlx5 messages
From: Eli CohenImprove the messages printed by the mlx5 macros to include the device string. In addition, prefix names used by the macros with two underscores to avoid possible name collisions. Signed-off-by: Eli Cohen Signed-off-by: Or Gerlitz --- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h| 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h index 566a704..30c0be7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h @@ -43,25 +43,25 @@ extern int mlx5_core_debug_mask; -#define mlx5_core_dbg(dev, format, ...) \ - pr_debug("%s:%s:%d:(pid %d): " format, \ -(dev)->priv.name, __func__, __LINE__, current->pid,\ +#define mlx5_core_dbg(__dev, format, ...) \ + dev_dbg(&(__dev)->pdev->dev, "%s:%s:%d:(pid %d): " format, \ +(__dev)->priv.name, __func__, __LINE__, current->pid, \ ##__VA_ARGS__) -#define mlx5_core_dbg_mask(dev, mask, format, ...) \ +#define mlx5_core_dbg_mask(__dev, mask, format, ...) \ do { \ if ((mask) & mlx5_core_debug_mask) \ - mlx5_core_dbg(dev, format, ##__VA_ARGS__); \ + mlx5_core_dbg(__dev, format, ##__VA_ARGS__);\ } while (0) -#define mlx5_core_err(dev, format, ...) \ - pr_err("%s:%s:%d:(pid %d): " format,\ - (dev)->priv.name, __func__, __LINE__, current->pid, \ +#define mlx5_core_err(__dev, format, ...) \ + dev_err(&(__dev)->pdev->dev, "%s:%s:%d:(pid %d): " format, \ + (__dev)->priv.name, __func__, __LINE__, current->pid,\ ##__VA_ARGS__) -#define mlx5_core_warn(dev, format, ...) \ - pr_warn("%s:%s:%d:(pid %d): " format, \ - (dev)->priv.name, __func__, __LINE__, current->pid, \ +#define mlx5_core_warn(__dev, format, ...) \ + dev_warn(&(__dev)->pdev->dev, "%s:%s:%d:(pid %d): " format, \ + (__dev)->priv.name, __func__, __LINE__, current->pid, \ ##__VA_ARGS__) enum { -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 3/7] net/mlx5_core: Use accessor functions to read from device memory
From: Eli CohenUse ioread function to read health buffer data. In addition, print the firmware version as a string for readability and also use dev_err to have the device string to be printed. Signed-off-by: Eli Cohen Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx5/core/health.c | 35 +++- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c index 1277c42..8770968 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c @@ -114,32 +114,41 @@ static const char *hsynd_str(u8 synd) } } -static u16 read_be16(__be16 __iomem *p) +static u16 get_maj(u32 fw) { - return swab16(readl((__force u16 __iomem *) p)); + return fw >> 28; } -static u32 read_be32(__be32 __iomem *p) +static u16 get_min(u32 fw) { - return swab32(readl((__force u32 __iomem *) p)); + return fw >> 16 & 0xfff; +} + +static u16 get_sub(u32 fw) +{ + return fw & 0x; } static void print_health_info(struct mlx5_core_dev *dev) { struct mlx5_core_health *health = >priv.health; struct health_buffer __iomem *h = health->health; + char fw_str[18]; + u32 fw; int i; for (i = 0; i < ARRAY_SIZE(h->assert_var); i++) - pr_info("assert_var[%d] 0x%08x\n", i, read_be32(h->assert_var + i)); - - pr_info("assert_exit_ptr 0x%08x\n", read_be32(>assert_exit_ptr)); - pr_info("assert_callra 0x%08x\n", read_be32(>assert_callra)); - pr_info("fw_ver 0x%08x\n", read_be32(>fw_ver)); - pr_info("hw_id 0x%08x\n", read_be32(>hw_id)); - pr_info("irisc_index %d\n", readb(>irisc_index)); - pr_info("synd 0x%x: %s\n", readb(>synd), hsynd_str(readb(>synd))); - pr_info("ext_sync 0x%04x\n", read_be16(>ext_synd)); + dev_err(>pdev->dev, "assert_var[%d] 0x%08x\n", i, ioread32be(h->assert_var + i)); + + dev_err(>pdev->dev, "assert_exit_ptr 0x%08x\n", ioread32be(>assert_exit_ptr)); + dev_err(>pdev->dev, "assert_callra 0x%08x\n", ioread32be(>assert_callra)); + fw = ioread32be(>fw_ver); + sprintf(fw_str, "%d.%d.%d", get_maj(fw), get_min(fw), get_sub(fw)); + dev_err(>pdev->dev, "fw_ver %s\n", fw_str); + dev_err(>pdev->dev, "hw_id 0x%08x\n", ioread32be(>hw_id)); + dev_err(>pdev->dev, "irisc_index %d\n", ioread8(>irisc_index)); + dev_err(>pdev->dev, "synd 0x%x: %s\n", ioread8(>synd), hsynd_str(ioread8(>synd))); + dev_err(>pdev->dev, "ext_synd 0x%04x\n", ioread16be(>ext_synd)); } static void poll_health(unsigned long data) -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 2/7] net/mlx5_core: Prepare cmd interface to system errors handling
From: Eli CohenIn preparation to handling system errors at the mlx5_core level, change the interface of cmd_work_handler to accept a 64 bit argument for the vector. This allows to encode a flag that signifies when the handler is called as a result of a driver logic that wishes to terminate commands that the hardware may not be able to terminate. Such command completions are detected at the handler and proper return status is encoded. To be able to terminate page handler commands, we make sure to set the corresponding bit in the bitmask. Signed-off-by: Eli Cohen Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 20 ++-- include/linux/mlx5/driver.h | 6 +- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c index 84838c2..c3e54b7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@ -254,6 +254,10 @@ static void dump_buf(void *buf, int size, int data_only, int offset) pr_debug("\n"); } +enum { + MLX5_DRIVER_STATUS_ABORTED = 0xfe, +}; + const char *mlx5_command_str(int command) { switch (command) { @@ -473,6 +477,7 @@ static void cmd_work_handler(struct work_struct *work) struct mlx5_core_dev *dev = container_of(cmd, struct mlx5_core_dev, cmd); struct mlx5_cmd_layout *lay; struct semaphore *sem; + unsigned long flags; sem = ent->page_queue ? >pages_sem : >sem; down(sem); @@ -485,6 +490,9 @@ static void cmd_work_handler(struct work_struct *work) } } else { ent->idx = cmd->max_reg_cmds; + spin_lock_irqsave(>alloc_lock, flags); + clear_bit(ent->idx, >bitmask); + spin_unlock_irqrestore(>alloc_lock, flags); } ent->token = alloc_token(cmd); @@ -1081,7 +1089,7 @@ static void free_msg(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *msg) } } -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, unsigned long vector) +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec) { struct mlx5_cmd *cmd = >cmd; struct mlx5_cmd_work_ent *ent; @@ -1092,7 +1100,10 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, unsigned long vector) s64 ds; struct mlx5_cmd_stats *stats; unsigned long flags; + unsigned long vector; + /* there can be at most 32 command queues */ + vector = vec & 0x; for (i = 0; i < (1 << cmd->log_sz); i++) { if (test_bit(i, )) { struct semaphore *sem; @@ -1110,11 +1121,16 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, unsigned long vector) ent->ret = verify_signature(ent); else ent->ret = 0; - ent->status = ent->lay->status_own >> 1; + if (vec & MLX5_TRIGGERED_CMD_COMP) + ent->status = MLX5_DRIVER_STATUS_ABORTED; + else + ent->status = ent->lay->status_own >> 1; + mlx5_core_dbg(dev, "command completed. ret 0x%x, delivery status %s(0x%x)\n", ent->ret, deliv_status_to_str(ent->status), ent->status); } free_ent(cmd, ent->idx); + if (ent->callback) { ds = ent->ts2 - ent->ts1; if (ent->op < ARRAY_SIZE(cmd->stats)) { diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 8b6d6f2..aa89955 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -731,7 +731,7 @@ void mlx5_eq_pagefault(struct mlx5_core_dev *dev, struct mlx5_eqe *eqe); #endif void mlx5_srq_event(struct mlx5_core_dev *dev, u32 srqn, int event_type); struct mlx5_core_srq *mlx5_core_get_srq(struct mlx5_core_dev *dev, u32 srqn); -void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, unsigned long vector); +void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec); void mlx5_cq_event(struct mlx5_core_dev *dev, u32 cqn, int event_type); int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx, int nent, u64 mask, const char *name, struct mlx5_uar *uar); @@ -865,4 +865,8 @@ static inline int mlx5_get_gid_table_len(u16 param) return 8 * (1 << param); } +enum { + MLX5_TRIGGERED_CMD_COMP = (u64)1 << 32, +}; + #endif /* MLX5_DRIVER_H */ -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of
[PATCH net-next 7/7] net/mlx4_core: Fix resource tracker error flow in add_res_range
From: Saeed MahameedThe 'for' loop when undoing rb-tree insertions and list-adds in the error flow in add_res_range had errors, fix them. Signed-off-by: Saeed Mahameed Signed-off-by: Jack Morgenstein Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index 731423c..ac4b99a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -1238,8 +1238,10 @@ static int add_res_range(struct mlx4_dev *dev, int slave, u64 base, int count, return 0; undo: - for (--i; i >= base; --i) + for (--i; i >= 0; --i) { rb_erase(_arr[i]->node, root); + list_del_init(_arr[i]->list); + } spin_unlock_irq(mlx4_tlock(dev)); -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 4/7] net/mlx5_core: Use private health thread for each device
From: Eli CohenUse a single threaded work queue for each device in the system instead of using one thread for any device. This is required so we can concurrently process system error handling for all the devices that need that. Signed-off-by: Eli Cohen Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx5/core/health.c | 63 +++- drivers/net/ethernet/mellanox/mlx5/core/main.c | 37 +++--- include/linux/mlx5/driver.h | 7 +-- 3 files changed, 52 insertions(+), 55 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c index 8770968..9b81e1c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c @@ -57,31 +57,16 @@ enum { MLX5_HEALTH_SYNDR_HIGH_TEMP = 0x10 }; -static DEFINE_SPINLOCK(health_lock); -static LIST_HEAD(health_list); -static struct work_struct health_work; - static void health_care(struct work_struct *work) { - struct mlx5_core_health *health, *n; + struct mlx5_core_health *health; struct mlx5_core_dev *dev; struct mlx5_priv *priv; - LIST_HEAD(tlist); - - spin_lock_irq(_lock); - list_splice_init(_list, ); - - spin_unlock_irq(_lock); - list_for_each_entry_safe(health, n, , list) { - priv = container_of(health, struct mlx5_priv, health); - dev = container_of(priv, struct mlx5_core_dev, priv); - mlx5_core_warn(dev, "handling bad device here\n"); - /* nothing yet */ - spin_lock_irq(_lock); - list_del_init(>list); - spin_unlock_irq(_lock); - } + health = container_of(work, struct mlx5_core_health, work); + priv = container_of(health, struct mlx5_priv, health); + dev = container_of(priv, struct mlx5_core_dev, priv); + mlx5_core_warn(dev, "handling bad device here\n"); } static const char *hsynd_str(u8 synd) @@ -168,11 +153,7 @@ static void poll_health(unsigned long data) if (health->miss_counter == MAX_MISSES) { mlx5_core_err(dev, "device's health compromised\n"); print_health_info(dev); - spin_lock_irq(_lock); - list_add_tail(>list, _list); - spin_unlock_irq(_lock); - - queue_work(mlx5_core_wq, _work); + queue_work(health->wq, >work); } else { get_random_bytes(, sizeof(next)); next %= HZ; @@ -185,7 +166,6 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev) { struct mlx5_core_health *health = >priv.health; - INIT_LIST_HEAD(>list); init_timer(>timer); health->health = >iseg->health; health->health_counter = >iseg->health_counter; @@ -201,18 +181,33 @@ void mlx5_stop_health_poll(struct mlx5_core_dev *dev) struct mlx5_core_health *health = >priv.health; del_timer_sync(>timer); - - spin_lock_irq(_lock); - if (!list_empty(>list)) - list_del_init(>list); - spin_unlock_irq(_lock); } -void mlx5_health_cleanup(void) +void mlx5_health_cleanup(struct mlx5_core_dev *dev) { + struct mlx5_core_health *health = >priv.health; + + destroy_workqueue(health->wq); } -void __init mlx5_health_init(void) +int mlx5_health_init(struct mlx5_core_dev *dev) { - INIT_WORK(_work, health_care); + struct mlx5_core_health *health; + char *name; + + health = >priv.health; + name = kmalloc(64, GFP_KERNEL); + if (!name) + return -ENOMEM; + + strcpy(name, "mlx5_health"); + strcat(name, dev_name(>pdev->dev)); + health->wq = create_singlethread_workqueue(name); + kfree(name); + if (!health->wq) + return -ENOMEM; + + INIT_WORK(>work, health_care); + + return 0; } diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 7718f6a..b6edc58 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -62,7 +62,6 @@ static int prof_sel = MLX5_DEFAULT_PROF; module_param_named(prof_sel, prof_sel, int, 0444); MODULE_PARM_DESC(prof_sel, "profile selector. Valid range 0 - 2"); -struct workqueue_struct *mlx5_core_wq; static LIST_HEAD(intf_list); static LIST_HEAD(dev_list); static DEFINE_MUTEX(intf_mutex); @@ -1046,6 +1045,7 @@ err_pagealloc_cleanup: static int mlx5_unload_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv) { + int err; mlx5_unregister_device(dev); mlx5_cleanup_mr_table(dev); @@ -1060,9 +1060,10 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv) mlx5_eq_cleanup(dev); mlx5_disable_msix(dev);
[PATCH net-next 6/7] net/mlx4_core: Fix mailbox leak in error flow when performing update qp
From: Jack MorgensteinThe procedure mlx4_update_qp leaks mailboxes in its error-flow, fix that. Signed-off-by: Jack Morgenstein Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx4/qp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c index 2026863..3311f35 100644 --- a/drivers/net/ethernet/mellanox/mlx4/qp.c +++ b/drivers/net/ethernet/mellanox/mlx4/qp.c @@ -422,15 +422,15 @@ int mlx4_update_qp(struct mlx4_dev *dev, u32 qpn, u64 qp_mask = 0; int err = 0; + if (!attr || (attr & ~MLX4_UPDATE_QP_SUPPORTED_ATTRS)) + return -EINVAL; + mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); cmd = (struct mlx4_update_qp_context *)mailbox->buf; - if (!attr || (attr & ~MLX4_UPDATE_QP_SUPPORTED_ATTRS)) - return -EINVAL; - if (attr & MLX4_UPDATE_QP_SMAC) { pri_addr_path_mask |= 1ULL << MLX4_UPD_QP_PATH_MASK_MAC_INDEX; cmd->qp_context.pri_path.grh_mylmc = params->smac_index; -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 3/6] net: remove dsa.h include from linux/netdevice.h
On 2015/10/8 20:18, Jiri Pirko wrote: Thu, Oct 08, 2015 at 02:11:11PM CEST, huangda...@hisilicon.com wrote: On 2015/10/8 17:18, Jiri Pirko wrote: Thu, Oct 08, 2015 at 11:04:48AM CEST, l...@intel.com wrote: Hi Vivien, [auto build test ERROR on net-next/master -- if it's inappropriate base, please ignore] config: arm64-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm64 All errors (new ones prefixed by >>): In file included from drivers/net/ethernet/hisilicon/hns/hnae.c:15:0: drivers/net/ethernet/hisilicon/hns/hnae.h:465:2: error: unknown type name 'phy_interface_t' phy_interface_t phy_if; ^ vim +/phy_interface_t +465 drivers/net/ethernet/hisilicon/hns/hnae.h Looks like hnae.c needs to do "#include " directly. Cc'ing maintainer. 6fe6611f huangdaode 2015-09-17 449 struct hnae_ae_dev { 6fe6611f huangdaode 2015-09-17 450 struct device cls_dev; /* the class dev */ 6fe6611f huangdaode 2015-09-17 451 struct device *dev; /* the presented dev */ 6fe6611f huangdaode 2015-09-17 452 struct hnae_ae_ops *ops; 6fe6611f huangdaode 2015-09-17 453 struct list_head node; 6fe6611f huangdaode 2015-09-17 454 struct module *owner; /* the module who provides this dev */ 6fe6611f huangdaode 2015-09-17 455 int id; 6fe6611f huangdaode 2015-09-17 456 char name[AE_NAME_SIZE]; 6fe6611f huangdaode 2015-09-17 457 struct list_head handle_list; 6fe6611f huangdaode 2015-09-17 458 spinlock_t lock; /* lock to protect the handle_list */ 6fe6611f huangdaode 2015-09-17 459 }; 6fe6611f huangdaode 2015-09-17 460 6fe6611f huangdaode 2015-09-17 461 struct hnae_handle { 6fe6611f huangdaode 2015-09-17 462 struct device *owner_dev; /* the device which make use of this handle */ 6fe6611f huangdaode 2015-09-17 463 struct hnae_ae_dev *dev; /* the device who provides this handle */ 6fe6611f huangdaode 2015-09-17 464 struct device_node *phy_node; 6fe6611f huangdaode 2015-09-17 @465 phy_interface_t phy_if; 6fe6611f huangdaode 2015-09-17 466 u32 if_support; 6fe6611f huangdaode 2015-09-17 467 int q_num; 6fe6611f huangdaode 2015-09-17 468 int vf_id; 6fe6611f huangdaode 2015-09-17 469 u32 eport_id; 6fe6611f huangdaode 2015-09-17 470 enum hnae_port_type port_type; 6fe6611f huangdaode 2015-09-17 471 struct list_head node;/* list to hnae_ae_dev->handle_list */ 6fe6611f huangdaode 2015-09-17 472 struct hnae_buf_ops *bops; /* operation for the buffer */ 6fe6611f huangdaode 2015-09-17 473 struct hnae_queue **qs; /* array base of all queues */ :: The code at line 465 was first introduced by commit :: 6fe6611ff275522a4e4c0359e2f46cdd07780d2f net: add Hisilicon Network Subsystem hnae framework support :: TO: huangdaode:: CC: David S. Miller --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ . Hi Jiri thanks for your information. i have compiled the latest net-next repo using your config file, but don't find the error you mentioned. the attachment is the build log and the config file. also, i used the following command to compile, but still fail to reproduce your issue. / daode@Turing-Arch-b:~/work/net-next$ cat build.sh // //export ARCH=arm64 // //export CROSS_COMPILE=aarch64-linux-gnu-// //make allyesconfig// //make -j16 // daode@Turing-Arch-b:~/work/net-next$ / so could you please help me to reproduce the issue. The patch is not in tree. That does not change the fact that you should include linux/phy.h directly. Please send the patch adding that. Thanks! . ok, thanks! -- Best Regards Daode Huang -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch net 0/2] mlxsw: couple of fixes
From: Jiri PirkoJust a couple of small fixes. Elad Raz (1): mlxsw: switchx2: changing order of exit fallbacks Ido Schimmel (1): mlxsw: Fix bug in __mlxsw_item_bit_array_offset drivers/net/ethernet/mellanox/mlxsw/item.h | 4 +++- drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch net 2/2] mlxsw: Fix bug in __mlxsw_item_bit_array_offset
From: Ido SchimmelWhen calculating the shift needed in order to access a bit array element in a byte, we should multiply the index by the element size and not assume it is fixed at 2-bits. Fixes: 93c1edb27f9e ("mlxsw: Introduce Mellanox switch driver core") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/item.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/item.h b/drivers/net/ethernet/mellanox/mlxsw/item.h index ffd55d0..36fb1ce 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/item.h +++ b/drivers/net/ethernet/mellanox/mlxsw/item.h @@ -187,6 +187,7 @@ __mlxsw_item_bit_array_offset(struct mlxsw_item *item, u16 index, u8 *shift) { u16 max_index, be_index; u16 offset; /* byte offset inside the array */ + u8 in_byte_index; BUG_ON(index && !item->element_size); if (item->offset % sizeof(u32) != 0 || @@ -199,7 +200,8 @@ __mlxsw_item_bit_array_offset(struct mlxsw_item *item, u16 index, u8 *shift) max_index = (item->size.bytes << 3) / item->element_size - 1; be_index = max_index - index; offset = be_index * item->element_size >> 3; - *shift = index % (BITS_PER_BYTE / item->element_size) << 1; + in_byte_index = index % (BITS_PER_BYTE / item->element_size); + *shift = in_byte_index * item->element_size; return item->offset + offset; } -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch net 1/2] mlxsw: switchx2: changing order of exit fallbacks
From: Elad RazFixes: 31557f0f9755 ("mlxsw: Introduce Mellanox SwitchX-2 ASIC support") Signed-off-by: Elad Raz Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c index d448431..633f3e7 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/switchx2.c +++ b/drivers/net/ethernet/mellanox/mlxsw/switchx2.c @@ -1069,9 +1069,9 @@ static int mlxsw_sx_port_create(struct mlxsw_sx *mlxsw_sx, u8 local_port) return 0; err_register_netdev: -err_port_admin_status_set: err_port_mac_learning_mode_set: err_port_stp_state_set: +err_port_admin_status_set: err_port_mtu_set: err_port_speed_set: err_port_swid_set: -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 8/9] net/inetdevice: bad_mask can be boolean
This patch makes bad_mask return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai--- include/linux/inetdevice.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 3b0999e..ee971f3 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -180,15 +180,15 @@ static __inline__ bool inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) * Check if a mask is acceptable. */ -static __inline__ int bad_mask(__be32 mask, __be32 addr) +static __inline__ bool bad_mask(__be32 mask, __be32 addr) { __u32 hmask; if (addr & (mask = ~mask)) - return 1; + return true; hmask = ntohl(mask); if (hmask & (hmask+1)) - return 1; - return 0; + return true; + return false; } #define for_primary_ifa(in_dev){ struct in_ifaddr *ifa; \ -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 0/7] Mellanox driver update for net-next
Hi Dave, Some small fixes and small enhancements from the team. Series applies over net-next commit acb4a6b "tcp: ensure prior synack rtx behavior with small backlogs". Or. Eli Cohen (4): net/mlx5_core: Improve mlx5 messages net/mlx5_core: Prepare cmd interface to system errors handling net/mlx5_core: Use accessor functions to read from device memory net/mlx5_core: Use private health thread for each device Ido Shamay (1): net/mlx4_en: Add steering rules after RSS creation Jack Morgenstein (1): net/mlx4_core: Fix mailbox leak in error flow when performing update qp Saeed Mahameed (1): net/mlx4_core: Fix resource tracker error flow in add_res_range drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 144 - drivers/net/ethernet/mellanox/mlx4/qp.c| 6 +- .../net/ethernet/mellanox/mlx4/resource_tracker.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 20 ++- drivers/net/ethernet/mellanox/mlx5/core/health.c | 98 +++--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 37 +++--- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h| 22 ++-- include/linux/mlx5/driver.h| 13 +- 8 files changed, 194 insertions(+), 150 deletions(-) -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 5/7] net/mlx4_en: Add steering rules after RSS creation
From: Ido ShamayChanged the receive control flow in a way that steering rules are added only when the RSS object is already in RTR/RTS mode. Some optimization features, which are enabled by the device firmware, require this condition in order to be effective. Signed-off-by: Ido Shamay Signed-off-by: Or Gerlitz --- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 144 ++--- 1 file changed, 80 insertions(+), 64 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index 4726122..597d892 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -573,10 +573,8 @@ static int mlx4_en_get_qp(struct mlx4_en_priv *priv) { struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_dev *dev = mdev->dev; - struct mlx4_mac_entry *entry; int index = 0; int err = 0; - u64 reg_id = 0; int *qpn = >base_qpn; u64 mac = mlx4_mac_to_u64(priv->dev->dev_addr); @@ -600,44 +598,11 @@ static int mlx4_en_get_qp(struct mlx4_en_priv *priv) en_dbg(DRV, priv, "Reserved qp %d\n", *qpn); if (err) { en_err(priv, "Failed to reserve qp for mac registration\n"); - goto qp_err; - } - - err = mlx4_en_uc_steer_add(priv, priv->dev->dev_addr, qpn, _id); - if (err) - goto steer_err; - - err = mlx4_en_tunnel_steer_add(priv, priv->dev->dev_addr, *qpn, - >tunnel_reg_id); - if (err) - goto tunnel_err; - - entry = kmalloc(sizeof(*entry), GFP_KERNEL); - if (!entry) { - err = -ENOMEM; - goto alloc_err; + mlx4_unregister_mac(dev, priv->port, mac); + return err; } - memcpy(entry->mac, priv->dev->dev_addr, sizeof(entry->mac)); - memcpy(priv->current_mac, entry->mac, sizeof(priv->current_mac)); - entry->reg_id = reg_id; - - hlist_add_head_rcu(>hlist, - >mac_hash[entry->mac[MLX4_EN_MAC_HASH_IDX]]); return 0; - -alloc_err: - if (priv->tunnel_reg_id) - mlx4_flow_detach(priv->mdev->dev, priv->tunnel_reg_id); -tunnel_err: - mlx4_en_uc_steer_release(priv, priv->dev->dev_addr, *qpn, reg_id); - -steer_err: - mlx4_qp_release_range(dev, *qpn, 1); - -qp_err: - mlx4_unregister_mac(dev, priv->port, mac); - return err; } static void mlx4_en_put_qp(struct mlx4_en_priv *priv) @@ -645,39 +610,13 @@ static void mlx4_en_put_qp(struct mlx4_en_priv *priv) struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_dev *dev = mdev->dev; int qpn = priv->base_qpn; - u64 mac; if (dev->caps.steering_mode == MLX4_STEERING_MODE_A0) { - mac = mlx4_mac_to_u64(priv->dev->dev_addr); + u64 mac = mlx4_mac_to_u64(priv->dev->dev_addr); en_dbg(DRV, priv, "Registering MAC: %pM for deleting\n", priv->dev->dev_addr); mlx4_unregister_mac(dev, priv->port, mac); } else { - struct mlx4_mac_entry *entry; - struct hlist_node *tmp; - struct hlist_head *bucket; - unsigned int i; - - for (i = 0; i < MLX4_EN_MAC_HASH_SIZE; ++i) { - bucket = >mac_hash[i]; - hlist_for_each_entry_safe(entry, tmp, bucket, hlist) { - mac = mlx4_mac_to_u64(entry->mac); - en_dbg(DRV, priv, "Registering MAC: %pM for deleting\n", - entry->mac); - mlx4_en_uc_steer_release(priv, entry->mac, -qpn, entry->reg_id); - - mlx4_unregister_mac(dev, priv->port, mac); - hlist_del_rcu(>hlist); - kfree_rcu(entry, rcu); - } - } - - if (priv->tunnel_reg_id) { - mlx4_flow_detach(priv->mdev->dev, priv->tunnel_reg_id); - priv->tunnel_reg_id = 0; - } - en_dbg(DRV, priv, "Releasing qp: port %d, qpn %d\n", priv->port, qpn); mlx4_qp_release_range(dev, qpn, 1); @@ -1283,6 +1222,75 @@ static void mlx4_en_netpoll(struct net_device *dev) } #endif +static int mlx4_en_set_rss_steer_rules(struct mlx4_en_priv *priv) +{ + u64 reg_id; + int err = 0; + int *qpn = >base_qpn; + struct mlx4_mac_entry *entry; + + err = mlx4_en_uc_steer_add(priv, priv->dev->dev_addr, qpn, _id); + if (err) + return err; + + err = mlx4_en_tunnel_steer_add(priv, priv->dev->dev_addr, *qpn,
Kredit 1.4 %
-- BancoPosta Loans Viale Europa, 175-00144 Roma, Italy. Zu wen es angeht. Willkommen zu BANCOPOSTA bietet eine Vielzahl von finanziellen Handel, Kreditvergabe Dienstleistungen für Privatpersonen und Zusammenarbeit bieten wir Darlehen mit einem Zinssatz von 1.4%. Das Flexible Darlehen Bedingungen aus (1 Jahr auf 20 Jahre), Borrow (5,000.00 Euro bis 100,000,000.00 Euro) für einen bestimmten Zweck. Wenn Sie die finanzielle Hilfe brauchen oder Sie Darlehen brauchen an Ihre uneinbringliche Forderungen zu begleichen, werden Sie aufgefordert, für Ihre Kreditbearbeitung unten ausfüllen. Vollständiger Name: Land: Kreditbetrag: Darlehen-Dauer: Wir erwarten Ihre Antwort um uns zu aktivieren gehen Sie mit der Kredit-Dokumentation Danke Massimo Sarmi. Kredit-Auszahlung-Manager -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 7/9] net/inetdevice: inet_ifa_match can be boolean
This patch makes inet_ifa_match return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai--- include/linux/inetdevice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index a4328ce..3b0999e 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -171,7 +171,7 @@ __be32 inet_confirm_addr(struct net *net, struct in_device *in_dev, __be32 dst, __be32 local, int scope); struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix, __be32 mask); -static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) +static __inline__ bool inet_ifa_match(__be32 addr, struct in_ifaddr *ifa) { return !((addr^ifa->ifa_address)>ifa_mask); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 9/9] net/core: lockdep_rtnl_is_held can be boolean
This patch makes lockdep_rtnl_is_held return bool due to this particular function only using either one or zero as its return value. In another patch lockdep_is_held is also made return bool. No functional change. Signed-off-by: Yaowei Bai--- include/linux/rtnetlink.h | 6 +++--- net/core/rtnetlink.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 39adaa9..4be5048 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -33,11 +33,11 @@ extern wait_queue_head_t netdev_unregistering_wq; extern struct mutex net_mutex; #ifdef CONFIG_PROVE_LOCKING -extern int lockdep_rtnl_is_held(void); +extern bool lockdep_rtnl_is_held(void); #else -static inline int lockdep_rtnl_is_held(void) +static inline bool lockdep_rtnl_is_held(void) { - return 1; + return true; } #endif /* #ifdef CONFIG_PROVE_LOCKING */ diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 0ec4840..435da82 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -96,7 +96,7 @@ int rtnl_is_locked(void) EXPORT_SYMBOL(rtnl_is_locked); #ifdef CONFIG_PROVE_LOCKING -int lockdep_rtnl_is_held(void) +bool lockdep_rtnl_is_held(void) { return lockdep_is_held(_mutex); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html