1. 16 Sep, 2016 35 commits
  2. 15 Sep, 2016 5 commits
    • Hariprasad Shenai's avatar
      cxgb4vf: don't offload Rx checksums for IPv6 fragments · 5400e54a
      Hariprasad Shenai authored
      The checksum provided by the device doesn't include the L3 headers,
      as IPv6 expects
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5400e54a
    • Jamal Hadi Salim's avatar
      net_sched: Introduce skbmod action · 86da71b5
      Jamal Hadi Salim authored
      This action is intended to be an upgrade from a usability perspective
      from pedit (as well as operational debugability).
      Compare this:
      
      sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \
      u32 match ip protocol 1 0xff flowid 1:2 \
      action pedit munge offset -14 u8 set 0x02 \
      munge offset -13 u8 set 0x15 \
      munge offset -12 u8 set 0x15 \
      munge offset -11 u8 set 0x15 \
      munge offset -10 u16 set 0x1515 \
      pipe
      
      to:
      
      sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \
      u32 match ip protocol 1 0xff flowid 1:2 \
      action skbmod dmac 02:15:15:15:15:15
      
      Also try to do a MAC address swap with pedit or worse
      try to debug a policy with destination mac, source mac and
      etherype. Then make few rules out of those and you'll get my point.
      
      In the future common use cases on pedit can be migrated to this action
      (as an example different fields in ip v4/6, transports like tcp/udp/sctp
      etc). For this first cut, this allows modifying basic ethernet header.
      
      The most important ethernet use case at the moment is when redirecting or
      mirroring packets to a remote machine. The dst mac address needs a re-write
      so that it doesnt get dropped or confuse an interconnecting (learning) switch
      or dropped by a target machine (which looks at the dst mac). And at times
      when flipping back the packet a swap of the MAC addresses is needed.
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86da71b5
    • David S. Miller's avatar
      Merge branch 'bpf-next' · c8652501
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      Misc cls_bpf/act_bpf improvements
      
      Two minor improvements to {cls,act}_bpf. For details please see
      individual patches.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c8652501
    • Daniel Borkmann's avatar
      bpf: use skb_at_tc_ingress helper in tcf_bpf · f53d8c7b
      Daniel Borkmann authored
      We have a small skb_at_tc_ingress() helper for testing for ingress, so
      make use of it. cls_bpf already uses it and so should act_bpf.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f53d8c7b
    • Daniel Borkmann's avatar
      bpf: drop unnecessary test in cls_bpf_classify and tcf_bpf · 04b3f8de
      Daniel Borkmann authored
      The skb_mac_header_was_set() test in cls_bpf's and act_bpf's fast-path is
      actually unnecessary and can be removed altogether. This was added by
      commit a166151c ("bpf: fix bpf helpers to use skb->mac_header relative
      offsets"), which was later on improved by 3431205e ("bpf: make programs
      see skb->data == L2 for ingress and egress"). We're always guaranteed to
      have valid mac header at the time we invoke cls_bpf_classify() or tcf_bpf().
      
      Reason is that since 6d1ccff6 ("net: reset mac header in dev_start_xmit()")
      we do skb_reset_mac_header() in __dev_queue_xmit() before we could call
      into sch_handle_egress() or any subsequent enqueue. sch_handle_ingress()
      always sees a valid mac header as well (things like skb_reset_mac_len()
      would badly fail otherwise). Thus, drop the unnecessary test in classifier
      and action case.
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      04b3f8de