1. 09 1月, 2018 1 次提交
  2. 08 1月, 2018 7 次提交
  3. 06 1月, 2018 3 次提交
    • J
      xdp/qede: setup xdp_rxq_info and intro xdp_rxq_info_is_reg · c0124f32
      Jesper Dangaard Brouer 提交于
      The driver code qede_free_fp_array() depend on kfree() can be called
      with a NULL pointer. This stems from the qede_alloc_fp_array()
      function which either (kz)alloc memory for fp->txq or fp->rxq.
      This also simplifies error handling code in case of memory allocation
      failures, but xdp_rxq_info_unreg need to know the difference.
      
      Introduce xdp_rxq_info_is_reg() to handle if a memory allocation fails
      and detect this is the failure path by seeing that xdp_rxq_info was
      not registred yet, which first happens after successful alloaction in
      qede_init_fp().
      
      Driver hook points for xdp_rxq_info:
       * reg  : qede_init_fp
       * unreg: qede_free_fp_array
      
      Tested on actual hardware with samples/bpf program.
      
      V2: Driver have no proper error path for failed XDP RX-queue info reg, as
      qede_init_fp() is a void function.
      
      Cc: everest-linux-l2@cavium.com
      Cc: Ariel Elior <Ariel.Elior@cavium.com>
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      c0124f32
    • J
      xdp: base API for new XDP rx-queue info concept · aecd67b6
      Jesper Dangaard Brouer 提交于
      This patch only introduce the core data structures and API functions.
      All XDP enabled drivers must use the API before this info can used.
      
      There is a need for XDP to know more about the RX-queue a given XDP
      frames have arrived on.  For both the XDP bpf-prog and kernel side.
      
      Instead of extending xdp_buff each time new info is needed, the patch
      creates a separate read-mostly struct xdp_rxq_info, that contains this
      info.  We stress this data/cache-line is for read-only info.  This is
      NOT for dynamic per packet info, use the data_meta for such use-cases.
      
      The performance advantage is this info can be setup at RX-ring init
      time, instead of updating N-members in xdp_buff.  A possible (driver
      level) micro optimization is that xdp_buff->rxq assignment could be
      done once per XDP/NAPI loop.  The extra pointer deref only happens for
      program needing access to this info (thus, no slowdown to existing
      use-cases).
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      aecd67b6
    • Q
      net: sched: fix tcf_block_get_ext() in case CONFIG_NET_CLS is not set · 33c30a8b
      Quentin Monnet 提交于
      The definition of functions tcf_block_get() and tcf_block_get_ext()
      depends of CONFIG_NET_CLS being set. When those functions gained extack
      support, only one version of the declaration of those functions was
      updated. Function tcf_block_get() was later fixed with commit
      3c149091 ("net: sch: api: fix tcf_block_get").
      
      Change arguments of tcf_block_get_ext() for the case when CONFIG_NET_CLS
      is not set.
      
      Fixes: 8d1a77f9 ("net: sch: api: add extack support in tcf_block_get")
      Signed-off-by: NQuentin Monnet <quentin.monnet@netronome.com>
      Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33c30a8b
  4. 29 12月, 2017 1 次提交
  5. 28 12月, 2017 1 次提交
  6. 22 12月, 2017 9 次提交
  7. 21 12月, 2017 4 次提交
  8. 20 12月, 2017 3 次提交
  9. 19 12月, 2017 8 次提交
  10. 16 12月, 2017 3 次提交
    • X
      sctp: implement handle_ftsn for sctp_stream_interleave · de60fe91
      Xin Long 提交于
      handle_ftsn is added as a member of sctp_stream_interleave, used to skip
      ssn for data or mid for idata, called for SCTP_CMD_PROCESS_FWDTSN cmd.
      
      sctp_handle_iftsn works for ifwdtsn, and sctp_handle_fwdtsn works for
      fwdtsn. Note that different from sctp_handle_fwdtsn, sctp_handle_iftsn
      could do stream abort pd.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NMarcelo R. Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de60fe91
    • X
      sctp: implement report_ftsn for sctp_stream_interleave · 47b20a88
      Xin Long 提交于
      report_ftsn is added as a member of sctp_stream_interleave, used to
      skip tsn from tsnmap, remove old events from reasm or lobby queue,
      and abort pd for data or idata, called for SCTP_CMD_REPORT_FWDTSN
      cmd and asoc reset.
      
      sctp_report_iftsn works for ifwdtsn, and sctp_report_fwdtsn works
      for fwdtsn. Note that sctp_report_iftsn doesn't do asoc abort_pd,
      as stream abort_pd will be done when handling ifwdtsn. But when
      ftsn is equal with ftsn, which means asoc reset, asoc abort_pd has
      to be done.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NMarcelo R. Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47b20a88
    • X
      sctp: implement validate_ftsn for sctp_stream_interleave · 0fc2ea92
      Xin Long 提交于
      validate_ftsn is added as a member of sctp_stream_interleave, used to
      validate ssn/chunk type for fwdtsn or mid (message id)/chunk type for
      ifwdtsn, called in sctp_sf_eat_fwd_tsn, just as validate_data.
      
      If this check fails, an abort packet will be sent, as said in section
      2.3.1 of RFC8260.
      
      As ifwdtsn and fwdtsn chunks have different length, it also defines
      ftsn_chunk_len for sctp_stream_interleave to describe the chunk size.
      Then it replaces all sizeof(struct sctp_fwdtsn_chunk) with
      sctp_ftsnchk_len.
      
      It also adds the process for ifwdtsn in rx path. As Marcelo pointed
      out, there's no need to add event table for ifwdtsn, but just share
      prsctp_chunk_event_table with fwdtsn's. It would drop fwdtsn chunk
      for ifwdtsn and drop ifwdtsn chunk for fwdtsn by calling validate_ftsn
      in sctp_sf_eat_fwd_tsn.
      
      After this patch, the ifwdtsn can be accepted.
      
      Note that this patch also removes the sctp.intl_enable check for
      idata chunks in sctp_chunk_event_lookup, as it will do this check
      in validate_data later.
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NMarcelo R. Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fc2ea92