* [PATCH net] net: dsa: bcm_sf2: Fix number of CFP entries for BCM7278
From: Florian Fainelli @ 2017-08-30 19:39 UTC (permalink / raw)
To: netdev; +Cc: davem, andrew, vivien.didelot, Florian Fainelli
BCM7278 has only 128 entries while BCM7445 has the full 256 entries set,
fix that.
Fixes: 7318166cacad ("net: dsa: bcm_sf2: Add support for ethtool::rxnfc")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/bcm_sf2.c | 4 ++++
drivers/net/dsa/bcm_sf2.h | 1 +
drivers/net/dsa/bcm_sf2_cfp.c | 8 ++++----
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 00416e9f0196..eb220c8327b5 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -1043,6 +1043,7 @@ struct bcm_sf2_of_data {
u32 type;
const u16 *reg_offsets;
unsigned int core_reg_align;
+ unsigned int num_cfp_rules;
};
/* Register offsets for the SWITCH_REG_* block */
@@ -1066,6 +1067,7 @@ struct bcm_sf2_of_data {
.type = BCM7445_DEVICE_ID,
.core_reg_align = 0,
.reg_offsets = bcm_sf2_7445_reg_offsets,
+ .num_cfp_rules = 256,
};
static const u16 bcm_sf2_7278_reg_offsets[] = {
@@ -1088,6 +1090,7 @@ struct bcm_sf2_of_data {
.type = BCM7278_DEVICE_ID,
.core_reg_align = 1,
.reg_offsets = bcm_sf2_7278_reg_offsets,
+ .num_cfp_rules = 128,
};
static const struct of_device_id bcm_sf2_of_match[] = {
@@ -1144,6 +1147,7 @@ static int bcm_sf2_sw_probe(struct platform_device *pdev)
priv->type = data->type;
priv->reg_offsets = data->reg_offsets;
priv->core_reg_align = data->core_reg_align;
+ priv->num_cfp_rules = data->num_cfp_rules;
/* Auto-detection using standard registers will not work, so
* provide an indication of what kind of device we are for
diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h
index d9c96b281fc0..02c499f9c56b 100644
--- a/drivers/net/dsa/bcm_sf2.h
+++ b/drivers/net/dsa/bcm_sf2.h
@@ -72,6 +72,7 @@ struct bcm_sf2_priv {
u32 type;
const u16 *reg_offsets;
unsigned int core_reg_align;
+ unsigned int num_cfp_rules;
/* spinlock protecting access to the indirect registers */
spinlock_t indir_lock;
diff --git a/drivers/net/dsa/bcm_sf2_cfp.c b/drivers/net/dsa/bcm_sf2_cfp.c
index 2fb32d67065f..8a1da7e67707 100644
--- a/drivers/net/dsa/bcm_sf2_cfp.c
+++ b/drivers/net/dsa/bcm_sf2_cfp.c
@@ -98,7 +98,7 @@ static inline void bcm_sf2_cfp_rule_addr_set(struct bcm_sf2_priv *priv,
{
u32 reg;
- WARN_ON(addr >= CFP_NUM_RULES);
+ WARN_ON(addr >= priv->num_cfp_rules);
reg = core_readl(priv, CORE_CFP_ACC);
reg &= ~(XCESS_ADDR_MASK << XCESS_ADDR_SHIFT);
@@ -109,7 +109,7 @@ static inline void bcm_sf2_cfp_rule_addr_set(struct bcm_sf2_priv *priv,
static inline unsigned int bcm_sf2_cfp_rule_size(struct bcm_sf2_priv *priv)
{
/* Entry #0 is reserved */
- return CFP_NUM_RULES - 1;
+ return priv->num_cfp_rules - 1;
}
static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,
@@ -523,7 +523,7 @@ static int bcm_sf2_cfp_rule_get_all(struct bcm_sf2_priv *priv,
if (!(reg & OP_STR_DONE))
break;
- } while (index < CFP_NUM_RULES);
+ } while (index < priv->num_cfp_rules);
/* Put the TCAM size here */
nfc->data = bcm_sf2_cfp_rule_size(priv);
@@ -544,7 +544,7 @@ int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port,
case ETHTOOL_GRXCLSRLCNT:
/* Subtract the default, unusable rule */
nfc->rule_cnt = bitmap_weight(priv->cfp.used,
- CFP_NUM_RULES) - 1;
+ priv->num_cfp_rules) - 1;
/* We support specifying rule locations */
nfc->data |= RX_CLS_LOC_SPECIAL;
break;
--
1.9.1
^ permalink raw reply related
* [PATCH 2/2] staging: r8822be: Simplify deinit_priv()
From: Larry Finger @ 2017-08-30 19:43 UTC (permalink / raw)
To: gregkh
Cc: netdev, devel, Larry Finger, Ping-Ke Shih, Yan-Hsuan Chuang,
Birming Chiu, Shaofu, Steven Ting
In-Reply-To: <20170830194313.9659-1-Larry.Finger@lwfinger.net>
Now that the extraneous debugging code is removed, routine deinit_priv()
clearly contains code that serves no useful purpose.
A null test before a call to kfree() and a spurious cast are also removed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
---
drivers/staging/rtlwifi/halmac/rtl_halmac.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/rtlwifi/halmac/rtl_halmac.c b/drivers/staging/rtlwifi/halmac/rtl_halmac.c
index 2b1c5fae64ef..6448a8bfc14b 100644
--- a/drivers/staging/rtlwifi/halmac/rtl_halmac.c
+++ b/drivers/staging/rtlwifi/halmac/rtl_halmac.c
@@ -382,13 +382,7 @@ static void deinit_priv(struct rtl_halmac *halmac)
indicator = halmac->indicator;
halmac->indicator = NULL;
- if (indicator) {
- u32 count, size;
-
- count = HALMAC_FEATURE_ALL + 1;
- size = sizeof(*indicator) * count;
- kfree((u8 *)indicator);
- }
+ kfree(indicator);
}
int rtl_halmac_init_adapter(struct rtl_priv *rtlpriv)
--
2.12.3
^ permalink raw reply related
* [PATCH 1/2] staging: r8822be: Remove some dead code
From: Larry Finger @ 2017-08-30 19:43 UTC (permalink / raw)
To: gregkh
Cc: devel, Yan-Hsuan Chuang, netdev, Birming Chiu, Steven Ting,
Larry Finger
In-Reply-To: <20170830194313.9659-1-Larry.Finger@lwfinger.net>
The code found inside an #ifdef CONFIG_RTL_DEBUG ... #endif section
is left over from debugging of the original driver, and should be
deleted.
Reported by: Andreas Ziegler <andreas.ziegler@fau.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
---
drivers/staging/rtlwifi/halmac/rtl_halmac.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/drivers/staging/rtlwifi/halmac/rtl_halmac.c b/drivers/staging/rtlwifi/halmac/rtl_halmac.c
index 031bf2c6078f..2b1c5fae64ef 100644
--- a/drivers/staging/rtlwifi/halmac/rtl_halmac.c
+++ b/drivers/staging/rtlwifi/halmac/rtl_halmac.c
@@ -386,26 +386,6 @@ static void deinit_priv(struct rtl_halmac *halmac)
u32 count, size;
count = HALMAC_FEATURE_ALL + 1;
-#ifdef CONFIG_RTL_DEBUG
- {
- struct submit_ctx *sctx;
- u32 i;
-
- for (i = 0; i < count; i++) {
- if (!indicator[i].sctx)
- continue;
-
- RT_TRACE(
- rtlpriv, COMP_HALMAC, DBG_LOUD,
- "%s: <WARN> %s id(%d) sctx still exist!!\n",
- __func__, RTL_HALMAC_FEATURE_NAME[i],
- i);
- sctx = indicator[i].sctx;
- indicator[i].sctx = NULL;
- rtl_mfree((u8 *)sctx, sizeof(*sctx));
- }
- }
-#endif /* !CONFIG_RTL_DEBUG */
size = sizeof(*indicator) * count;
kfree((u8 *)indicator);
}
--
2.12.3
^ permalink raw reply related
* [PATCH 0/2] staging: r8822be: Remove some left-over debug code
From: Larry Finger @ 2017-08-30 19:43 UTC (permalink / raw)
To: gregkh; +Cc: devel, netdev, Larry Finger
Some useless debugging code from the initial writing of the driver was not
removed before it was submitted. That oversight is now fixed and the
remaining code in routine deinit_priv() is simplified.
Larry
Larry Finger (2):
staging: r8822be: Remove some dead code
staging: r8822be: Simplify deinit_priv()
drivers/staging/rtlwifi/halmac/rtl_halmac.c | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)
--
2.12.3
^ permalink raw reply
* Re: [PATCH 5/6] platform/x86: make device_attribute const
From: Andy Shevchenko @ 2017-08-30 19:18 UTC (permalink / raw)
To: Bhumika Goyal
Cc: Julia Lawall, Rafael J. Wysocki, Len Brown, Josef Bacik,
Jiri Kosina, Benjamin Tissoires, manish.chopra, rahul.verma,
Dept-GELinuxNICDev, harish.patil, cascardo, don,
dvhart@infradead.org, Andy Shevchenko, Sebastian Reichel,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-block, nbd-general, linux-input, netdev,
Platform Driver <
In-Reply-To: <1503315792-14837-6-git-send-email-bhumirks@gmail.com>
On Mon, Aug 21, 2017 at 2:43 PM, Bhumika Goyal <bhumirks@gmail.com> wrote:
> Make these const as they are only passed as an argument to the
> function device_create_file and device_remove_file and the corresponding
> arguments are of type const.
> Done using Coccinelle
>
Split on per driver basis.
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
> drivers/platform/x86/classmate-laptop.c | 6 +++---
> drivers/platform/x86/intel-rst.c | 4 ++--
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
> index 55cf10b..d3715e2 100644
> --- a/drivers/platform/x86/classmate-laptop.c
> +++ b/drivers/platform/x86/classmate-laptop.c
> @@ -254,7 +254,7 @@ static ssize_t cmpc_accel_sensitivity_store_v4(struct device *dev,
> return strnlen(buf, count);
> }
>
> -static struct device_attribute cmpc_accel_sensitivity_attr_v4 = {
> +static const struct device_attribute cmpc_accel_sensitivity_attr_v4 = {
> .attr = { .name = "sensitivity", .mode = 0660 },
> .show = cmpc_accel_sensitivity_show_v4,
> .store = cmpc_accel_sensitivity_store_v4
> @@ -303,7 +303,7 @@ static ssize_t cmpc_accel_g_select_store_v4(struct device *dev,
> return strnlen(buf, count);
> }
>
> -static struct device_attribute cmpc_accel_g_select_attr_v4 = {
> +static const struct device_attribute cmpc_accel_g_select_attr_v4 = {
> .attr = { .name = "g_select", .mode = 0660 },
> .show = cmpc_accel_g_select_show_v4,
> .store = cmpc_accel_g_select_store_v4
> @@ -599,7 +599,7 @@ static ssize_t cmpc_accel_sensitivity_store(struct device *dev,
> return strnlen(buf, count);
> }
>
> -static struct device_attribute cmpc_accel_sensitivity_attr = {
> +static const struct device_attribute cmpc_accel_sensitivity_attr = {
> .attr = { .name = "sensitivity", .mode = 0660 },
> .show = cmpc_accel_sensitivity_show,
> .store = cmpc_accel_sensitivity_store
> diff --git a/drivers/platform/x86/intel-rst.c b/drivers/platform/x86/intel-rst.c
> index 7344d84..760a9bf 100644
> --- a/drivers/platform/x86/intel-rst.c
> +++ b/drivers/platform/x86/intel-rst.c
> @@ -65,7 +65,7 @@ static ssize_t irst_store_wakeup_events(struct device *dev,
> return count;
> }
>
> -static struct device_attribute irst_wakeup_attr = {
> +static const struct device_attribute irst_wakeup_attr = {
> .attr = { .name = "wakeup_events", .mode = 0600 },
> .show = irst_show_wakeup_events,
> .store = irst_store_wakeup_events
> @@ -111,7 +111,7 @@ static ssize_t irst_store_wakeup_time(struct device *dev,
> return count;
> }
>
> -static struct device_attribute irst_timeout_attr = {
> +static const struct device_attribute irst_timeout_attr = {
> .attr = { .name = "wakeup_time", .mode = 0600 },
> .show = irst_show_wakeup_time,
> .store = irst_store_wakeup_time
> --
> 1.9.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH 0/5] net: mdio-mux: Misc fix
From: Andrew Lunn @ 2017-08-30 19:01 UTC (permalink / raw)
To: Corentin Labbe; +Cc: f.fainelli, netdev, linux-kernel
In-Reply-To: <20170830174651.30325-1-clabbe.montjoie@gmail.com>
On Wed, Aug 30, 2017 at 07:46:46PM +0200, Corentin Labbe wrote:
> Hello
>
> This patch series fix minor problems found when working on the
> dwmac-sun8i syscon mdio-mux.
Hi Corentin
In general, a nice patchset.
Looking at the code, there are a few calls to devm_kfree() which look
redundant. This one should probably stay:
if (r) {
mdiobus_free(cb->mii_bus);
devm_kfree(dev, cb);
} else {
but i think the others can go.
Just a suggestion, not a problem if you don't feel like doing this...
Andrew
^ permalink raw reply
* Re: [PATCH net-next v6 3/3] openvswitch: enable NSH support
From: Mooney, Sean K @ 2017-08-30 19:00 UTC (permalink / raw)
To: Hannes Frederic Sowa
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, e@erig.me,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <87inh56q8u.fsf-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org>
> -----Original Message-----
> From: Hannes Frederic Sowa [mailto:hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org]
> Sent: Wednesday, August 30, 2017 4:16 PM
> To: Mooney, Sean K <sean.k.mooney-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Yang, Yi Y <yi.y.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org;
> netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; e@erig.me
> Subject: Re: [ovs-dev] [PATCH net-next v6 3/3] openvswitch: enable NSH
> support
>
> "Mooney, Sean K" <sean.k.mooney-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:
>
> >> -----Original Message-----
> >> From: ovs-dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org [mailto:ovs-dev-
> >> bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org] On Behalf Of Hannes Frederic Sowa
> >> Sent: Wednesday, August 30, 2017 10:53 AM
> >> To: Yang, Yi Y <yi.y.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> >> Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org; netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; jbenc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org;
> >> e@erig.me
> >> Subject: Re: [ovs-dev] [PATCH net-next v6 3/3] openvswitch: enable
> >> NSH support
> >>
> >> Hello,
> >>
> >> Yi Yang <yi.y.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:
> >>
> >> [...]
> >>
> >> > +struct ovs_key_nsh {
> >> > + u8 flags;
> >> > + u8 ttl;
> >> > + u8 mdtype;
> >> > + u8 np;
> >> > + __be32 path_hdr;
> >> > + __be32 context[NSH_MD1_CONTEXT_SIZE]; };
> >> > +
> >> > struct sw_flow_key {
> >> > u8 tun_opts[IP_TUNNEL_OPTS_MAX];
> >> > u8 tun_opts_len;
> >> > @@ -144,6 +154,7 @@ struct sw_flow_key {
> >> > };
> >> > } ipv6;
> >> > };
> >> > + struct ovs_key_nsh nsh; /* network service header */
> >> > struct {
> >> > /* Connection tracking fields not packed above. */
> >> > struct {
> >>
> >> Does it makes sense to keep the context headers as part of the flow?
> >> What is the reasoning behind it? With mdtype 2 headers this might
> >> either not work very well or will increase sw_flow_key size causing
> >> slowdowns for all protocols.
> > [Mooney, Sean K]
> > Having the nsh context headers in the flow is quite useful It would
> > allow loadblancing on values stored in the context headers Or other
> > use. I belive odl previously used context header 4 to store a Flow id
> > so this could potentialy be used with the multipath action to have
> ovs
> > Choose between several possible next hops in the chain.
>
> In OVS, masks are a list(!) for matching. How can this work for
> different paths that might require different masks? If they can't be
> unified you even get exact matches. Thus, for OVS the context should
> not be part of the flow.
[Mooney, Sean K] I'm not sure what you mean about a list as I never made reference to one.
md type 1 context headers are 4 mandatory 32 bit field.
form an ovs context they should be treated the same as the 32 bit register fields.
We do not need to necessarily support those in md type 2 as all metadata is optional.
>
> > Another example of where this is usefull is branching chains. if I
> > assume that both the classifier and Service function forwarder are
> > collocated in ovs on the host, and is send A packet to a firewall
> > service function which tags the packet as suspicious Via setting a
> > context header metadata field to 1, I as the sdn controller can
> > Install a high priority rule that will reclassify the packet as part
> > of as separate Service function chain the will prefer dpi on the
> > packet before returning it to The original chain if demand not a
> > threat.
>
> You can do that with different path id's, too?
[Mooney, Sean K] a service function is not allowed to alter the spi.
Only a classifier can do that. You are correct that a different spi is required for the branch
To the dpi sf but packets that are not droped can rejoin the original spi.
Packet are not require you to enter a service chain at the first hop.
service function chain are explicitly not A list. They are a directed graph composed
of service function instance or service function groups that generally
are reducible to a directed acrylic graph and in the simple case to a simple list.
branching an recovering chains are expected, as is loadblancing between
service function instances in the same service function group which share the same spi.
The spi filed in the nsh heard is intended to transport the logical service plane path id
not the rendered service path id.
>
> > So while a sff dose not in general have to be able to match on the
> > context header If I assume I want to use ovs to implenet a classifier
> > or service function(e.g. loadblancer) The its desirable to be able to
> > both match on the context headers in md type1 and also be able To set
> > them(this is something classifies and service fuction are allowed to
> > do).
>
> I don't think it is practical at all?
[Mooney, Sean K] To day in OpenStack we co-locate the clarifier at every
Ovs instance and use mpls as a standing for nsh doing proxing at every hop before sending
To an sf. Flow based load balancing is not only practical but has been demonstrated to work with odl gbp classifier
and sfc application controlling a patched ovs with nsh support in 2015.
If you look at slide 36 of http://events.linuxfoundation.org/sites/events/files/slides/odl%20summit%20sfc%20v5.pdf
you will see that prior to the berilium release of odl context header 1 and 2 are used to allow multi-tenancy
and overlapping ips. For the loadblancing implentaiton I belived they also used context header 4 to store a flow id.
This require odl to generate openflow rules to set the context headers as part of classification.
You can also see that context header 1 and 2 are still used in the newer odl netvirt sfc classifier implementation
https://github.com/opendaylight/netvirt/blob/ba22f7cf19d8a827d77a3391a7f654344ade43d8/docs/specs/new-sfc-classifier.rst#pipeline-changes
so for odl existing nsh support to work with md type one we must have the ability to set the nsh context headers
and should have the ability to match on them also for load lancing between service function in service function group.
^ permalink raw reply
* Re: [PATCH 5/5] net: mdio-mux: fix unbalanced put_device
From: Andrew Lunn @ 2017-08-30 18:53 UTC (permalink / raw)
To: Corentin Labbe; +Cc: f.fainelli, netdev, linux-kernel
In-Reply-To: <20170830174651.30325-6-clabbe.montjoie@gmail.com>
> err_pb_kz:
> /* balance the reference of_mdio_find_bus() took */
Hi Corentin
This comment should probably be updated as well.
> - if (!mux_bus)
> - put_device(&parent_bus->dev);
> + put_device(&parent_bus->dev);
Thanks
Andrew
^ permalink raw reply
* Re: [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers
From: Andrew Lunn @ 2017-08-30 18:49 UTC (permalink / raw)
To: Corentin Labbe; +Cc: f.fainelli, netdev, linux-kernel
In-Reply-To: <20170830174651.30325-5-clabbe.montjoie@gmail.com>
On Wed, Aug 30, 2017 at 07:46:50PM +0200, Corentin Labbe wrote:
> This patch fix an old information that mdio-mux-mmioreg can only handle
> 8bit registers.
> This is not true anymore.
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message
From: Andrew Lunn @ 2017-08-30 18:49 UTC (permalink / raw)
To: Corentin Labbe; +Cc: f.fainelli, netdev, linux-kernel
In-Reply-To: <20170830174651.30325-3-clabbe.montjoie@gmail.com>
On Wed, Aug 30, 2017 at 07:46:48PM +0200, Corentin Labbe wrote:
> This patch fix checkpatch warning about unnecessary 'out of memory'
> message.
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style
From: Andrew Lunn @ 2017-08-30 18:47 UTC (permalink / raw)
To: Corentin Labbe; +Cc: f.fainelli, netdev, linux-kernel
In-Reply-To: <20170830174651.30325-2-clabbe.montjoie@gmail.com>
On Wed, Aug 30, 2017 at 07:46:47PM +0200, Corentin Labbe wrote:
> This patch fix checkpatch warning about NULL Comparison style.
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH][net-next][V3] bpf: test_maps: fix typos, "conenct" and "listeen"
From: Daniel Borkmann @ 2017-08-30 18:47 UTC (permalink / raw)
To: Colin King, Alexei Starovoitov, Shuah Khan, netdev,
linux-kselftest, linux-kernel
In-Reply-To: <20170830171525.5688-1-colin.king@canonical.com>
On 08/30/2017 07:15 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Trivial fix to typos in printf error messages:
> "conenct" -> "connect"
> "listeen" -> "listen"
>
> thanks to Daniel Borkmann for spotting one of these mistakes
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
^ permalink raw reply
* Re: [PATCH 3/5] net: mdio-mux: printing driver version is useless
From: Andrew Lunn @ 2017-08-30 18:46 UTC (permalink / raw)
To: Corentin Labbe; +Cc: f.fainelli, netdev, linux-kernel
In-Reply-To: <20170830174651.30325-4-clabbe.montjoie@gmail.com>
On Wed, Aug 30, 2017 at 07:46:49PM +0200, Corentin Labbe wrote:
> Remove the driver version information because this information
> is not useful in an upstream kernel driver.
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Hi Corentin
You may as well remove DRV_VERSION from this file, not just here.
Andrew
^ permalink raw reply
* Re: [PATCH net-next 0/4] SRIOV VF VGT+ and violation counters support
From: David Miller @ 2017-08-30 18:39 UTC (permalink / raw)
To: saeedm; +Cc: saeedm, netdev, eugenia
In-Reply-To: <CALzJLG9FDh9XJKOGBxqxLqrJf3FSFxX8dZRLALxJRA7G-NQBBA@mail.gmail.com>
From: Saeed Mahameed <saeedm@dev.mellanox.co.il>
Date: Wed, 30 Aug 2017 21:33:18 +0300
> On Sun, Aug 27, 2017 at 2:06 PM, Saeed Mahameed <saeedm@mellanox.com> wrote:
>> Hi Dave
>>
>> This series provides two security SRIOV related features (VGT+ and VF violation counters).
>>
>> VGT+ is a security feature that gives the administrator the ability of controlling
>> the allowed VGT vlan IDs list that can be transmitted/received from/to the VF.
>> The allowed VGT vlan IDs list is called "trunk".
>>
>
> Dave, I would like to drop this series for now since we need to respin
> and find a better API to query vlan lists. it seems that it will take
> some time for our developer to complete this. So i would like to
> submit something else in the meanwhile.
If you look in patchwork I marked these patches as "Changes requested" so there
is nothing you need to worry about.
^ permalink raw reply
* Re: [PATCH net-next 0/4] SRIOV VF VGT+ and violation counters support
From: Saeed Mahameed @ 2017-08-30 18:33 UTC (permalink / raw)
To: Saeed Mahameed; +Cc: David S. Miller, Linux Netdev List, Eugenia Emantayev
In-Reply-To: <20170827110618.20599-1-saeedm@mellanox.com>
On Sun, Aug 27, 2017 at 2:06 PM, Saeed Mahameed <saeedm@mellanox.com> wrote:
> Hi Dave
>
> This series provides two security SRIOV related features (VGT+ and VF violation counters).
>
> VGT+ is a security feature that gives the administrator the ability of controlling
> the allowed VGT vlan IDs list that can be transmitted/received from/to the VF.
> The allowed VGT vlan IDs list is called "trunk".
>
Dave, I would like to drop this series for now since we need to respin
and find a better API to query vlan lists. it seems that it will take
some time for our developer to complete this. So i would like to
submit something else in the meanwhile.
Thanks,
Saeed.
^ permalink raw reply
* Re: [PATCH net-next 1/4] net: Add SRIOV VGT+ support
From: Saeed Mahameed @ 2017-08-30 18:30 UTC (permalink / raw)
To: Sabrina Dubroca
Cc: Saeed Mahameed, David S. Miller, Linux Netdev List,
Eugenia Emantayev, Mohamad Haj Yahia, Hannes Frederic Sowa
In-Reply-To: <20170829164330.GA22607@bistromath.localdomain>
On Tue, Aug 29, 2017 at 7:43 PM, Sabrina Dubroca <sd@queasysnail.net> wrote:
> 2017-08-29, 13:13:09 +0300, Saeed Mahameed wrote:
>> On Mon, Aug 28, 2017 at 6:52 PM, Sabrina Dubroca <sd@queasysnail.net> wrote:
>> > 2017-08-27, 14:06:15 +0300, Saeed Mahameed wrote:
>> > [...]
>> >> +#define VF_VLAN_BITMAP DIV_ROUND_UP(VF_VLAN_N_VID, sizeof(__u64) * BITS_PER_BYTE)
>> >> +struct ifla_vf_vlan_trunk {
>> >> + __u32 vf;
>> >> + __u64 allowed_vlans_8021q_bm[VF_VLAN_BITMAP];
>> >> + __u64 allowed_vlans_8021ad_bm[VF_VLAN_BITMAP];
>> >> +};
>> >
>> > This is huge (1032B). And you put one of these in the netlink message
>> > for each VF. This means that with 51 VF (at least in my environment,
>> > where each VF takes 1296B), you're going to overflow the u16 size of a
>> > single attribute (IFLA_VFINFO_LIST), and you cannot dump the device
>> > anymore. I'm afraid this is going to break existing setups.
>> >
>>
>> Yes ! We will fix this,
>> we are considering to report only a boolean in VFINFO which indecates
>> if VGT+ is enable or not
>> and provide a new attribute per VF to report only the vlan list of specific VF.
>
> I don't see what this is going to look like. Maybe you can describe
> more precisely what you want to add to the netlink message? (otherwise
> I'll wait for the patches)
>
We are still looking for the best way from user experience perspective.
Currently we think we will only allow to query VF vlan list on one VF
at a time, with vlan list special ip route command.
Still under definition, we will let you know once ready.
> If you add large attributes for each VF, this is still going to break.
>
>
> Thanks.
>
> --
> Sabrina
^ permalink raw reply
* Re: [PATCH net-next 0/2] tcp: re-add header prediction
From: David Miller @ 2017-08-30 18:20 UTC (permalink / raw)
To: fw; +Cc: netdev, edumazet
In-Reply-To: <20170830172458.18544-1-fw@strlen.de>
From: Florian Westphal <fw@strlen.de>
Date: Wed, 30 Aug 2017 19:24:56 +0200
> Eric reported a performance regression caused by header prediction
> removal.
>
> We now call tcp_ack() much more frequently, for some workloads
> this brings in enough cache line misses to become noticeable.
>
> We could possibly still kill HP provided we find a different
> way to suppress unneeded tcp_ack, but given we're late in
> the cycle it seems preferable to revert.
Indeed, reverting at this point in the game is the best thing
to do right now.
Applied, thanks.
^ permalink raw reply
* Re: [GIT] Networking
From: David Miller @ 2017-08-30 17:54 UTC (permalink / raw)
To: kvalo; +Cc: pavel, xiyou.wangcong, torvalds, akpm, netdev, linux-kernel
In-Reply-To: <87val5rmh8.fsf@kamboji.qca.qualcomm.com>
From: Kalle Valo <kvalo@codeaurora.org>
Date: Wed, 30 Aug 2017 20:31:31 +0300
> AFAICS the bug was introduced by 9df86e2e702c6 back in 2010. If the bug
> has been there for 7 years so waiting for a few more weeks should not
> hurt.
As a maintainer you have a right to handle bug fixing in that way, but
certainly that is not how I would handle this.
It's easy to validate this fix, it's extremely unlikely to cause
a regression, and fixes a problem someone actually was able to
trigger.
Deferring to -next only has the side effect of making people wait
longer for the fix.
^ permalink raw reply
* Re: linux-next: Signed-off-by missing for commit in the net-next tree
From: David Miller @ 2017-08-30 17:52 UTC (permalink / raw)
To: dsahern; +Cc: sfr, netdev, linux-next, linux-kernel
In-Reply-To: <32dc9201-c7a2-2cf0-e8a1-1c735b8784ee@gmail.com>
From: David Ahern <dsahern@gmail.com>
Date: Wed, 30 Aug 2017 10:53:48 -0600
> On 8/30/17 10:51 AM, Stephen Rothwell wrote:
>> Hi all,
>>
>> Commit
>>
>> 1b70d792cf67 ("ipv6: Use rt6i_idev index for echo replies to a local address")
>>
>> is missing a Signed-off-by from its author.
>>
>
> Eric pointed this out last night. The commit message copied output from
> a command that contained '---' so git ignored the remainder of the message.
Yes, it unfortunately got clipped off by GIT due to how the
commit message was written. :(
^ permalink raw reply
* [PATCH 5/5] net: mdio-mux: fix unbalanced put_device
From: Corentin Labbe @ 2017-08-30 17:46 UTC (permalink / raw)
To: andrew, f.fainelli; +Cc: netdev, linux-kernel, Corentin Labbe
In-Reply-To: <20170830174651.30325-1-clabbe.montjoie@gmail.com>
mdio_mux_uninit() call put_device (unconditionally) because of
of_mdio_find_bus() in mdio_mux_init.
But of_mdio_find_bus is only called if mux_bus is empty.
If mux_bus is set, mdio_mux_uninit will print a "refcount_t: underflow"
trace.
This patch add a get_device in the other branch of "if (mux_bus)".
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
drivers/net/phy/mdio-mux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index 9a889a529b9c..0b7d3d30ae97 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -117,6 +117,7 @@ int mdio_mux_init(struct device *dev,
} else {
parent_bus_node = NULL;
parent_bus = mux_bus;
+ get_device(&parent_bus->dev);
}
pb = devm_kzalloc(dev, sizeof(*pb), GFP_KERNEL);
@@ -186,8 +187,7 @@ int mdio_mux_init(struct device *dev,
devm_kfree(dev, pb);
err_pb_kz:
/* balance the reference of_mdio_find_bus() took */
- if (!mux_bus)
- put_device(&parent_bus->dev);
+ put_device(&parent_bus->dev);
err_parent_bus:
of_node_put(parent_bus_node);
return ret_val;
--
2.13.5
^ permalink raw reply related
* [PATCH 3/5] net: mdio-mux: printing driver version is useless
From: Corentin Labbe @ 2017-08-30 17:46 UTC (permalink / raw)
To: andrew, f.fainelli; +Cc: netdev, linux-kernel, Corentin Labbe
In-Reply-To: <20170830174651.30325-1-clabbe.montjoie@gmail.com>
Remove the driver version information because this information
is not useful in an upstream kernel driver.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
drivers/net/phy/mdio-mux.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index 5e08e89465c5..9a889a529b9c 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -179,7 +179,6 @@ int mdio_mux_init(struct device *dev,
}
if (pb->children) {
*mux_handle = pb;
- dev_info(dev, "Version " DRV_VERSION "\n");
return 0;
}
--
2.13.5
^ permalink raw reply related
* [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers
From: Corentin Labbe @ 2017-08-30 17:46 UTC (permalink / raw)
To: andrew, f.fainelli; +Cc: netdev, linux-kernel, Corentin Labbe
In-Reply-To: <20170830174651.30325-1-clabbe.montjoie@gmail.com>
This patch fix an old information that mdio-mux-mmioreg can only handle
8bit registers.
This is not true anymore.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
drivers/net/phy/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 5afe6fdcc968..a9d16a3af514 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -85,7 +85,7 @@ config MDIO_BUS_MUX_MMIOREG
parent bus. Child bus selection is under the control of one of
the FPGA's registers.
- Currently, only 8-bit registers are supported.
+ Currently, only 8/16/32 bits registers are supported.
config MDIO_CAVIUM
tristate
--
2.13.5
^ permalink raw reply related
* [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message
From: Corentin Labbe @ 2017-08-30 17:46 UTC (permalink / raw)
To: andrew, f.fainelli; +Cc: netdev, linux-kernel, Corentin Labbe
In-Reply-To: <20170830174651.30325-1-clabbe.montjoie@gmail.com>
This patch fix checkpatch warning about unnecessary 'out of memory'
message.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
drivers/net/phy/mdio-mux.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index b18ad7082b88..5e08e89465c5 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -145,9 +145,6 @@ int mdio_mux_init(struct device *dev,
cb = devm_kzalloc(dev, sizeof(*cb), GFP_KERNEL);
if (!cb) {
- dev_err(dev,
- "Error: Failed to allocate memory for child %pOF\n",
- child_bus_node);
ret_val = -ENOMEM;
continue;
}
@@ -156,9 +153,6 @@ int mdio_mux_init(struct device *dev,
cb->mii_bus = mdiobus_alloc();
if (!cb->mii_bus) {
- dev_err(dev,
- "Error: Failed to allocate MDIO bus for child %pOF\n",
- child_bus_node);
ret_val = -ENOMEM;
devm_kfree(dev, cb);
continue;
--
2.13.5
^ permalink raw reply related
* [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style
From: Corentin Labbe @ 2017-08-30 17:46 UTC (permalink / raw)
To: andrew, f.fainelli; +Cc: netdev, linux-kernel, Corentin Labbe
In-Reply-To: <20170830174651.30325-1-clabbe.montjoie@gmail.com>
This patch fix checkpatch warning about NULL Comparison style.
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
drivers/net/phy/mdio-mux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c
index 942ceaf3fd3f..b18ad7082b88 100644
--- a/drivers/net/phy/mdio-mux.c
+++ b/drivers/net/phy/mdio-mux.c
@@ -120,7 +120,7 @@ int mdio_mux_init(struct device *dev,
}
pb = devm_kzalloc(dev, sizeof(*pb), GFP_KERNEL);
- if (pb == NULL) {
+ if (!pb) {
ret_val = -ENOMEM;
goto err_pb_kz;
}
@@ -144,7 +144,7 @@ int mdio_mux_init(struct device *dev,
}
cb = devm_kzalloc(dev, sizeof(*cb), GFP_KERNEL);
- if (cb == NULL) {
+ if (!cb) {
dev_err(dev,
"Error: Failed to allocate memory for child %pOF\n",
child_bus_node);
--
2.13.5
^ permalink raw reply related
* [PATCH 0/5] net: mdio-mux: Misc fix
From: Corentin Labbe @ 2017-08-30 17:46 UTC (permalink / raw)
To: andrew, f.fainelli; +Cc: netdev, linux-kernel, Corentin Labbe
Hello
This patch series fix minor problems found when working on the
dwmac-sun8i syscon mdio-mux.
Regards
Corentin Labbe (5):
net: mdio-mux: Fix NULL Comparison style
net: mdio-mux: Remove unnecessary 'out of memory' message
net: mdio-mux: printing driver version is useless
net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers
net: mdio-mux: fix unbalanced put_device
drivers/net/phy/Kconfig | 2 +-
drivers/net/phy/mdio-mux.c | 15 ++++-----------
2 files changed, 5 insertions(+), 12 deletions(-)
--
2.13.5
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox