1. 27 12月, 2019 9 次提交
    • M
      net: phy: realtek: add logging for the RGMII TX delay configuration · 3aec743d
      Martin Blumenstingl 提交于
      RGMII requires a delay of 2ns between the data and the clock signal.
      There are at least three ways this can happen. One possibility is by
      having the PHY generate this delay.
      This is a common source for problems (for example with slow TX speeds or
      packet loss when sending data). The TX delay configuration of the
      RTL8211F PHY can be set either by pin-strappping the RXD1 pin (HIGH
      means enabled, LOW means disabled) or through configuring a paged
      register. The setting from the RXD1 pin is also reflected in the
      register.
      
      Add debug logging to the TX delay configuration on RTL8211F so it's
      easier to spot these issues (for example if the TX delay is enabled for
      both, the RTL8211F PHY and the MAC).
      This is especially helpful because there is no public datasheet for the
      RTL8211F PHY available with all the RX/TX delay specifics.
      Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3aec743d
    • D
      Merge branch 'mlxsw-spectrum_router-Cleanups' · 1f4f16fa
      David S. Miller 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: spectrum_router: Cleanups
      
      This patch set removes from mlxsw code that is no longer necessary after
      the simplification of the IPv4 and IPv6 route offload API.
      
      The patches eliminate unnecessary code by taking advantage of the fact
      that mlxsw no longer needs to maintain a list of identical routes,
      following recent changes in route offload API.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f4f16fa
    • I
      mlxsw: spectrum_router: Remove FIB entry list from FIB node · 7c4a7ec8
      Ido Schimmel 提交于
      As explained in previous patches, the driver no longer needs to maintain
      a list of identical FIB entries (i.e, same {tb_id, prefix, prefix
      length}) and therefore each FIB node can only store one FIB entry.
      
      Remove the FIB entry list and simplify the code.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c4a7ec8
    • I
      mlxsw: spectrum_router: Consolidate identical functions · b04720ae
      Ido Schimmel 提交于
      After the last patch mlxsw_sp_fib{4,6}_node_entry_link() and
      mlxsw_sp_fib{4,6}_node_entry_unlink() are identical and can therefore be
      consolidated into the same common function.
      
      Perform the consolidation.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b04720ae
    • I
      mlxsw: spectrum_router: Make route creation and destruction symmetric · 0705297e
      Ido Schimmel 提交于
      Host routes that perform decapsulation of IP in IP tunnels have a
      special adjacency entry linked to them. This entry stores information
      such as the expected underlay source IP. When the route is deleted this
      entry needs to be freed.
      
      The allocation of the adjacency entry happens in
      mlxsw_sp_fib4_entry_type_set(), but it is freed in
      mlxsw_sp_fib4_node_entry_unlink().
      
      Create a new function - mlxsw_sp_fib4_entry_type_unset() - and free the
      adjacency entry there.
      
      This will allow us to consolidate mlxsw_sp_fib{4,6}_node_entry_unlink()
      in the next patch.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0705297e
    • I
      mlxsw: spectrum_router: Eliminate dead code · 0d2fb5aa
      Ido Schimmel 提交于
      Since the driver no longer maintains a list of identical routes there is
      no route to promote when a route is deleted.
      
      Remove that code that took care of it.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d2fb5aa
    • I
      mlxsw: spectrum_router: Remove unnecessary checks · 231c8d2b
      Ido Schimmel 提交于
      Now that the networking stack takes care of only notifying the routes of
      interest, we do not need to maintain a list of identical routes.
      
      Remove the check that tests if the route is the first route in the FIB
      node.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      231c8d2b
    • A
      bonding: rename AD_STATE_* to LACP_STATE_* · c1e46990
      Andy Roulin 提交于
      As the LACP actor/partner state is now part of the uapi, rename the
      3ad state defines with LACP prefix. The LACP prefix is preferred over
      BOND_3AD as the LACP standard moved to 802.1AX.
      
      Fixes: 826f66b3 ("bonding: move 802.3ad port state flags to uapi")
      Signed-off-by: NAndy Roulin <aroulin@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1e46990
    • K
      sctp: move trace_sctp_probe_path into sctp_outq_sack · f643ee29
      Kevin Kou 提交于
      The original patch bringed in the "SCTP ACK tracking trace event"
      feature was committed at Dec.20, 2017, it replaced jprobe usage
      with trace events, and bringed in two trace events, one is
      TRACE_EVENT(sctp_probe), another one is TRACE_EVENT(sctp_probe_path).
      The original patch intended to trigger the trace_sctp_probe_path in
      TRACE_EVENT(sctp_probe) as below code,
      
      +TRACE_EVENT(sctp_probe,
      +
      +	TP_PROTO(const struct sctp_endpoint *ep,
      +		 const struct sctp_association *asoc,
      +		 struct sctp_chunk *chunk),
      +
      +	TP_ARGS(ep, asoc, chunk),
      +
      +	TP_STRUCT__entry(
      +		__field(__u64, asoc)
      +		__field(__u32, mark)
      +		__field(__u16, bind_port)
      +		__field(__u16, peer_port)
      +		__field(__u32, pathmtu)
      +		__field(__u32, rwnd)
      +		__field(__u16, unack_data)
      +	),
      +
      +	TP_fast_assign(
      +		struct sk_buff *skb = chunk->skb;
      +
      +		__entry->asoc = (unsigned long)asoc;
      +		__entry->mark = skb->mark;
      +		__entry->bind_port = ep->base.bind_addr.port;
      +		__entry->peer_port = asoc->peer.port;
      +		__entry->pathmtu = asoc->pathmtu;
      +		__entry->rwnd = asoc->peer.rwnd;
      +		__entry->unack_data = asoc->unack_data;
      +
      +		if (trace_sctp_probe_path_enabled()) {
      +			struct sctp_transport *sp;
      +
      +			list_for_each_entry(sp, &asoc->peer.transport_addr_list,
      +					    transports) {
      +				trace_sctp_probe_path(sp, asoc);
      +			}
      +		}
      +	),
      
      But I found it did not work when I did testing, and trace_sctp_probe_path
      had no output, I finally found that there is trace buffer lock
      operation(trace_event_buffer_reserve) in include/trace/trace_events.h:
      
      static notrace void							\
      trace_event_raw_event_##call(void *__data, proto)			\
      {									\
      	struct trace_event_file *trace_file = __data;			\
      	struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\
      	struct trace_event_buffer fbuffer;				\
      	struct trace_event_raw_##call *entry;				\
      	int __data_size;						\
      									\
      	if (trace_trigger_soft_disabled(trace_file))			\
      		return;							\
      									\
      	__data_size = trace_event_get_offsets_##call(&__data_offsets, args); \
      									\
      	entry = trace_event_buffer_reserve(&fbuffer, trace_file,	\
      				 sizeof(*entry) + __data_size);		\
      									\
      	if (!entry)							\
      		return;							\
      									\
      	tstruct								\
      									\
      	{ assign; }							\
      									\
      	trace_event_buffer_commit(&fbuffer);				\
      }
      
      The reason caused no output of trace_sctp_probe_path is that
      trace_sctp_probe_path written in TP_fast_assign part of
      TRACE_EVENT(sctp_probe), and it will be placed( { assign; } ) after the
      trace_event_buffer_reserve() when compiler expands Macro,
      
              entry = trace_event_buffer_reserve(&fbuffer, trace_file,        \
                                       sizeof(*entry) + __data_size);         \
                                                                              \
              if (!entry)                                                     \
                      return;                                                 \
                                                                              \
              tstruct                                                         \
                                                                              \
              { assign; }                                                     \
      
      so trace_sctp_probe_path finally can not acquire trace_event_buffer
      and return no output, that is to say the nest of tracepoint entry function
      is not allowed. The function call flow is:
      
      trace_sctp_probe()
      -> trace_event_raw_event_sctp_probe()
       -> lock buffer
       -> trace_sctp_probe_path()
         -> trace_event_raw_event_sctp_probe_path()  --nested
         -> buffer has been locked and return no output.
      
      This patch is to remove trace_sctp_probe_path from the TP_fast_assign
      part of TRACE_EVENT(sctp_probe) to avoid the nest of entry function,
      and trigger sctp_probe_path_trace in sctp_outq_sack.
      
      After this patch, you can enable both events individually,
        # cd /sys/kernel/debug/tracing
        # echo 1 > events/sctp/sctp_probe/enable
        # echo 1 > events/sctp/sctp_probe_path/enable
      
      Or, you can enable all the events under sctp.
      
        # echo 1 > events/sctp/enable
      Signed-off-by: NKevin Kou <qdkevin.kou@gmail.com>
      Acked-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f643ee29
  2. 26 12月, 2019 13 次提交
  3. 25 12月, 2019 17 次提交
  4. 23 12月, 2019 1 次提交