Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-28 Thread Edward Cree
On 28/09/18 17:45, Andrew Lunn wrote: > Now is a good time to change the API, since we are moving to a netlink > socket. Which is why these questions were asked in the first place... OK, well, I've posted sfc's semantics and view-from-the-hardware*; now  patiently waiting for other NIC vendors to c

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-28 Thread Andrew Lunn
> I see where you're coming from, but if people start needing to manually >  configure FEC on their consumer devices, possibly we have bigger >  problems. Yes, i agree with that. For the consumer market, SFPs needs to grow up and start doing full and reliable auto-neg, just like copper Ethernet.

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-28 Thread Edward Cree
On 28/09/18 16:39, Andrew Lunn wrote: > I wonder how true that will be in 5 years time, about reading the > manual? SFP sockets are starting to appear in consumer devices. There > are some Marvell SoC reference boards with SFP and SFP+. Broadcom also > have some boards with SFP. With time, SFP will

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-28 Thread Andrew Lunn
> For us, those semantics make sense (our HW has a notion of 'supported' >  and 'requested' bits for each FEC type for each of local-device, cable >  and link-partner, and uses the strongest FEC mode that's supported by >  everyone and requested by anyone); but if something else is a better fit >  

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-28 Thread Edward Cree
On 26/09/18 09:47, Ariel Almog wrote: > I was won Truncated sentence?  ("... wondering"?) > I find the ability to set off, auto and specific FEC mode in the same > command confusing. I didn't try to define semantics here since each driver currently does  something slightly different.  Probably the

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-26 Thread Ariel Almog
> --- a/ethtool.c > +++ b/ethtool.c > @@ -4967,20 +4967,48 @@ static int do_set_phy_tunable(struct cmd_context > *ctx) >static int fecmode_str_to_type(const char *str) > { > + if (!strcasecmp(str, "auto")) > + return ETHTOOL_FEC_AUTO; > + if (!strcasecmp(str, "off"))

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-19 Thread Michal Kubecek
On Wed, Sep 19, 2018 at 04:38:27PM +0100, Edward Cree wrote: > On 19/09/18 15:41, Michal Kubecek wrote: > > I'm sorry I didn't notice this before the patch was accepted but as it's > > not in a release yet, maybe it's still not too late. > > > > Could I suggest to make the syntax consistent with ot

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-19 Thread Michal Kubecek
On Wed, Sep 19, 2018 at 05:33:38PM +0200, Andrew Lunn wrote: > > One loosely related question: how sure can we be that we are never going > > to need more than 32 bits for FEC encodings? Is it something completely > > hypothetical or is it something that could happen in the future? > > > Hi Michal

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-19 Thread Edward Cree
On 19/09/18 15:41, Michal Kubecek wrote: > I'm sorry I didn't notice this before the patch was accepted but as it's > not in a release yet, maybe it's still not too late. > > Could I suggest to make the syntax consistent with other options? I didn't realise ethtool had any patterns to be consistent

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-19 Thread Andrew Lunn
> One loosely related question: how sure can we be that we are never going > to need more than 32 bits for FEC encodings? Is it something completely > hypothetical or is it something that could happen in the future? > Hi Michal Hopefully we have moved to a netlink socket by that time :-) I recen

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-19 Thread Michal Kubecek
On Wed, Sep 05, 2018 at 06:54:57PM +0100, Edward Cree wrote: > Of the three drivers that currently support FEC configuration, two (sfc > and cxgb4[vf]) accept configurations with more than one bit set in the > feccmd.fec bitmask. (The precise semantics of these combinations vary.) > Thus, this p

Re: [PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-17 Thread John W. Linville
On Wed, Sep 05, 2018 at 06:54:57PM +0100, Edward Cree wrote: > Of the three drivers that currently support FEC configuration, two (sfc > and cxgb4[vf]) accept configurations with more than one bit set in the > feccmd.fec bitmask. (The precise semantics of these combinations vary.) > Thus, this p

[PATCH ethtool] ethtool: support combinations of FEC modes

2018-09-05 Thread Edward Cree
Of the three drivers that currently support FEC configuration, two (sfc and cxgb4[vf]) accept configurations with more than one bit set in the feccmd.fec bitmask. (The precise semantics of these combinations vary.) Thus, this patch adds the ability to specify such combinations through a comma-s